Page MenuHomePhabricator

wikidata-query-gui-build job broken (unable to resolve dependency tree)
Closed, ResolvedPublic

Description

The wikidata-query-gui-build job is apparently currently broken with a strange npm error:

#26 console

> grunt "create_build"

Running "auto_install:local" (auto_install) task
running npm install --production --no-package-lock on /src...npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: wikidata-query-gui@0.1.4
npm ERR! Found: @wdio/cli@7.7.4
npm ERR! node_modules/@wdio/cli
npm ERR!   dev @wdio/cli@"^7.4.6" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @wdio/cli@"^6.0.1" from @wdio/dot-reporter@6.11.0
npm ERR! node_modules/@wdio/dot-reporter
npm ERR!   dev @wdio/dot-reporter@"^6.11.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /cache/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /cache/_logs/2021-07-12T13_34_37_948Z-debug.log

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Note that the general job / container (not sure which tbh) already installs packages:

+ exec docker run --volume /srv/jenkins/workspace/workspace/wikidata-query-gui-build/src:/src --volume /srv/jenkins/workspace/workspace/wikidata-query-gui-build/cache:/cache --volume /srv/jenkins/workspace/workspace/wikidata-query-gui-build/log:/log --security-opt seccomp=unconfined --init --rm --label jenkins.job=wikidata-query-gui-build --label jenkins.build=26 --env-file /dev/fd/63 docker-registry.wikimedia.org/releng/node12-test-browser:0.0.2 grunt create_build
++ /usr/bin/env
++ egrep -v '^(HOME|SHELL|PATH|LOGNAME|MAIL)='
+ cd /src
+ '[' '!' -f package.json ']'
+ node --version
v12.21.0
+ npm --version
7.5.2
+ '[' -e npm-shrinkwrap.json ']'
+ '[' -e package-lock.json ']'
+ npm ci

added 1209 packages, and audited 1210 packages in 32s

7 vulnerabilities (3 moderate, 4 high)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
+ npm run-script grunt create_build

> wikidata-query-gui@0.1.4 grunt
> grunt "create_build"

Running "auto_install:local" (auto_install) task
running npm install --production --no-package-lock on /src...npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
…

So overall it looks like we’re trying to install dependencies twice, which probably isn’t very useful. I suggest we change the job configuration to run only_build instead of create_build, skipping the auto_install:

Gruntfile.js
grunt.registerTask( 'build', [
    'clean', 'create_build'
] );
grunt.registerTask( 'create_build', [
    'auto_install', 'only_build'
] );
grunt.registerTask( 'only_build', [
    'less', 'copy', 'useminPrepare', 'concat', 'cssmin', 'uglify', 'filerev', 'usemin', 'htmlmin', 'merge-i18n'
] );

Change 704119 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[integration/config@master] Change wikidata-query-gui-build command

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

Change 704124 had a related patch set uploaded (by Ladsgroup; author: Ladsgroup):

[wikidata/query/gui@master] [PoC] Use the correct build command

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

Form me it was this:

amsa@amsa-Latitude-7480:~/gui$ npm run deploy

> wikidata-query-gui@0.1.4 deploy /home/amsa/gui
> grunt deploy

Warning: Task "build-for-deploy" not found. Use --force to continue.

Aborted due to warnings.
npm ERR! code ELIFECYCLE
npm ERR! errno 3
npm ERR! wikidata-query-gui@0.1.4 deploy: `grunt deploy`
npm ERR! Exit status 3
npm ERR! 
npm ERR! Failed at the wikidata-query-gui@0.1.4 deploy script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/amsa/.npm/_logs/2021-07-12T14_23_04_173Z-debug.log

Change 704119 merged by jenkins-bot:

[integration/config@master] jjb: [wikidata-query-gui-build] Use only_build command, not create_build

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

Mentioned in SAL (#wikimedia-releng) [2021-07-12T14:48:36Z] <Amir1> ran $ ./jjb-update 'wikidata-query-gui-build' (T286479)

Looks like the jjb change successfully resolved this.

Change 704124 merged by jenkins-bot:

[wikidata/query/gui@master] Use the correct build command

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