Page MenuHomePhabricator

[Cognate] install fails with BadMethodCallException from line 83 of includes/libs/rdbms/lbfactory/LBFactorySingle.php: Method is not supported.
Closed, ResolvedPublic

Description

Trying to install mediawiki and Cognate with php maintenance/install.php --with-extensions yields:

Creating tables for enabled extensions
[3014dd8e8d79d85637e602f9] [no req]   BadMethodCallException from line 83 of includes/libs/rdbms/lbfactory/LBFactorySingle.php: Method is not supported. 
Backtrace:
#0 extensions/Cognate/src/CognateHooks.php(118): Wikimedia\Rdbms\LBFactorySingle->getExternalLB(NULL)
#1 includes/Hooks.php(174): Cognate\CognateHooks::onLoadExtensionSchemaUpdates(MysqlUpdater)
#2 includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)
#3 includes/installer/DatabaseUpdater.php(127): Hooks::run(string, array)
#4 includes/installer/DatabaseUpdater.php(192): DatabaseUpdater->__construct(Wikimedia\Rdbms\DatabaseMysqli, boolean, NULL) 
#5 includes/installer/DatabaseInstaller.php(312): DatabaseUpdater::newForDB(Wikimedia\Rdbms\DatabaseMysqli)
#6 includes/installer/Installer.php(1552): DatabaseInstaller->createExtensionTables(MysqlInstaller)
#7 includes/installer/CliInstaller.php(137): Installer->performInstallation(array, array)
#8 maintenance/install.php(125): CliInstaller->execute()
#9 maintenance/doMaintenance.php(94): CommandLineInstaller->execute()
#10 maintenance/install.php(175): require_once(string)
#11 {main}

Repro: comment check experimental on the dummy change https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Cognate/+/442292/

Event Timeline

hashar created this task.Jun 27 2018, 2:09 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 27 2018, 2:09 PM

I think the issue is $wgCognateCluster not being initialized to false at install time, eg in the LoadExtensionSchemaUpdates callback.

That would be due to extension registry not loading the extension configuration, an isssue I encountered on:

ExtensionTask
GeoDataT193855
ContributionTrackingT195814

The fix for GeoData is https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/GeoData/+/431013/2/includes/Hooks.php :

function onLoadExtensionSchemaUpdates( .. ) {
    if ( ! isset( $wgGeoDataBackend ) ) {
        $wgGeoDataBackend = 'db';
    }
}

Change 447052 had a related patch set uploaded (by Hashar; owner: Hashar):
[mediawiki/extensions/Cognate@master] Fix table creation via installer

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

hashar claimed this task.Jul 20 2018, 10:31 AM

Change 448368 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/config@master] Migrate Cognate to Quibble

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

Change 448368 merged by jenkins-bot:
[integration/config@master] Migrate Cognate to Quibble

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

Change 447052 merged by jenkins-bot:
[mediawiki/extensions/Cognate@master] Fix table creation via installer

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

hashar closed this task as Resolved.Jul 27 2018, 6:57 AM