Page MenuHomePhabricator

SpecialPageFatalTest::testSpecialPageDoesNotFatal
Closed, ResolvedPublic

Description

Seen on https://gerrit.wikimedia.org/r/c/mediawiki/extensions/PageTriage/+/902549 / https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php74-noselenium-docker/92005/console

06:51:00 There was 1 error:
06:51:00 
06:51:00 1) SpecialPageFatalTest::testSpecialPageDoesNotFatal
06:51:00 Headers already sent, should send headers earlier than wfHttpError [Called from MediaWiki\Request\HeaderCallback::warnIfHeadersSent in /workspace/src/includes/Request/HeaderCallback.php at line 87]
06:51:00 
06:51:00 /workspace/src/includes/debug/MWDebug.php:508
06:51:00 /workspace/src/includes/debug/MWDebug.php:198
06:51:00 /workspace/src/includes/Request/HeaderCallback.php:87
06:51:00 /workspace/src/includes/libs/HttpStatus.php:104
06:51:00 /workspace/src/includes/GlobalFunctions.php:1281
06:51:00 /workspace/src/includes/specials/SpecialRunJobs.php:66
06:51:00 /workspace/src/tests/phpunit/includes/specials/SpecialPageExecutor.php:117
06:51:00 /workspace/src/tests/phpunit/includes/specials/SpecialPageExecutor.php:46
06:51:00 /workspace/src/tests/phpunit/structure/SpecialPageFatalTest.php:40
06:51:00 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:522

Blocking CI for PageTriage.

Event Timeline

kostajh triaged this task as Unbreak Now! priority.Mar 30 2023, 9:46 AM
kostajh created this task.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
kostajh added a subscriber: hashar.

https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php74-selenium-docker/33432/artifact/log/Special%253ANewPagesFeed-is-configured-correctly-2023-03-30T06-20-00-202Z.mp4

It looks like the issue is actually with CentralAuth, due to this core change rMW2016418bc519: Make $wgHooks trigger deprecation warnings.:

2023-03-30 06:19:44 e52e31e4c22f wikidb: [6440cc70db3ea8c15883149f] [no req]   PHP Deprecated: Accessing $wgHooks directly is deprecated, use HookContainer::getHandlers() or HookContainer::register() instead. [Called from MediaWiki\Extension\CentralAuth\CentralAuthHooks::onRunExtensionFunctions]
#0 [internal function]: MWExceptionHandler::handleError()
#1 /workspace/src/includes/debug/MWDebug.php(382): trigger_error()
#2 /workspace/src/includes/debug/MWDebug.php(353): MWDebug::sendRawDeprecated()
#3 /workspace/src/includes/GlobalFunctions.php(792): MWDebug::deprecatedMsg()
#4 /workspace/src/includes/HookContainer/FauxGlobalHookArray.php(49): wfDeprecatedMsg()
#5 /workspace/src/extensions/CentralAuth/includes/CentralAuthHooks.php(147): MediaWiki\HookContainer\FauxGlobalHookArray->offsetGet()
#6 /workspace/src/includes/Setup.php(562): MediaWiki\Extension\CentralAuth\CentralAuthHooks::onRunExtensionFunctions()
#7 /workspace/src/maintenance/doMaintenance.php(83): require_once(string)
#8 /workspace/src/maintenance/update.php(317): require_once(string)
#9 {main}

image.png (474×2 px, 482 KB)

It's kind of unfortunate that this error appears in mw-error.log, but is not output in the console output for the selenium or non-selenium jobs. I found it by watching a video for a failed test, then realizing that mw-error.log was populated. @hashar maybe we could get Quibble to copy/paste mw-error.log into the job output?

Change 904453 had a related patch set uploaded (by Kosta Harlan; author: Daniel Kinzler):

[mediawiki/extensions/CentralAuth@master] Use HookContainer to register hooks

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

Change 904453 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@master] Use HookContainer to register hooks

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

The error is shown in the output (at least for phpunit test). The error happen when phpunit setup is running, so the error about $wgHooks is shown at the begin of the phpunit run.
For the selenium tests the error produce invalid json and only the error about the json is shown in the logs

06:50:11 INFO:quibble.commands:>>> Start: PHPUnit extensions suite (without database or standalone)
06:50:11 INFO:quibble.commands:PHPUnit extensions suite (without database or standalone)
06:50:11 INFO:quibble.commands:composer run --timeout=0 phpunit:entrypoint -- --testsuite extensions --exclude-group Broken,ParserFuzz,Stub,Database,Standalone
06:50:11 > php tests/phpunit/phpunit.php '-c' 'tests/phpunit/suite.xml' '--testsuite' 'extensions' '--exclude-group' 'Broken,ParserFuzz,Stub,Database,Standalone'
06:50:12 
06:50:12 Deprecated: Accessing $wgHooks directly is deprecated, use HookContainer::getHandlers() or HookContainer::register() instead. [Called from MediaWiki\Extension\CentralAuth\CentralAuthHooks::onRunExtensionFunctions in /workspace/src/extensions/CentralAuth/includes/CentralAuthHooks.php at line 147] in /workspace/src/includes/debug/MWDebug.php on line 382
06:50:12 PHP Deprecated:  Accessing $wgHooks directly is deprecated, use HookContainer::getHandlers() or HookContainer::register() instead. [Called from MediaWiki\Extension\CentralAuth\CentralAuthHooks::onRunExtensionFunctions in /workspace/src/extensions/CentralAuth/includes/CentralAuthHooks.php at line 147] in /workspace/src/includes/debug/MWDebug.php on line 382
06:50:12 Using PHP 7.4.33
06:50:12 PHPUnit 9.5.28 by Sebastian Bergmann and contributors.
06:50:15 
06:50:15 ...........................................................    59 / 10052 (  0%)

Change 905980 had a related patch set uploaded (by Jforrester; author: Daniel Kinzler):

[mediawiki/extensions/CentralAuth@REL1_40] Use HookContainer to register hooks

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

Change 905980 merged by jenkins-bot:

[mediawiki/extensions/CentralAuth@REL1_40] Use HookContainer to register hooks

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