Page MenuHomePhabricator

wmf-21 Wikibase phpunit tests are failing
Closed, ResolvedPublic

Description

It seems that something broke the Wikibase phpunit tests on the wmf-21 branch. See https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/648283

https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php72-noselenium-docker/53249/console

10:16:36 There was 1 error:
10:16:36 
10:16:36 1) Wikibase\Repo\Tests\Hooks\HtmlPageLinkRendererEndHookHandlerTest::testDoHtmlPageLinkRendererBegin_itemIsRedirected
10:16:36 Undefined index: href
10:16:36 
10:16:36 /workspace/src/extensions/Wikibase/repo/tests/phpunit/includes/Hooks/HtmlPageLinkRendererEndHookHandlerTest.php:212
10:16:36 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:437
10:16:36 /workspace/src/maintenance/doMaintenance.php:106
10:16:36 === Logs generated by test case
10:16:36 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
10:16:36 ===
10:16:36 
10:16:36 --
10:16:36 
10:16:36 There were 13 failures:
10:16:36 
10:16:36 1) Wikibase\Repo\Tests\Hooks\HtmlPageLinkRendererEndHookHandlerTest::testDoHtmlPageLinkRendererBegin_validContext with data set "Special page" (RequestContext Object (...))
10:16:36 Failed asserting that 'Q1' is an instance of class "HtmlArmor".
10:16:36 
10:16:36 /workspace/src/extensions/Wikibase/repo/tests/phpunit/includes/Hooks/HtmlPageLinkRendererEndHookHandlerTest.php:43
10:16:36 /workspace/src/tests/phpunit/MediaWikiIntegrationTestCase.php:437
10:16:36 /workspace/src/maintenance/doMaintenance.php:106
10:16:36 === Logs generated by test case
10:16:36 [objectcache] [debug] MainWANObjectCache using store {class} {"class":"EmptyBagOStuff"}
10:16:36 ===
// twelve more HtmlPageLinkRendererEndHookHandlerTest failures

This makes back-porting fixes harder and so it would be great if we could figure out what is going on and fix it

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Michael updated the task description. (Show Details)

Seems to be T269608 – the fixes aren’t on wmf.21, I guess.

Seems to be T269608 – the fixes aren’t on wmf.21, I guess.

Shall we backport? It'll block merging incident-related backports (in case we need to), since Wikibase is applied in core patches too, this seems important.

Seems to be T269608 – the fixes aren’t on wmf.21, I guess.

Shall we backport? It'll block merging incident-related backports (in case we need to), since Wikibase is applied in core patches too, this seems important.

Yeah, I created the patch: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/649317

Though it is probably enough to merge it. No need to touch production for a disabled test, right?

It needs to be rebased on deploy1001, otherwise fine. I can do it. Let's wait to see if jenkins is happy.

Ladsgroup assigned this task to Michael.

Thanks! rebased on deploy1001

Thanks! rebased on deploy1001

Thanks!

Michael reopened this task as Open.EditedDec 14 2020, 7:22 PM
Michael removed Michael as the assignee of this task.

For some reason, the backported patch fails on Travis CI: https://travis-ci.org/github/wikimedia/Wikibase/builds/749612977

+php maintenance/update.php --quick

PHP Warning:  require_once(/home/travis/build/wikimedia/phase3/extensions/Wikibase/Wikibase.php): failed to open stream: No such file or directory in /home/travis/build/wikimedia/phase3/LocalSettings.php on line 142
PHP Stack trace:
PHP   1. {main}() /home/travis/build/wikimedia/phase3/maintenance/update.php:0
PHP   2. require_once() /home/travis/build/wikimedia/phase3/maintenance/update.php:253
PHP   3. require_once() /home/travis/build/wikimedia/phase3/maintenance/doMaintenance.php:90
PHP   4. require_once() /home/travis/build/wikimedia/phase3/includes/Setup.php:143

Warning: require_once(/home/travis/build/wikimedia/phase3/extensions/Wikibase/Wikibase.php): failed to open stream: No such file or directory in /home/travis/build/wikimedia/phase3/LocalSettings.php on line 142

Call Stack:
    0.0004     450608   1. {main}() /home/travis/build/wikimedia/phase3/maintenance/update.php:0
    0.0025     741856   2. require_once('/home/travis/build/wikimedia/phase3/maintenance/doMaintenance.php') /home/travis/build/wikimedia/phase3/maintenance/update.php:253
    0.0034     897504   3. require_once('/home/travis/build/wikimedia/phase3/includes/Setup.php') /home/travis/build/wikimedia/phase3/maintenance/doMaintenance.php:90
    0.0229    4162736   4. require_once('/home/travis/build/wikimedia/phase3/LocalSettings.php') /home/travis/build/wikimedia/phase3/includes/Setup.php:143

PHP Fatal error:  require_once(): Failed opening required '/home/travis/build/wikimedia/phase3/extensions/Wikibase/Wikibase.php' (include_path='/home/travis/build/wikimedia/phase3/vendor/pear/console_getopt:/home/travis/build/wikimedia/phase3/vendor/pear/mail:/home/travis/build/wikimedia/phase3/vendor/pear/mail_mime:/home/travis/build/wikimedia/phase3/vendor/pear/net_smtp:/home/travis/build/wikimedia/phase3/vendor/pear/net_socket:/home/travis/build/wikimedia/phase3/vendor/pear/net_url2:/home/travis/build/wikimedia/phase3/vendor/pear/pear-core-minimal/src:/home/travis/build/wikimedia/phase3/vendor/pear/pear_exception:.:/home/travis/.phpenv/versions/7.2.27/share/pear') in /home/travis/build/wikimedia/phase3/LocalSettings.php on line 142
PHP Stack trace:
PHP   1. {main}() /home/travis/build/wikimedia/phase3/maintenance/update.php:0
PHP   2. require_once() /home/travis/build/wikimedia/phase3/maintenance/update.php:253
PHP   3. require_once() /home/travis/build/wikimedia/phase3/maintenance/doMaintenance.php:90
PHP   4. require_once() /home/travis/build/wikimedia/phase3/includes/Setup.php:143

Fatal error: require_once(): Failed opening required '/home/travis/build/wikimedia/phase3/extensions/Wikibase/Wikibase.php' (include_path='/home/travis/build/wikimedia/phase3/vendor/pear/console_getopt:/home/travis/build/wikimedia/phase3/vendor/pear/mail:/home/travis/build/wikimedia/phase3/vendor/pear/mail_mime:/home/travis/build/wikimedia/phase3/vendor/pear/net_smtp:/home/travis/build/wikimedia/phase3/vendor/pear/net_socket:/home/travis/build/wikimedia/phase3/vendor/pear/net_url2:/home/travis/build/wikimedia/phase3/vendor/pear/pear-core-minimal/src:/home/travis/build/wikimedia/phase3/vendor/pear/pear_exception:.:/home/travis/.phpenv/versions/7.2.27/share/pear') in /home/travis/build/wikimedia/phase3/LocalSettings.php on line 142

Call Stack:
    0.0004     450608   1. {main}() /home/travis/build/wikimedia/phase3/maintenance/update.php:0
    0.0025     741856   2. require_once('/home/travis/build/wikimedia/phase3/maintenance/doMaintenance.php') /home/travis/build/wikimedia/phase3/maintenance/update.php:253
    0.0034     897504   3. require_once('/home/travis/build/wikimedia/phase3/includes/Setup.php') /home/travis/build/wikimedia/phase3/maintenance/doMaintenance.php:90
    0.0229    4162736   4. require_once('/home/travis/build/wikimedia/phase3/LocalSettings.php') /home/travis/build/wikimedia/phase3/includes/Setup.php:143

Let’s leave the Travis CI tests alone for a bit until we’ve figured out what to do with them in T270158: [12h] Decide on the "secondary" CI for Wikibase code repository. (Travis CI failures shouldn’t block production backports, so they’re less urgent than WMF Jenkins failures, I think.)

Lucas_Werkmeister_WMDE claimed this task.

Travis CI seems to have recovered on its own (the latest release branches are green). Nothing more to do here, I think.