Page MenuHomePhabricator

Update jenkins for extension registration changes
Closed, ResolvedPublic

Description

the Name.php entry points will probably start being removed at some point in the future in favor of the extension registration system. Instead of require_once'ing those, jenkins should just call wfLoadExtension(' Name' ); Skins should use wfLoadSkin() instead.

Additionally, we should have a job that runs the validateRegistrationFile.php script if the extension.json or skin.json file is modified. This script depends upon the justinrainbow/json-schema library which is not in mediawiki/vendor since it's just a development dependency.

Event Timeline

Legoktm raised the priority of this task from to Needs Triage.
Legoktm updated the task description. (Show Details)
Legoktm subscribed.

Change 184003 had a related patch set uploaded (by Legoktm):
Load extensions using wfLoadExtensions() if possible

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

Patch-For-Review

The jobs that tests multiple extensions together ( mediawiki-extensions-{hhvm,zend} ), clone a varying list of extension to the workspace. The workspace is NOT cleared between run to avoid cloning over and over all the repositories.

The job craft a list of extensions to load which are listed in a file extensions_load.txt. In LocalSettings.php we inject custom code 50_mw_ext_loader.php which reads the file and attempt to load the default PHP entry point.

As I understand it, wfLoadExtensions() would end up loading any present extension under /extensions/ and since the workspace is not cleaned that would include extensions we don't actually want to test in that specific build :-/

What we will want, is to have the Job start with a clean workspace, clone the extension that have been defined to be tested for that run then use the wfLoadExtensions(). That would require CI to figure out a solution to clone the repositories faster (most probably from a local cache/copy of the repos) and most probably ends up depending on migrating to disposable instances.

As I understand it, wfLoadExtensions() would end up loading any present extension under /extensions/ and since the workspace is not cleaned that would include extensions we don't actually want to test in that specific build :-/

No, that's not what it does. It only loads the extensions that are passed to it as a parameter. In my patch, it basically changes require_once lines into wfLoadExtensions(...);. So even if an extension is cloned, as long as it is not passed to the function, it won't be loaded.

Change 184003 merged by jenkins-bot:
Load extensions using wfLoadExtensions() if possible

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

Krinkle assigned this task to Legoktm.
Krinkle triaged this task as Medium priority.
Krinkle removed a project: Patch-For-Review.
Krinkle removed a subscriber: gerritbot.