Page MenuHomePhabricator

Selenium test "Special:NewPagesFeed.new article appears in feed" in newpagesfeed.js for extension PageTriage is flaky
Open, Needs TriagePublic

Description

Unrelated error from selenium

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MediaModeration/+/1333790
https://integration.wikimedia.org/ci/job/quibble-with-gated-extensions-selenium-php83/52250/console

13:32:43 [0-1] RUNNING in chrome - file:///tests/selenium/specs/toolbar.js
13:32:43 [0-0] RUNNING in chrome - file:///tests/selenium/specs/newpagesfeed.js
13:32:44 [0-0] [Browser information] chrome 151.0.7922.71 viewPort 1280x937
13:32:54 [0-1] PASSED in chrome - file:///tests/selenium/specs/toolbar.js
13:33:03 [0-0] Error in "Special:NewPagesFeed.new article appears in feed"
13:33:03 Error: Expect $(`#mwe-pt-list`) to have text
13:33:03 
13:33:03 Expected: StringContaining "NewArticle-0.9683412403925648-Iñtërnâtiônàlizætiøn"
13:33:03 Received: "Active filters:
13:33:03 Unreviewed
13:33:03 Articles not nominated for deletion
13:33:03 9 pages in your filtered list
[...]
13:33:03 9 articles and 0 redirects are unreviewed (oldest: less than one day)
13:33:03 0 articles and 0 redirects were reviewed this week"
13:33:03     at Context.<anonymous> (file:///workspace/src/extensions/PageTriage/tests/selenium/specs/newpagesfeed.js:39:5)
13:33:04 [0-0] RETRYING in chrome - file:///tests/selenium/specs/newpagesfeed.js

Event Timeline

Technically a duplicate of the long-closed T349860, I guess.

Anyway, I've been seeing this a lot, most recently in: https://integration.wikimedia.org/ci/job/quibble-with-gated-extensions-selenium-php83/55065/console

^ In that one there are two failures.

1: Can't call setValue on element with selector "#wpTextbox1"

Insofar as the screenshot generated shows the Special:WelcomeSurvey from GrowthExperiments, I suspect that we might sometimes have extensions fighting over what happens immediately after a user's first edit.

image.png (1,280×937 px, 155 KB)

2: Expect $('#mwe-pt-list') to have text

It actually does seem like the article wasn't created. In particular, the apache log in the build artifacts doesn't show a request that'd save an article:

00:39:52  GET  index.php?action=edit&...&title=NewArticle-0.8504671671637339-...
00:39:54  POST api.php?action=stashedit
00:39:56  GET  index.php?title=Special:NewPagesFeed

stashedit there is it preparing to save, but there's no trace of a POST or API call that actually would do the save. As such, I'd suspect that there's something getting in the way of the test runner actually pressing the save button (or an error message that it'd need to respond to after it's pressed, etc).

Change #1342094 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/PageTriage@master] selenium: Wait for the edit form and for the save in EditPage

https://gerrit.wikimedia.org/r/1342094

Change #1342095 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/PageTriage@master] selenium: Wait for the redirect after the account creation

https://gerrit.wikimedia.org/r/1342095

Dragoniez triaged this task as Unbreak Now! priority.Fri, Sep 18, 3:55 PM
Dragoniez subscribed.

This is affecting multiple unrelated patches -> UBN

Is the error transient, or 100% of the time? In what repos?

If it's 100% of the time, someone should write and merge a .skip() patch.

DLynch lowered the priority of this task from Unbreak Now! to Needs Triage.Fri, Sep 18, 4:45 PM

I believe those are unrelated to the selenium test this ticket is about. They look like the issues caused by the node 26 CI switch (T438085).

Change #1342094 merged by jenkins-bot:

[mediawiki/extensions/PageTriage@master] selenium: Wait for the edit form and for the save in EditPage

https://gerrit.wikimedia.org/r/1342094

Change #1342095 merged by jenkins-bot:

[mediawiki/extensions/PageTriage@master] selenium: Wait for the redirect after the account creation

https://gerrit.wikimedia.org/r/1342095

I guess now we just need to wait for a week or two and see whether the failures on this go away. 🤔