Page MenuHomePhabricator

`ERROR: Cannot find module '../../../../Wikibase/repo/tests/selenium` when running WikibaseLexeme-npm-browser-run-selenium-daily-node-6-docker Jenkins job
Closed, ResolvedPublic8 Story Points

Description

WikibaseLexeme-npm-browser-run-selenium-daily-node-6-docker Jenkins job does this:

git clone WikibaseLexeme
npm install
npm run selenium-daily

It fails because WikibaseLexeme repository assumes Wikibase repository will be available at a specific location.

Failures:

ERROR: Cannot find module '../../../Wikibase/repo/tests/selenium/wikibase.api'
ERROR: Cannot find module '../../../../Wikibase/repo/tests/selenium/pagesections/mixinbuilder'
ERROR: Cannot find module '../../../../Wikibase/repo/tests/selenium/wikibase.api'

If code from Wikibase is required to run WikibaseLexeme, then the code should be extracted to a library, like wdio-mediawiki, or by creating wdio-wikibase.

Steps

Related Objects

Event Timeline

The WikibaseLexeme extension can't function without the Wikibase extension loaded anyway, so the browser tests would never pass anyway.

Are we sure we can't just keep this cross extension dependency for the modules?

Addshore triaged this task as Low priority.Aug 8 2018, 9:36 AM

What you say @Addshore is all correct. But hardcoding the directory structure (and name) like done now is a bit evil.

The WikibaseLexeme extension can't function without the Wikibase extension loaded anyway, so the browser tests would never pass anyway.

The Jenkins job (running daily, targeting beta cluster) just clones a repository, runs npm install and npm run selenium-daily. It does not install mediawiki locally, it targets a wiki at beta cluster. So, selenium tests would pass if WikibaseLexeme did not use files from Wikibase directly, but instead used an NPM library.

hardcoding the directory structure (and name) like done now is a bit evil.

Agreed. Even if you decide you don't care about running tests targeting beta cluster, hard-coding paths to files from another repository is a code smell.

Lucas_Werkmeister_WMDE raised the priority of this task from Low to Normal.Nov 14 2018, 7:27 PM

A failing daily CI job should be higher priority than “low”, in my opinion. Fixing this doesn’t sound too difficult, just a bit cumbersome (split off a new NPM package), so let’s try to pick it up soon.

Addshore updated the task description. (Show Details)Dec 4 2018, 2:48 PM
Addshore set the point value for this task to 8.
WMDE-leszek updated the task description. (Show Details)Dec 4 2018, 2:58 PM
Addshore updated the task description. (Show Details)Dec 4 2018, 3:09 PM
Addshore updated the task description. (Show Details)
Addshore updated the task description. (Show Details)

Change 478017 had a related patch set uploaded (by Greta WMDE; owner: Greta Doçi):
[mediawiki/extensions/Wikibase@master] Extract wdio-wikibase package

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

Change 479470 had a related patch set uploaded (by Greta WMDE; owner: Greta Doçi):
[mediawiki/extensions/Wikibase@master] Add empty wdio-wikibase npm package

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

Change 479471 had a related patch set uploaded (by Greta WMDE; owner: Greta Doçi):
[mediawiki/extensions/WikibaseLexeme@master] Adjust for wdio-wikibase extraction

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

Change 479470 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Add empty wdio-wikibase npm package

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

Addshore moved this task from incoming to in progress on the Wikidata board.Dec 19 2018, 12:47 PM
Addshore added a subscriber: Greta_Doci_WMDE.

Change 482314 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/WikibaseLexeme@master] Remove legacy location for wdio-wikibase files

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

Change 479471 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Adjust for wdio-wikibase extraction

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

Change 478017 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Extract wdio-wikibase package

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

Addshore updated the task description. (Show Details)Jan 4 2019, 4:21 PM

Step #1 completed, this still needs to be submitted to npm as a package though so that Lexeme can install it as part of its setup :) (thats #2)

Change 482323 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/Wikibase@master] Make wdio-wikibase package be in wmde org

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

Addshore updated the task description. (Show Details)Jan 4 2019, 4:59 PM

Change 482323 abandoned by Addshore:
Make wdio-wikibase package be in wmde org

Reason:
not needed

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

Change 482326 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/WikibaseLexeme@master] Add wdio-wikibase to npm dev deps

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

Once https://gerrit.wikimedia.org/r/482326 is merged we can try the daily job again.

Addshore claimed this task.Jan 4 2019, 5:04 PM
Addshore added a subscriber: Tarrow.
Restricted Application added a project: User-Addshore. · View Herald TranscriptJan 4 2019, 5:04 PM

Change 482314 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Remove legacy location for wdio-wikibase files

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

Change 482326 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Add wdio-wikibase to npm dev deps

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

Failed still, with:

17:26:49 ERROR: Cannot find module '../../../../Wikibase/repo/tests/selenium/wdio-wikibase/pagesections/mixinbuilder'

but the package did correctly install at the npm install step..

will resume on Monday....

Change 482616 had a related patch set uploaded (by WMDE-leszek; owner: WMDE-leszek):
[mediawiki/extensions/Wikibase@master] Export all JS files to the wdio-wikibase npm package.

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

Change 482616 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Export all JS files to the wdio-wikibase npm package.

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

Change 482632 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/extensions/WikibaseLexeme@master] package.json wdio-wikibase": "^0.2.0"

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

Change 482632 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] package.json wdio-wikibase": "^0.2.0"

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

hashar added a subscriber: hashar.Jan 7 2019, 1:26 PM

Thanks for the implementation of wdio-wikibase :)

WMDE-leszek updated the task description. (Show Details)Jan 7 2019, 3:42 PM

Change 486852 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseLexeme@master] Remove transitional code

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

Change 486852 had a related patch set uploaded (by Michael Große; owner: Lucas Werkmeister (WMDE)):
[mediawiki/extensions/WikibaseLexeme@master] Remove transitional code

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

Change 486852 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Remove transitional code

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