Page MenuHomePhabricator

Make existing daily selenium nodejs tests for WikibaseLexeme green again
Open, Needs TriagePublic

Description

We are running the WikibaseLexeme's selenium nodejs browser tests against beta every day[0] and they currently fail every day.

As part of rewriting the daily ruby browser tests (which are also failing every day), we should strife to make the node tests reliably green as well.

This ticket is intended to serve as tracking ticket for that effort.

[0]: apparently they have been added manually, see: T188742, possibly by T194252

Details

Related Gerrit Patches:
mediawiki/extensions/Wikibase : masterAdd nodejs utility to check if cirrus is up-to-date
mediawiki/extensions/WikibaseLexeme : masterUse util to wait for new item be known in browser test
mediawiki/extensions/Wikibase : masterAdd nodejs utility to check if new entity is known to search
mediawiki/extensions/WikibaseLexeme : masterRetry inputs in Lexeme header browser tests
mediawiki/extensions/WikibaseLexeme : masterGive elastic on beta more time to recognize created items

Event Timeline

Michael created this task.May 3 2019, 12:55 PM
Michael updated the task description. (Show Details)May 3 2019, 1:05 PM

After the release, I manually restarted the build and all passed except these two: https://integration.wikimedia.org/ci/view/Selenium/job/selenium-daily-beta-WikibaseLexeme/256/console

17:29:24 1) Lexeme:Header can edit the language of a Lexeme:
17:29:24 Promise was rejected with the following reason: timeout
17:29:24 running chrome
17:29:24 Error: Promise was rejected with the following reason: timeout
17:29:24     at LexemePage.setLexemeLanguageItem (tests/selenium/pageobjects/lexeme.page.js:151:11)
17:29:24     at Context.it (tests/selenium/specs/header.edit.js:37:14)
17:29:24     at Promise.F (node_modules/core-js/library/modules/_export.js:36:28)
17:29:24     at elementIdAttribute("0.9027693925843041-4", "disabled") - getAttribute.js:43:55
17:29:24 
17:29:24 2) Lexeme:Header can edit the lexical category of a Lexeme:
17:29:24 Promise was rejected with the following reason: timeout
17:29:24 running chrome
17:29:24 Error: Promise was rejected with the following reason: timeout
17:29:24     at LexemePage.setLexicalCategoryItem (tests/selenium/pageobjects/lexeme.page.js:162:11)
17:29:24     at Context.it (tests/selenium/specs/header.edit.js:69:14)
17:29:24     at Promise.F (node_modules/core-js/library/modules/_export.js:36:28)
17:29:24     at elementIdAttribute("0.16885742401078518-4", "disabled") - getAttribute.js:43:55

The images show that the id that should have been created was not found. I will try to figure out what is going on.

Ladsgroup added a comment.EditedMay 7 2019, 3:44 PM

The images show that the id that should have been created was not found. I will try to figure out what is going on.

It might be the classic issue of elastic not being able to index the newly created item. We had this issue in Wikibase itself a lot.

It's very likely now because I just made a similar edit there: https://wikidata.beta.wmflabs.org/w/index.php?title=Lexeme:L53&diff=1122629&oldid=1083980

It might be the classic issue of elastic not being able to index the newly created item. We had this issue in Wikibase itself a lot.

But then, why does everything else work? Or was it random chance that it hit the two new tests?

It might be the classic issue of elastic not being able to index the newly created item. We had this issue in Wikibase itself a lot.

But then, why does everything else work? Or was it random chance that it hit the two new tests?

Probably the new tests don't have the "wait time" for elastic to pick up. I investigate it

Change 508617 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/WikibaseLexeme@master] Give elastic on beta more time to recognize created items

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

Change 508617 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Give elastic on beta more time to recognize created items

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

It still fails in beta cluster because of not being able to find the item.

It still fails in beta cluster because of not being able to find the item.

One of the tests still doesn't find the item, the other one does, but fails to save the change. :/

Restricted Application added a project: User-Michael. · View Herald TranscriptMay 8 2019, 11:42 AM

Change 508834 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/Wikibase@master] Add nodejs utility to check if cirrus is up-to-date

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

Change 508836 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/WikibaseLexeme@master] Use util to wait for cirrus in browser test

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

Change 509100 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/Wikibase@master] Add nodejs utility to check if new entity is known to search

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

Change 509356 had a related patch set uploaded (by Michael Große; owner: Michael Große):
[mediawiki/extensions/WikibaseLexeme@master] Retry inputs in Lexeme header browser tests

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

Change 509356 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Retry inputs in Lexeme header browser tests

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

Yes, I think so. Will do.

Change 509100 abandoned by Michael Große:
Add nodejs utility to check if new entity is known to search

Reason:
The problem was (hopefully) fix with I7575f2ad34beb0fee1957fab9de6d1ab23dc024b

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

Change 508836 abandoned by Michael Große:
Use util to wait for new item be known in browser test

Reason:
The problem was (hopefully) fixed with I7575f2ad34beb0fee1957fab9de6d1ab23dc024b

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

Change 508834 abandoned by Michael Große:
Add nodejs utility to check if cirrus is up-to-date

Reason:
The problem was (hopefully) fixed with I7575f2ad34beb0fee1957fab9de6d1ab23dc024b

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

Having just checked https://integration.wikimedia.org/ci/view/Selenium/job/selenium-daily-beta-WikibaseLexeme/, tests seem to still be red. Is it the known situation ,or did something break meanwhile?

It is at least still the known situation, see https://integration.wikimedia.org/ci/view/Selenium/job/selenium-daily-beta-WikibaseLexeme/284/artifact/log/shows-Forms-header.png
For the other failures it is hard to tell apart if there was a 500 error or genuine test failure.

There seems to be one message that matches the timestamp:

[XO14d6wQBHcAAH120aYAAABS] /w/index.php?title=Special%3AUserLogin   PHP Fatal Error from line 81 of /srv/mediawiki/wmf-config/InitialiseSettings-labs.php: Cannot redeclare wmfLabsSettings() (previously declared in /srv/mediawiki/wmf-config/InitialiseSettings-labs.php:81)

But there are also a couple of other just seconds around, that might also be responsible.

A shot in a dark but I've noticed quite a few fatals reported on beta wikidata, some of them fitting the time stamps of failing tests

PHP Fatal error: Cannot redeclare wmfLabsSettings() (previously declared in /srv/mediawiki/wmf-config/InitialiseSettings-labs.php:81) in /srv/mediawiki/wmf-config/InitialiseSettings-labs.php on line 81

I will investigate it further.

see T224899 for the above finding. Still not clear whether it is related.

Michael removed Michael as the assignee of this task.Jun 6 2019, 9:45 AM
Michael moved this task from ✅ my work done to 👁️ watching on the User-Michael board.
Addshore moved this task from incoming to in progress on the Wikidata board.Jun 21 2019, 11:28 PM

T230481 might have an effect on this issue, stay tuned