Page MenuHomePhabricator

Get Wikibase + dependencies to run with Quibble
Closed, ResolvedPublic

Description

Following a discussion between @Addshore and @hashar , Wikibase does not play nice with Quibble. The aim of this task is to have the Quibble CI jobs to run Wikibase tests properly.

Dummy change https://gerrit.wikimedia.org/r/#/c/70395/

$ install.php --with-extensions [..]
....
Modifying change_info field of table wb_changes ...done.
Populating wb_property_info
RuntimeException from line 132 of extensions/Wikibase/repo/includes/Store/Sql/PropertyInfoTableBuilder.php: Wikibase\PropertyInfoTableBuilder::rebuildPropertyInfo can not run with no Property namespace defined.
Backtrace:
#0 extensions/Wikibase/repo/includes/Store/Sql/DatabaseSchemaUpdater.php(215): Wikibase\PropertyInfoTableBuilder->rebuildPropertyInfo()
#1 includes/installer/DatabaseUpdater.php(482): Wikibase\Repo\Store\Sql\DatabaseSchemaUpdater::rebuildPropertyInfo(MysqlUpdater)
#2 includes/installer/DatabaseUpdater.php(450): DatabaseUpdater->runUpdates(array, boolean)
#3 maintenance/update.php(200): DatabaseUpdater->doUpdates(array)
#4 maintenance/doMaintenance.php(94): UpdateMediaWiki->execute()
#5 maintenance/update.php(245): require_once(string)
#6 {main}

Event Timeline

hashar created this task.May 30 2018, 8:14 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 30 2018, 8:14 PM

As of May 30th 20:14 UTC, install.php fails with:

$ install.php --with-extensions [..]
....
Modifying change_info field of table wb_changes ...done.
Populating wb_property_info
RuntimeException from line 132 of extensions/Wikibase/repo/includes/Store/Sql/PropertyInfoTableBuilder.php: Wikibase\PropertyInfoTableBuilder::rebuildPropertyInfo can not run with no Property namespace defined.
Backtrace:
#0 extensions/Wikibase/repo/includes/Store/Sql/DatabaseSchemaUpdater.php(215): Wikibase\PropertyInfoTableBuilder->rebuildPropertyInfo()
#1 includes/installer/DatabaseUpdater.php(482): Wikibase\Repo\Store\Sql\DatabaseSchemaUpdater::rebuildPropertyInfo(MysqlUpdater)
#2 includes/installer/DatabaseUpdater.php(450): DatabaseUpdater->runUpdates(array, boolean)
#3 maintenance/update.php(200): DatabaseUpdater->doUpdates(array)
#4 maintenance/doMaintenance.php(94): UpdateMediaWiki->execute()
#5 maintenance/update.php(245): require_once(string)
#6 {main}
Restricted Application added a project: Wikidata. · View Herald TranscriptMay 30 2018, 8:17 PM

T196062 is similar. The repo/autoload.php is not loaded when testing an extension having Wikibase has a dependency.

hashar updated the task description. (Show Details)May 31 2018, 8:35 PM

I think the issue is the Wikibase.php entry point relies on $wgWikimediaJenkinsCI being set. It is injected in LocalSettings.php AFTER the installation is complete. Hence the entry point always skip.

Change 436679 had a related patch set uploaded (by Hashar; owner: Hashar):
[mediawiki/extensions/Wikibase@master] Recognize JENKINS_URL in the entrypoint

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

Change 436679 abandoned by Hashar:
Recognize JENKINS_URL in the entrypoint

Reason:
My bad. install.php does work, but we fail later in update.php because the require_once is done before wgWikimediaJenkinsCI is set.

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

install.php --with-extensions does complete. The LocalSettings.php then has something like:

require_once "$IP/extensions/Wikibase/Wikibase.php";
wfLoadExtension( 'WikibaseQuality' );
wfLoadExtension( 'WikibaseQualityConstraints' );
wfLoadExtension( 'WikiEditor' );
wfLoadExtension( 'WikimediaBadges' );

# End of automatically generated settings.
# Add more configuration options below.

...

$wgWikimediaJenkinsCI = true;

Hence Wikibase.php does not have $wgWikimediaJenkinsCI = true; set yet. Need to be fixed in Quibble somehow.

Also the getenv('JENKINS_URL'); trick from https://gerrit.wikimedia.org/r/436679 does not work because Quibble does not pass the OS environment variables when running update.php:

quibble/mediawiki/maintenance.py
def update(args, mwdir=None):

    update_env = {}
    if mwdir is not None:
        update_env['MW_INSTALL_PATH'] = mwdir

    p = subprocess.Popen(cmd, cwd=mwdir, env=update_env)

Change 437943 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/quibble@master] Prepend mediawiki configuration

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

Change 437943 merged by jenkins-bot:
[integration/quibble@master] Prepend mediawiki configuration

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

Change 437947 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/config@master] docker: quibble 0.0.18

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

Change 437948 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/config@master] Bump Quibble jobs to 0.0.18

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

hashar claimed this task.Jun 7 2018, 10:39 AM

Change 437947 merged by jenkins-bot:
[integration/config@master] docker: quibble 0.0.18

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

Change 437948 merged by jenkins-bot:
[integration/config@master] Bump Quibble jobs to 0.0.18

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

@Addshore first build ever passing https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-hhvm-docker/4766/ \o/

There is a race condition somewhere though. The php7.0 job ended up failling. T191537#4263460

hashar closed this task as Resolved.Jun 20 2018, 8:46 AM

Solved. The last issue was a race condition in MediaWiki core that was triggered by the Selenium tests (T191537)

Vvjjkkii renamed this task from Get Wikibase + dependencies to run with Quibble to iybaaaaaaa.Jul 1 2018, 1:06 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii removed hashar as the assignee of this task.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: gerritbot, Aklapper.
CommunityTechBot renamed this task from iybaaaaaaa to Get Wikibase + dependencies to run with Quibble.Jul 2 2018, 3:46 AM
CommunityTechBot closed this task as Resolved.
CommunityTechBot assigned this task to hashar.
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added subscribers: gerritbot, Aklapper.