[QA] Quibble futures and patches to play with

Antoine Musso hashar+wmf at free.fr
Mon Apr 8 22:44:36 UTC 2019


Hello,

I have made some patches to Quibble and could use beta testers and feedback.

The first one enhances arguments handling. When passing --run, --skip or 
--commands in last position and then pass projects to clone, the 
projects would be considered as value to the option. For example:

  quibble --run phpunit mediawiki/extensions/BoilerPlate

Would fail not clone the BoilerPlate extension. Instead one has to 
remember explicitly to delimit options and argument with a double dash:

  quibble --run phpunit -- mediawiki/extensions/BoilerPlate

That has hit me a couple time already, I thus made a change to use a 
comma separated list for --run and --skip:

  --run=phpunit,selenium

Though that come with some dark hack to handle that in argparse. It 
might more reasonable to only accept one value and repeat ourselves:

  --run=phpunit --run=selenium

Please give the patch a try and raise feedback on the change:
https://gerrit.wikimedia.org/r/#/c/integration/quibble/+/496125/

----

The next change is to have Quibble inspect extension.json and clone 
extensions which might be listed in the "requires" section.

Defining dependencies between extensions is available since MediaWiki 
1.29 but never got supported by CI.  Instead we define dependencies 
centrally in integration/config in zuul/parameters.py that has a few issues:
* requires a review and deploy by CI admins
* hard to find / reproduce the dependencies chain when testing locally
* causes one to have to pass a very long list of repositories to Quibble 
(either via EXT_DEPENDENCIES or as arguments).
* extensions most probably do not define their proper "requires"

So really it should be removed and delegated to developers.

https://gerrit.wikimedia.org/r/#/c/integration/quibble/+/502286/ 
proposes a new  --resolve-requires option to let Quibble recursively 
process extension.json files and clone missing repositories.

It needs a bit of love but would save one from having to write:

EXT_DEPENDENCIES=mediawiki/extensions/BetaFeatures\nmediawiki/extensions/Capiunto\nmediawiki/extensions/CentralAuth\nmediawiki/extensions/CirrusSearch\nmediawiki/extensions/Cite\nmediawiki/extensions/Echo\nmediawiki/extensions/EducationProgram\nmediawiki/extensions/Elastica\nmediawiki/extensions/EventLogging\nmediawiki/extensions/GeoData\nmediawiki/extensions/GuidedTour\nmediawiki/extensions/PdfHandler\nmediawiki/extensions/PropertySuggester\nmediawiki/extensions/Scribunto\nmediawiki/extensions/SiteMatrix\nmediawiki/extensions/SyntaxHighlight_GeSHi\nmediawiki/extensions/TimedMediaHandler\nmediawiki/extensions/UniversalLanguageSelector\nmediawiki/extensions/VisualEditor\nmediawiki/extensions/WikiEditor\nmediawiki/extensions/Wikibase\nmediawiki/extensions/WikibaseLexeme\nmediawiki/extensions/WikibaseQuality\nmediawiki/extensions/WikibaseQualityConstraints\nmediawiki/extensions/WikimediaBadges\nmediawiki/extensions/cldr 
quibble

(from https://doc.wikimedia.org/quibble/#reproducing-a-ci-build )

And instead do:

  quibble --resolve-requires mediawiki/extensions/ContentTranslation

Which is arguably hmm simpler?


Some references:

https://phabricator.wikimedia.org/T193824
https://www.mediawiki.org/wiki/Manual:Extension_registration#Requirements_(dependencies)


Thank you for any testing/feedback you may provide!


-- 
Antoine Musso
quibble --run=phpunit,selenium --resolve-requires --fail-on-extra-requires




More information about the QA mailing list