Page MenuHomePhabricator

Quibble extension selenium test fails with: gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
Closed, ResolvedPublic

Description

Quibble 0.0.34 now attempts to run selenium-test in extension directories. It does a npm install but that fails at least for MobileFrontend due to:

prebuild-install WARN install No prebuilt binaries found (target=10.15.2 runtime=node arch=x64 platform=linux)
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable

With docker-registry.wikimedia.org/releng/quibble-stretch-hhvm:0.0.34

INFO:quibble.commands:Running webdriver test in /workspace/src/extensions/MobileFrontend

> fibers@3.1.1 install /workspace/src/extensions/MobileFrontend/node_modules/fibers
> node build.js || nodejs build.js

`linux-x64-64-glibc` exists; testing
Binary is fine; exiting

> fibers@3.1.1 install /workspace/src/extensions/MobileFrontend/node_modules/wdio-mocha-framework/node_modules/fibers
> node build.js || nodejs build.js

`linux-x64-64-glibc` exists; testing
Binary is fine; exiting

> iltorb@1.3.10 install /workspace/src/extensions/MobileFrontend/node_modules/iltorb
> detect-libc prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=10.15.2 runtime=node arch=x64 platform=linux)
gyp ERR! configure error 
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at PythonFinder.failNoPython (/srv/npm/node_modules/node-gyp/lib/configure.js:484:19)
gyp ERR! stack     at PythonFinder.<anonymous> (/srv/npm/node_modules/node-gyp/lib/configure.js:406:16)
gyp ERR! stack     at F (/srv/npm/node_modules/which/which.js:68:16)
gyp ERR! stack     at E (/srv/npm/node_modules/which/which.js:80:29)
gyp ERR! stack     at /srv/npm/node_modules/which/which.js:89:16
gyp ERR! stack     at /srv/npm/node_modules/isexe/index.js:42:5
gyp ERR! stack     at /srv/npm/node_modules/isexe/mode.js:8:5
gyp ERR! stack     at FSReqWrap.oncomplete (fs.js:154:21)
gyp ERR! System Linux 4.9.0-0.bpo.8-amd64
gyp ERR! command "/usr/bin/node" "/srv/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /workspace/src/extensions/MobileFrontend/node_modules/iltorb
gyp ERR! node -v v10.15.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! iltorb@1.3.10 install: `detect-libc prebuild-install || node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the iltorb@1.3.10 install 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!     /cache/npm/_logs/2019-07-25T21_52_16_790Z-debug.log
INFO:backend.ChromeWebDriver:Terminating ChromeWebDriver
INFO:backend.Xvfb:Terminating Xvfb
INFO:backend.DevWebServer:Terminating DevWebServer
Traceback (most recent call last):

The reason is the Quibble images does not have python2.7 nor gcc/make etc like releng/node10 does.

Event Timeline

hashar created this task.Jul 25 2019, 10:18 PM
Restricted Application removed a project: Patch-For-Review. · View Herald TranscriptJul 25 2019, 10:18 PM

Change 525673 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/config@master] docker: add python/build-essential to Quibble images

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

hashar claimed this task.Jul 25 2019, 10:25 PM

Change 525673 merged by jenkins-bot:
[integration/config@master] docker: add python/build-essential to Quibble images

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

Change 525674 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/config@master] jjb: switch to quibble 0.0.34 containers (2)

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

Tested with:

docker run --rm -it docker-registry.discovery.wmnet/releng/quibble-stretch-php70:0.0.34-1 --run=selenium mediawiki/extensions/MobileFrontend

Which eventually gives:

INFO:quibble.commands:Running webdriver test in /workspace/src/extensions/MobileFrontend

> iltorb@1.3.10 install /workspace/src/extensions/MobileFrontend/node_modules/iltorb
> detect-libc prebuild-install || node-gyp rebuild

> detect-libc prebuild-install || node-gyp rebuild

prebuild-install WARN install No prebuilt binaries found (target=10.15.2 runtime=node arch=x64 platform=linux)
gyp WARN EACCES user "undefined" does not have permission to access the dev dir "/nonexistent/.node-gyp/10.15.2"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/tmp/.node-gyp"
make: Entering directory '/workspace/src/extensions/MobileFrontend/node_modules/iltorb/build'
  CC(target) Release/obj.target/iltorb/brotli/common/dictionary.o
...

And:

> @ selenium-test /workspace/src/extensions/MobileFrontend
> wdio tests/selenium/wdio.conf.js
...
==================================================================
Number of specs: 2


2 passing (12.70s)

Change 525674 merged by jenkins-bot:
[integration/config@master] jjb: switch to quibble 0.0.34 containers (2)

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

hashar closed this task as Resolved.Jul 25 2019, 11:05 PM

The CI Docker containers missed build-essential and python. Confirmed to be fixed.