Page MenuHomePhabricator

Integration broken on MassMessage
Closed, ResolvedPublicPRODUCTION ERROR

Description

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MassMessage/+/449395 (i18n update) fails on submit.

See https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-hhvm-docker/9212/console :

1) MediaWiki\MassMessage\ApiEditMassMessageListTest::testAdd
BadMethodCallException: Call to a member function getCanonicalServer() on a non-object (null)

extensions/MassMessage/includes/DatabaseLookup.php:29
includes/libs/objectcache/WANObjectCache.php:1242
includes/libs/objectcache/WANObjectCache.php:1115
extensions/MassMessage/includes/DatabaseLookup.php:36
extensions/MassMessage/includes/content/MassMessageListContent.php:324
extensions/MassMessage/includes/content/MassMessageListContent.php:185
includes/content/AbstractContent.php:516
includes/Storage/DerivedPageDataUpdater.php:1240
includes/Storage/DerivedPageDataUpdater.php:1263
includes/Storage/PageUpdater.php:697
includes/page/WikiPage.php:1855
extensions/MassMessage/tests/phpunit/api/ApiEditMassMessageListTest.php:24
tests/phpunit/MediaWikiTestCase.php:469
maintenance/doMaintenance.php:94

All tests contain the same error message: BadMethodCallException: Call to a member function getCanonicalServer() on a non-object (null).

Event Timeline

matej_suchanek triaged this task as Unbreak Now! priority.Jul 31 2018, 8:13 AM

I think there's better tag, but I cannot find it now

hashar added a subscriber: hashar.

Based on the stack trace, could it be an issue with MediaWiki core and the ongoing work on multi content revisions?

It should be preproducible locally via tests/phpunit/phpunit.php --testsuite extensions --group Database. Note CI also injects mediawiki/extensions/LiquidThreads as a dependency.

Change 453424 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/extensions/MassMessage@master] Setup wgCanonicalServer in MassMessageApiTestCase to pass tests

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

The failure is on WikiMap::getWiki( $dbname )->getCanonicalServer(); where the dbname comes from $wgConf->getLocalDatabases()
MassMessageApiTestCase sets that global in setUpBeforeClass

Was fixed somedays ago in T142229 for the normal tests. I have copy over the canonical servers to api, hopefully that fixes the test

This task is from 31. jul - the last patch merged on MassMessage is a version update from some days before - https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/MassMessage/+/448171/

When compare the jenkins output, it seems the last patch runs only PHPUnit extensions testsuite (1457 tests) while now it runs PHPUnit extensions suite without Database group (1546 tests) + PHPUnit extensions suite Database group (Tests: 43), so it is running more than before.

A test config change does the different here. No idea what it is, but I have uploaded a fix, which now passed the tests.

Change 453424 merged by jenkins-bot:
[mediawiki/extensions/MassMessage@master] Setup wgCanonicalServer in MassMessageApiTestCase to pass tests

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

Umherirrender claimed this task.
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:08 PM

Change 653156 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/extensions/MassMessage@REL1_31] Setup wgCanonicalServer in MassMessageApiTestCase to pass tests

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

Change 653156 merged by Umherirrender:
[mediawiki/extensions/MassMessage@REL1_31] Setup wgCanonicalServer in MassMessageApiTestCase to pass tests

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