Page MenuHomePhabricator

In CI, local wiki ID is not found in the sites table
Closed, DuplicatePublic



2016-03-03 18:31:07 integration-slave-trusty-1006 jenkins_u1_mw: [e812b46f] /jenkins-mwext-mw-selenium-composer-2033/index.php/Special:BlankPage
ErrorException from line 300 of /mnt/jenkins-workspace/workspace/mwext-mw-selenium-composer/src/includes/debug/MWDebug.php:
PHP Notice: Cannot find site jenkins_u1_mw in sites table [Called from Wikibase\Client\WikibaseClient::newSiteGroup
in /mnt/jenkins-workspace/workspace/mwext-mw-selenium-composer/src/extensions/Wikibase/client/includes/WikibaseClient.php at line 611]

One possible fix would be T126596: During update.php (and install), add an entry in the sites table / SiteStore for the local wiki. However, the problem should not arise at all: WikibaseClinet::newSiteGroup() loks for the siteGroup setting. If it's not there, it looks for the siteGlobalID setting, and tries to look up the local wiki in the sites table based on that ID. So, we should be able to fix this by:

  • making site siteGroup is set for CI runs. Adding it to WikibaseClient.example.php should be sufficient. It's however unclear if should really be set in the exampe settings. Typical installs should not have this set.
  • making siteGlobalID something that can actually be found in the sites table. According to WikibaseClient.example.php, siteGlobalID should be "mywiki". However, this does not seem to be the case, since we find this in the logs:

    [Wikibase\SettingsArray] getSetting: setting siteGlobalID was given as a closure, resolve it to 'jenkins_u1_mw'


That would indicate that no example settings got loaded, and the extension is relying on default setting alone.

Investigation is needed to determine what is actually happening, and how to best fix it.

Event Timeline

daniel triaged this task as High priority.Mar 3 2016, 7:52 PM
daniel added subscribers: aude, JanZerebecki.

Bumping to high, since this happens for all repos that run tests against wikibase, some of which fail on warning like this.

I tried adding the group in with no effect. It seems like example settings are not loaded by the mwext-mw-selenium-composer job.

Verified that the top level entry point (Wikibase.php) gets loaded by putting die() at the top of the file:

Verified that the top level entry point (Wikibase.php) goes into the branch that has

require_once __DIR__ . '/client/ExampleSettings.php';


So apparently, the mwext-mw-selenium-composer job doesn't hit the die() in WikibaseClient.example.php, even though the branch that should include the example settings does get hit. What the hell?


Oh duh!

From WikibaseClient.example.php:

  // NOTE: If this wiki also runs the Wikibase repo extension,
  //       stop and just use the defaults for settings.
  if ( defined( 'WB_VERSION' ) ) {

Change 274792 had a related patch set uploaded (by Daniel Kinzler):
Provide config ovberrides for Jenkins

JanZerebecki lowered the priority of this task from High to Low.Mar 4 2016, 2:20 PM

No job know to me fails because of this notice. Please change and add a link if you know of one.

No job know to me fails because of this notice. Please change and add a link if you know of one.

@Krinkle can you explain again why this is blocking you?

Change 274792 merged by jenkins-bot:
Add a config override for siteGroup