Page MenuHomePhabricator

Consider using `--extensions-dir` instead of `--list-file` with mergeMessageFileList.php
Open, Needs TriagePublicFeature

Description

Follow up to T125678: Scap reliance on extension-list in turn requires extensions to be deployed to WMF production before being deployed to the Beta Cluster

Scap currently uses extension-list to tell mergeMessageFileList.php which extensions and skins to collect localized messages from. Editing the extension-list file is an easily missed step in deploying a new extension or skin which can be replaced by using --extensions-dir with mergeMessageFileList.php instead.

The main complication that needs to be addressed before doing this is finding a new way to group extensions and skins for deployment in Beta Cluster. Today we use mediawiki/extensions and mediawiki/skins namespace repos that are automatically maintained by Gerrit to deploy all extensions and skins to the Beta Cluster MediaWiki servers. Configuration from operations/mediawiki-config controls which of these extensions and skins are actually enabled on the Beta Cluster wikis. We assume that attempting to build the localized message cache for all extensions and skins would be too slow at build time and too big at runtime to be viable (T125678#9655501). One possible solution would be creating a special branch of mediawiki/extensions limited to the extensions that should be deployed for the Beta Cluster wikis (T125678#9655533).

Event Timeline

dancy renamed this task from Consider using `--extension-dir` instead of `--list-file` with mergeMessageFileList.php to Consider using `--extensions-dir` instead of `--list-file` with mergeMessageFileList.php.Aug 3 2026, 7:12 PM
dancy updated the task description. (Show Details)

We assume that attempting to build the localized message cache for all extensions and skins would be too slow at build time and too big at runtime to be viable

I tried today. It doesn't work because mergeMessageFileList.php --extensions-dir /srv/mediawiki-staging/php-master/extensions/ ends up loading every extension, and some of them are incompatible with each other, so it fails:

dancy@deployment-deploy04:~$ scap mwscript --no-local-config --directory /srv/mediawiki-staging --user www-data -- mergeMessageFileList.php --wiki=aawiki --force-version master --quiet --extensions-dir /srv/mediawiki-staging/php-master/extensions/ --output /tmp/xyz2
Extension .git in /srv/mediawiki-staging/php-master/extensions/ lacks expected entry point: extension.json or skin.json (PHP entry points are no longer supported by this script).
Extension Awesomeness in /srv/mediawiki-staging/php-master/extensions/ lacks expected entry point: extension.json or skin.json (PHP entry points are no longer supported by this script).
Extension CommonMessages in /srv/mediawiki-staging/php-master/extensions/ lacks expected entry point: extension.json or skin.json (PHP entry points are no longer supported by this script).
Extension CosmosProfile in /srv/mediawiki-staging/php-master/extensions/ lacks expected entry point: extension.json or skin.json (PHP entry points are no longer supported by this script).
Extension EasyWiki in /srv/mediawiki-staging/php-master/extensions/ lacks expected entry point: extension.json or skin.json (PHP entry points are no longer supported by this script).
<many others like that>
...
RuntimeException from line 945 of /srv/mediawiki-staging/php-master/includes/Registration/ExtensionProcessor.php: The configuration setting 'wgPluggableAuth_Class' was already set by MediaWiki core or another extension, and cannot be set again by Shibboleth.
#0 /srv/mediawiki-staging/php-master/includes/Registration/ExtensionProcessor.php(876): MediaWiki\Registration\ExtensionProcessor->addConfigGlobal('wgPluggableAuth...', 'Shibboleth', 'Shibboleth')
#1 /srv/mediawiki-staging/php-master/includes/Registration/ExtensionProcessor.php(302): MediaWiki\Registration\ExtensionProcessor->extractConfig1(Array)
#2 /srv/mediawiki-staging/php-master/includes/Registration/ExtensionRegistry.php(468): MediaWiki\Registration\ExtensionProcessor->extractInfo('/srv/mediawiki-...', Array, 1)
#3 /srv/mediawiki-staging/php-master/maintenance/mergeMessageFileList.php(180): MediaWiki\Registration\ExtensionRegistry->readFromQueue(Array)
#4 /srv/mediawiki-staging/php-master/maintenance/mergeMessageFileList.php(104): MergeMessageFileList->generateMessageFileList(Array)
#5 /srv/mediawiki-staging/php-master/maintenance/includes/MaintenanceRunner.php(695): MergeMessageFileList->execute()
#6 /srv/mediawiki-staging/php-master/maintenance/doMaintenance.php(88): MediaWiki\Maintenance\MaintenanceRunner->run()
#7 /srv/mediawiki-staging/php-master/maintenance/mergeMessageFileList.php(221): require_once('/srv/mediawiki-...')
#8 /srv/mediawiki-staging/multiversion/MWScript.php(219): require_once('/srv/mediawiki-...')
#9 {main}