Page MenuHomePhabricator

Phaseout CI mediawiki config / extensions_load.txt to load extensions
Open, Needs TriagePublic

Description

integration/jenkins.git has a MediaWiki configuration snippet to detect and load MediaWiki extensions (mediawiki/config.d/50_mw_ext_loader.php) . The same mechanism exists in MediaWiki core itself and CI should rely on it instead.

For the context, we used to have Jenkins build reusing workspaces, hence differents set of extensions were left behind being build. The config snippet is instructed by Zuul for a list of extensions to include via a file extensions_load.txt, the others present on the disk were not loaded. The then detects whether there is an extension.json or an expected entry point then wfLoadExtensions() or require_once.

Nowadays we start with a clean workspace so that system is no more needed.

We would need:

Note: in case an extension lacks extension.json or the expected PHP entry point, LocalSettingsGenerator::generateExtEnableLine forges a require_once with the extension name nonetheless even if the file does not exist. That will later causes an error when failing to require the file. That covers the abort / exit(1); we have in 50_mw_ext_loader.php

Event Timeline

hashar created this task.Mar 13 2018, 9:35 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 13 2018, 9:35 AM
hashar updated the task description. (Show Details)Mar 13 2018, 9:35 AM

Change 419130 had a related patch set uploaded (by Hashar; owner: Hashar):
[mediawiki/core@master] Let install.php detect and inject extensions

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

For the context, we used to have Jenkins build reusing workspaces, hence differents set of extensions were left behind being build

Are you planning to get rid of this?

For the context, we used to have Jenkins build reusing workspaces, hence differents set of extensions were left behind being build

Are you planning to get rid of this?

Yes definitely. That is causing too much maintenance troubles and get build to fail randomly because of the dirty state.

Change 419130 merged by jenkins-bot:
[mediawiki/core@master] Let install.php detect and inject extensions

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

hashar updated the task description. (Show Details)Mar 14 2018, 8:54 AM

Change 419384 had a related patch set uploaded (by Hashar; owner: Hashar):
[mediawiki/core@REL1_30] Let install.php detect and inject extensions

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

Change 419391 had a related patch set uploaded (by Hashar; owner: Hashar):
[mediawiki/core@REL1_29] Let install.php detect and inject extensions

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

Change 419393 had a related patch set uploaded (by Hashar; owner: Hashar):
[mediawiki/core@REL1_27] Let install.php detect and inject extensions

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

hashar updated the task description. (Show Details)Mar 14 2018, 11:21 AM

Change 419394 had a related patch set uploaded (by Hashar; owner: Hashar):
[mediawiki/core@wmf/1.31.0-wmf.24] Let install.php detect and inject extensions

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

Change 419396 had a related patch set uploaded (by Hashar; owner: Hashar):
[mediawiki/core@wmf/1.31.0-wmf.25] Let install.php detect and inject extensions

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

Change 419394 merged by jenkins-bot:
[mediawiki/core@wmf/1.31.0-wmf.24] Let install.php detect and inject extensions

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

Change 419396 merged by jenkins-bot:
[mediawiki/core@wmf/1.31.0-wmf.25] Let install.php detect and inject extensions

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

hashar updated the task description. (Show Details)Mar 14 2018, 8:48 PM

Change 419526 had a related patch set uploaded (by Hashar; owner: Hashar):
[mediawiki/core@fundraising/REL1_27] Let install.php detect and inject extensions

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

Change 419605 had a related patch set uploaded (by Hashar; owner: Hashar):
[mediawiki/core@master] Let install.php detect and inject extensions [2]

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

Change 419384 merged by jenkins-bot:
[mediawiki/core@REL1_30] Let install.php detect and inject extensions

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

Change 419391 merged by jenkins-bot:
[mediawiki/core@REL1_29] Let install.php detect and inject extensions

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

Change 419393 merged by jenkins-bot:
[mediawiki/core@REL1_27] Let install.php detect and inject extensions

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

Change 419605 merged by jenkins-bot:
[mediawiki/core@master] Let install.php detect and inject extensions [2]

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

Change 424352 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/quibble@master] Make MediaWiki install.php detects extensions

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

Change 424352 merged by jenkins-bot:
[integration/quibble@master] Make MediaWiki install.php detects extensions

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

I havent worked on this for the last two weeks or so. I have been focusing on polishing up Quibble to run against mediawiki/core. Will come back to this next week.

hashar updated the task description. (Show Details)Apr 29 2018, 7:07 PM

mediawiki/core and mediawiki/vendor are using the Quibble based jobs. There are still some jobs using Nodepool though.

I triggered the Quibble job for extensions and skins over the week-end:

SUCCESSFAILURE
Skins3211
Extensions619277

That is encouraging.

Change 419526 abandoned by Reedy:
Let install.php detect and inject extensions

Reason:
https://gerrit.wikimedia.org/r/#/c/mediawiki/core/ /444628/-1..2 brought it in :)

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

hashar removed hashar as the assignee of this task.Aug 1 2018, 3:02 PM

It is still used here and there but I lack time to audit the remaining use cases. So it is back to the backlog.

I think the last two places this is being used is in the legacy Wikibase jobs (T188717), and some fundraising jobs.