Page MenuHomePhabricator

mediawiki/core tests failing for REL1_30 due to Wikibase
Closed, ResolvedPublic

Description

On https://gerrit.wikimedia.org/r/#/c/396035/ was a test failure:

16:11:15 [36bb8fdc9ce8570097596763] [no req]   MWException from line 167 of /home/jenkins/workspace/mediawiki-extensions-hhvm-jessie/src/includes/Hooks.php: Invalid callback Wikibase\RepoHooks::onSetupAfterCache in hooks for SetupAfterCache
16:11:15 
16:11:15 Backtrace:
16:11:15 #0 /home/jenkins/workspace/mediawiki-extensions-hhvm-jessie/src/includes/Hooks.php(205): Hooks::callHook(string, array, array, NULL)
16:11:15 #1 /home/jenkins/workspace/mediawiki-extensions-hhvm-jessie/src/includes/Setup.php(710): Hooks::run(string)
16:11:15 #2 /home/jenkins/workspace/mediawiki-extensions-hhvm-jessie/src/maintenance/doMaintenance.php(79): include(string)
16:11:15 #3 /home/jenkins/workspace/mediawiki-extensions-hhvm-jessie/src/tests/phpunit/phpunit.php(172): include(string)
16:11:15 #4 {main}

Possible https://gerrit.wikimedia.org/r/#/c/395704/ (as mention in the comments)

I would say it is not possible to stay with this situation.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 7 2017, 4:54 PM
Legoktm triaged this task as High priority.Dec 7 2017, 4:56 PM
Legoktm added a project: MW-1.30-release.
Legoktm added a subscriber: Addshore.

+cc @Addshore we probably need to use the build for everything pre-1.31 to make tests still pass :/

Umherirrender added a comment.EditedDec 7 2017, 4:59 PM

Or Wikibase is removed from gated extensions for the release branches, but I did not know if that is wanted or if the release branches should still be tested against wikibase/wikidata for other extensions like Math or ContentTranslation.

hashar also mention that the current wmf branches can fail, but that will roll out faster than the release branches.

I'm not sure how (In ci) we can make different branches load a different set of extensions :/

@hashar has been looking at this a bit today.

This is probably why it would make lots of sense to have these lists of required extensions in some sort of .wm.jenkins.yml file in the git repos themselves.

The change was made in parameter_functions.py right? We can add a check for the branch in that file, it's just python :)

Yup, parameter_functions.py!

hashar added a comment.Dec 7 2017, 8:20 PM

The mediawiki-extensions-* jobs are shared by a fixed set of extensions and the list of dependencies is gatedextensions in the parameter_functions.py.
The original idea behind those jobs were to tests some of Wikimedia deployed extensions together. That make sense for the master and wmf/* branches. Not so much for the REL branches.

I guess we can set branch filters in Zuul to have them run solely for the master and wmf/ branches. Then add jobs for the REL branches, probably the existing mwext-testextension jobs? Those would probably need some filter to not run on master or wmf branches.


This is probably why it would make lots of sense to have these lists of required extensions in some sort of .wm.jenkins.yml file in the git repos themselves.

Setting the dependencies centrally in CI started as a hack which eventually got generalized. Seems like that can now be done via extension.json if I understand T117277: Extend 'requires' section of extension.json to include extensions properly. So one can eg:

"requires": {
  "MediaWiki": ">= 1.25.0",
  "extensions": {
    "FakeExtension": "*"
  },
  "skins": {
    "FakeSkin": "*"
  } 
}

From there CI would clone the repo, get the list of extensions/skins and clone them using zuul-cloner and do that recursively. Given all mediawiki extensions and skins are in the same Zuul pipeline, the right thing would be tested maybe. But that is probably worth a different task.


All other, both cases seems to suggest we need a way to vary the list of dependencies based on some python in parameters_function. That is until all the supported branches solely rely on extension.json to define the dependencies.

Change 396453 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[integration/config@master] Use Wikidata extension for pre-1.31 tests

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

Change 396453 merged by jenkins-bot:
[integration/config@master] Use Wikidata extension for pre-1.31 tests

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

use_wikidata = ('REL1_27', 'REL1_29', 'REL1_30')
if params['ZUUL_BRANCH'] in use_wikidata:
    deps.remove('Wikibase')
    deps.append('Wikidata')

@Legoktm you are the boss! Well done really.

use_wikidata = ('REL1_27', 'REL1_29', 'REL1_30')
if params['ZUUL_BRANCH'] in use_wikidata:
    deps.remove('Wikibase')
    deps.append('Wikidata')

@Legoktm you are the boss! Well done really.

So this should probably be slightly different?

deps.remove('Wikibase')
deps.remove('PropertySuggester')
deps.remove('ArticlePlaceholder')
deps.remove('Wikidata.org')
# ETC for all other extensions that are part of the build
deps.append('Wikidata')