gecko-dev/tools/tryselect
Ricky Stewart 31755b431d Bug 1657650 - Require that Mach command providers subclass MachCommandBase. r=remote-protocol-reviewers,marionette-reviewers,maja_zf,mhentges,froydnj
Today we don't require that `mach` `CommandProvider`s subclass from any particular parent class and we're very lax about the requirements they must meet. While that's convenient in certain circumstances, it has some unfortunate implications for feature development.

Today the only requirements that we have for `CommandProvider`s are that they have an `__init__()` method that takes either 1 or 2 arguments, the second of which must be called `context` and is populated with the `mach` `CommandContext`. Again, while this flexibility is occasionally convenient, it is limiting. As we add features to `mach`, having a better idea what the shape of our `CommandProvider`s are and how we can instantiate them and use them is increasingly important, and this gives us additional control when having `mach` configure `CommandProvider`s based on data that is only available at the `mach` level. In particular, we plan to leverage this in bugs 985141 and 1654074.

Here we add validation to the `CommandProvider` decorator to ensure all classes inherit from `MachCommandBase`, update all `CommandProvider`s in-tree to inherit from `MachCommandBase`, and update source and test code accordingly.

Follow-up work: we now require (de facto) that the `context` be populated with a `topdir` attribute by the `populate_context_handler` function, since instantiating the `MachCommandBase` requires a `topdir` be provided. This is fine for now in the interest of keeping this patch reasonably sized, but some additional refactoring could make this cleaner.

Differential Revision: https://phabricator.services.mozilla.com/D86255
2020-08-07 18:24:59 +00:00
..
docs Bug 1649966 - Discard the docs for vcs-setup git. r=glandium 2020-08-05 02:47:20 +00:00
selectors Bug 1636271 - [taskgraph] Move 'optimize-strategies' from try_task_config.json to a parameter, r=tomprince 2020-07-28 13:21:05 +00:00
test Bug 1657649 - [ci] Remove the SETA shadow-scheduler, r=jmaher 2020-08-06 20:27:26 +00:00
util Bug 1635136 - add a --push-to-try option r=aerickson 2020-05-12 21:19:48 +00:00
__init__.py
cli.py
mach_commands.py Bug 1657650 - Require that Mach command providers subclass MachCommandBase. r=remote-protocol-reviewers,marionette-reviewers,maja_zf,mhentges,froydnj 2020-08-07 18:24:59 +00:00
preset.py Bug 1603510 - Allow multi-word $EDITOR in 'mach try syntax --edit-presets'; r=bc 2020-05-08 17:54:10 +00:00
push.py Bug 1657181 - Show task estimates for any selector where we have an explicit list of tasks; r=sfraser 2020-08-04 18:33:45 +00:00
task_config.py Bug 1636271 - [taskgraph] Move 'optimize-strategies' from try_task_config.json to a parameter, r=tomprince 2020-07-28 13:21:05 +00:00
tasks.py Bug 1655703: Can't schedule opt tests on try without --full r=tomprince 2020-07-30 20:56:36 +00:00
try_presets.yml Bug 1641224 - Add webrender-perf try preset. r=kats 2020-05-28 15:13:26 +00:00
watchman.json