Page MenuHomePhabricator

[ReadingLists] No registered builder available for ReadingLists.
Closed, ResolvedPublic

Description

With MediaWiki master and ReadingLists extension, when I run the installer with install.php --with-extensions the install dies:

Creating main page with default content
done
Creating tables for enabled extensions
[2edde77b0e3b7c7ba288782b] [no req]   ConfigException from line 136 of includes/config/ConfigFactory.php: No registered builder available for ReadingLists.
Backtrace:
#0 extensions/ReadingLists/src/Utils.php(40): ConfigFactory->makeConfig(string)
#1 extensions/ReadingLists/src/HookHandler.php(43): MediaWiki\Extensions\ReadingLists\Utils::isCentralWiki(MediaWiki\MediaWikiServices)
#2 includes/Hooks.php(174): MediaWiki\Extensions\ReadingLists\HookHandler::onLoadExtensionSchemaUpdates(MysqlUpdater)
#3 includes/Hooks.php(202): Hooks::callHook(string, array, array, NULL)
#4 includes/installer/DatabaseUpdater.php(127): Hooks::run(string, array)
#5 includes/installer/DatabaseUpdater.php(192): DatabaseUpdater->__construct(Wikimedia\Rdbms\DatabaseMysqli, boolean, NULL) 
#6 includes/installer/DatabaseInstaller.php(312): DatabaseUpdater::newForDB(Wikimedia\Rdbms\DatabaseMysqli)
#7 includes/installer/Installer.php(1544): DatabaseInstaller->createExtensionTables(MysqlInstaller)
#8 includes/installer/CliInstaller.php(137): Installer->performInstallation(array, array)
#9 maintenance/install.php(125): CliInstaller->execute()
#10 maintenance/doMaintenance.php(94): CommandLineInstaller->execute()
#11 maintenance/install.php(175): require_once(string)
#12 {main}

The GoogleLogin has the same issue and T196173 has a bit more details. Namely that when the installer runs the LoadExtensionSchemaUpdates hook, the extension registry configuration is intentionally NOT loaded.

To reproduce on CI: comment check experimental on a change made to ReadingLists. A job containing "quibble" will fail with the issue.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Tgr added subscribers: Legoktm, Tgr.Jun 6 2018, 5:27 PM

I don't agree with @Legoktm's assessment in T196173#4252779. Why would an extension create tables that it is not going to use? IMO a better solution for this is to load configuration (but nothing else) for each extension in the installer.

hashar changed the task status from Open to Stalled.Jun 6 2018, 9:47 PM

Lets stall this task for now and keep the discussion on the GoogleLogin one T196173. Or maybe I should merge this ReadingLists task into the GoogleLogin one. My fault entirely for the fragmentation :/

I don't agree with @Legoktm's assessment in T196173#4252779. Why would an extension create tables that it is not going to use? IMO a better solution for this is to load configuration (but nothing else) for each extension in the installer.

You'd end up with exactly the same result. ReadingListsCentralWiki defaults to false, so all the tables get created anyways. This hook has never supported reading configuration variables at the time of installation (previously only used by the web installer). Now the CLI installer enforces that as well, which is great. In the future it's unlikely the extension will even be loaded to create database tables.

Tgr added a comment.Jun 7 2018, 5:49 AM

You'd end up with exactly the same result. ReadingListsCentralWiki defaults to false, so all the tables get created anyways.

Which is the expected behavior as the installer creates a single wiki so it is always the central one. The point is, it won't create the tables on every wiki every time the updater is run.

GlobalPreferences has a similar issue (T198330)

GoogleLogin extension had it fixed by always adding the table to the database ( https://gerrit.wikimedia.org/r/437792 ). So maybe the same approach should be used for GlobalPreferences and this ReadingLists ?

Vvjjkkii renamed this task from [ReadingLists] No registered builder available for ReadingLists. to 4ibaaaaaaa.Jul 1 2018, 1:05 AM
Vvjjkkii changed the task status from Stalled to Open.
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
CommunityTechBot renamed this task from 4ibaaaaaaa to [ReadingLists] No registered builder available for ReadingLists..Jul 2 2018, 3:15 PM
CommunityTechBot changed the task status from Open to Stalled.
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added a subscriber: Aklapper.
hashar changed the task status from Stalled to Open.Jul 20 2018, 3:50 PM

Change 447086 had a related patch set uploaded (by Hashar; owner: Hashar):
[mediawiki/extensions/ReadingLists@master] Fix installer

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

Change 447086 merged by jenkins-bot:
[mediawiki/extensions/ReadingLists@master] Fix installer

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

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

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

hashar closed this task as Resolved.Sep 4 2018, 9:31 AM

Reviewed and merged by @Tgr (thank you!).

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

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