Page MenuHomePhabricator

Qunit tests fail on REL1_31 and REL1_34 due to [404]: //index.php?title=Special:JavaScriptTest/qunit/export
Closed, ResolvedPublic

Description

Seen on REL1_31 and REL1_34

Reproducible with:

ZUUL_BRANCH=REL1_31 quibble --run=qunit

https://gerrit.wikimedia.org/r/c/mediawiki/core/+/628807
https://integration.wikimedia.org/ci/job/mediawiki-quibble-composer-mysql-php72-docker/15262/console

14:02:06 Running "assert-mw-env" task
14:02:06 
14:02:06 Running "karma:main" (karma) task
14:02:06 21 09 2020 13:02:06.173:DEBUG [config]: No config file specified.
14:02:06 21 09 2020 13:02:06.177:WARN [config]: "/" is proxied, you should probably change urlRoot to avoid conflicts
14:02:06 21 09 2020 13:02:06.178:DEBUG [plugin]: Loading karma-* from /workspace/src/node_modules
14:02:06 21 09 2020 13:02:06.179:DEBUG [plugin]: Loading plugin /workspace/src/node_modules/karma-chrome-launcher.
14:02:06 21 09 2020 13:02:06.189:DEBUG [plugin]: Loading plugin /workspace/src/node_modules/karma-firefox-launcher.
14:02:06 21 09 2020 13:02:06.190:DEBUG [plugin]: Loading plugin /workspace/src/node_modules/karma-mocha-reporter.
14:02:06 21 09 2020 13:02:06.194:DEBUG [plugin]: Loading plugin /workspace/src/node_modules/karma-qunit.
14:02:06 21 09 2020 13:02:06.201:DEBUG [web-server]: Instantiating middleware
14:02:06 21 09 2020 13:02:06.202:DEBUG [reporter]: Trying to load reporter: mocha
14:02:06 21 09 2020 13:02:06.203:DEBUG [reporter]: Trying to load color-version of reporter: mocha (mocha_color)
14:02:06 21 09 2020 13:02:06.203:DEBUG [reporter]: Couldn't load color-version.
14:02:06 
14:02:06 START:
14:02:06 21 09 2020 13:02:06.228:INFO [karma]: Karma v1.7.1 server started at http://0.0.0.0:9876/
14:02:06 21 09 2020 13:02:06.229:INFO [launcher]: Launching browser Chrome with unlimited concurrency
14:02:06 21 09 2020 13:02:06.234:INFO [launcher]: Starting browser Chrome
14:02:06 21 09 2020 13:02:06.235:DEBUG [temp-dir]: Creating temp dir at /tmp/karma-57273898
14:02:06 21 09 2020 13:02:06.235:DEBUG [launcher]: /usr/bin/chromium --user-data-dir=/tmp/karma-57273898 --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-background-timer-throttling --disable-renderer-backgrounding --disable-device-discovery-notifications http://localhost:9876/?id=57273898
14:02:06 21 09 2020 13:02:06.555:DEBUG [web-server]: serving: /workspace/src/node_modules/karma/static/client.html
14:02:06 21 09 2020 13:02:06.596:DEBUG [web-server]: serving: /workspace/src/node_modules/karma/static/karma.js
14:02:06 21 09 2020 13:02:06.721:DEBUG [karma]: A browser has connected on socket B93P9JRabKXBPzvXAAAA
14:02:06 21 09 2020 13:02:06.726:DEBUG [web-server]: upgrade /socket.io/?EIO=3&transport=websocket&sid=B93P9JRabKXBPzvXAAAA
14:02:06 21 09 2020 13:02:06.726:DEBUG [proxy]: NOT upgrading proxyWebSocketRequest /socket.io/?EIO=3&transport=websocket&sid=B93P9JRabKXBPzvXAAAA
14:02:06 21 09 2020 13:02:06.765:INFO [HeadlessChrome 73.0.3683 (Linux 0.0.0)]: Connected on socket B93P9JRabKXBPzvXAAAA with id 57273898
14:02:06 21 09 2020 13:02:06.765:DEBUG [launcher]: Chrome (id 57273898) captured in 0.536 secs
14:02:06 21 09 2020 13:02:06.781:DEBUG [middleware:karma]: custom files null null null
14:02:06 21 09 2020 13:02:06.781:DEBUG [middleware:karma]: Serving static request /context.html
14:02:06 21 09 2020 13:02:06.783:DEBUG [web-server]: serving: /workspace/src/node_modules/karma/static/context.html
14:02:06 21 09 2020 13:02:06.819:DEBUG [web-server]: serving: /workspace/src/node_modules/karma/static/context.js
14:02:06 21 09 2020 13:02:06.821:DEBUG [middleware:source-files]: Requesting /base/node_modules/qunit/qunit/qunit.js?1c26b83fd85120f9185b71f3f7756e108979a1ee /
14:02:06 21 09 2020 13:02:06.821:DEBUG [middleware:source-files]: Fetching /workspace/src/node_modules/qunit/qunit/qunit.js
14:02:06 21 09 2020 13:02:06.821:DEBUG [middleware:source-files]: Requesting /base/node_modules/karma-qunit/lib/adapter.js?6d813a0423cabca52af06372da1bbbb7b186e129 /
14:02:06 21 09 2020 13:02:06.821:DEBUG [middleware:source-files]: Fetching /workspace/src/node_modules/karma-qunit/lib/adapter.js
14:02:06 21 09 2020 13:02:06.822:DEBUG [web-server]: serving (cached): /workspace/src/node_modules/qunit/qunit/qunit.js
14:02:06 21 09 2020 13:02:06.823:DEBUG [web-server]: serving (cached): /workspace/src/node_modules/karma-qunit/lib/adapter.js
14:02:07 INFO:backend.DevWebServer:[Mon Sep 21 13:02:07 2020] 127.0.0.1:33920 [404]: //index.php?title=Special:JavaScriptTest/qunit/export
14:02:07 
14:02:07 Finished in 0.004 secs / 0 secs @ 13:02:07 GMT+0000 (GMT)
14:02:07 
14:02:07 SUMMARY:
14:02:07 ✔ 0 tests completed
14:02:07 21 09 2020 13:02:07.129:DEBUG [karma]: Run complete, exiting.
14:02:07 21 09 2020 13:02:07.130:DEBUG [launcher]: Disconnecting all browsers
14:02:07 21 09 2020 13:02:07.140:DEBUG [launcher]: Process Chrome exited with code 0
14:02:07 21 09 2020 13:02:07.140:DEBUG [temp-dir]: Cleaning temp dir /tmp/karma-57273898
14:02:07 21 09 2020 13:02:07.152:DEBUG [launcher]: Finished all browsers
14:02:07 Warning: Task "karma:main" failed. Use --force to continue.
14:02:07 
14:02:07 Aborted due to warnings.
14:02:07 INFO:quibble.commands:<<< Finish: Run Qunit tests, in 2.570 s
14:02:07 INFO:backend.ChromeWebDriver:Terminating ChromeWebDriver
14:02:07 INFO:backend.Xvfb:Terminating Xvfb
14:02:07 INFO:backend.DevWebServer:Terminating DevWebServer
14:02:07 INFO:backend.MySQL:Terminating MySQL
14:02:09 Traceback (most recent call last):
14:02:09   File "/usr/local/bin/quibble", line 11, in <module>
14:02:09     load_entry_point('quibble==0.0.45', 'console_scripts', 'quibble')()
14:02:09   File "/usr/local/lib/python3.5/dist-packages/quibble/cmd.py", line 531, in main
14:02:09     cmd.execute(plan, dry_run=args.dry_run)
14:02:09   File "/usr/local/lib/python3.5/dist-packages/quibble/cmd.py", line 336, in execute
14:02:09     quibble.commands.execute_command(command)
14:02:09   File "/usr/local/lib/python3.5/dist-packages/quibble/commands.py", line 23, in execute_command
14:02:09     command.execute()
14:02:09   File "/usr/local/lib/python3.5/dist-packages/quibble/commands.py", line 651, in execute
14:02:09     env=karma_env,
14:02:09   File "/usr/lib/python3.5/subprocess.py", line 271, in check_call
14:02:09     raise CalledProcessError(retcode, cmd)
14:02:09 subprocess.CalledProcessError: Command '['./node_modules/.bin/grunt', 'qunit']' returned non-zero exit status 3
14:02:11 Build step 'Execute shell' marked build as failure

Event Timeline

Reedy triaged this task as High priority.Sep 21 2020, 1:11 PM

Marking high as it's resulting in V-1 on numerous release branches

Reedy renamed this task from karma-main Couldn't load color-version. to karma-main Couldn't load color-version in mediawiki-quibble-composer-mysql-php72-docker.Sep 21 2020, 2:57 PM

Seems to only fail in mediawiki-quibble-composer-mysql-php72-docker, mediawiki-quibble-composer-mysql-php73-docker is ok...

The karma qunit encounters a 404 when reaching Special:JavaScriptTest:

14:02:07 INFO:backend.DevWebServer:[Mon Sep 21 13:02:07 2020] 127.0.0.1:33920 [404]: //index.php?title=Special:JavaScriptTest/qunit/export

:-\

hashar renamed this task from karma-main Couldn't load color-version in mediawiki-quibble-composer-mysql-php72-docker to Qunit tests fail on REL1_31 and REL1_34 due to [404]: //index.php?title=Special:JavaScriptTest/qunit/export.Sep 21 2020, 3:10 PM

That is 100% due to Quibble 0.0.45 which I have deployed earlier today. git bisect points at 65dafd891596d9189e08dee08316daffead81387 which removes a bunch MediaWiki settings that were hardcoded in Quibble and should nowadays be in includes/DevelopmentSettings.php.

It notably drops $wgEnableJavaScriptTest = true which is in mediawiki/core since 880938593eb3528eacace50c229c7d780f879b2e and will be in 1.35.0. No idea why it never got enabled before. T247285

So I guess we just have to backport that patch on all supported branches.

Change 628813 had a related patch set uploaded (by Hashar; owner: Kosta Harlan):
[mediawiki/core@REL1_31] DevelopmentSettings: Set EnableJavaScriptTest to true

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

Change 628814 had a related patch set uploaded (by Hashar; owner: Kosta Harlan):
[mediawiki/core@REL1_34] DevelopmentSettings: Set EnableJavaScriptTest to true

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

Note: the same Quibble patches also dropped $wgAutoloadAttemptLowercase = false cause it is now the default in mediawiki/core. REL1_31 and REL1_34 have $wgAutoloadAttemptLowercase = true; via DefaultSettings.php which we might want to set to false in include/DevelopmentSettings.php to restore the behavior.

Change 628813 merged by jenkins-bot:
[mediawiki/core@REL1_31] DevelopmentSettings: Set EnableJavaScriptTest to true

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

Change 628814 merged by jenkins-bot:
[mediawiki/core@REL1_34] DevelopmentSettings: Set EnableJavaScriptTest to true

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

Reedy assigned this task to hashar.

Thanks hashar!