зеркало из https://github.com/mozilla/gecko-dev.git
0e12f1cc60
Previously, we ran a single "target task" function to mutate the full task graph into a subset based on input parameters (try syntax, repository being built for, etc). This concept is useful. But the implementation was limiting because we could only have a single "target tasks" function. This commit introduces the concept of "filters." They conceptually do the same thing as "target tasks methods" but you can run more than 1 of them. Filters are simply functions that examine an input graph+parameters and emit nodes that should be retained. Filters, like target tasks methods, are defined via decorated functions in a module. TaskGraphGenerator has been converted to use filters. The list of defined filters can be defined in the parameters dict passed into TaskGraphGenerator. A default filter list is provided in decision.py. The intent is to eventually convert target tasks to filters. Until that happens, we always run the registered target tasks method via a filter proxy function. No new tests have been added because we don't yet have any functionality relying explicitly on filters. Tests will be added in a subsequent commit once we add a new filter. While I was here, I also snuck in some logging on the size of the graphs. MozReview-Commit-ID: ERn2hIYbMRp --HG-- extra : rebase_source : 36b8e86aa64b2f52b03b31b5497759b0009fb921 |
||
---|---|---|
.. | ||
attributes.rst | ||
caches.rst | ||
docker-images.rst | ||
how-tos.rst | ||
index.rst | ||
kinds.rst | ||
loading.rst | ||
parameters.rst | ||
reference.rst | ||
taskgraph.rst | ||
transforms.rst | ||
yaml-templates.rst |