Bug 1383880: add support for optimizing tasks based on SCHEDULES; r=ahal

This adds some new optimization strategies.  For tests, we use Either(SETA,
SkipUnlessSchedules), thereby giving both mechanisms a chance to skip tasks. On
try, SETA is omitted.

MozReview-Commit-ID: GL4tlwyeBa6
This commit is contained in:
Dustin J. Mitchell
2017-08-23 16:21:06 +00:00
parent 4e4bff2c8a
commit 218cc73f50
3 changed files with 73 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ import time
from copy import deepcopy
from mozbuild.util import memoize
from mozbuild import schedules
from taskgraph.util.attributes import TRUNK_PROJECTS
from taskgraph.util.hash import hash_path
from taskgraph.util.treeherder import split_symbol
@@ -179,6 +180,10 @@ task_description_schema = Schema({
{'seta': None},
# skip this task if none of the given file patterns match
{'skip-unless-changed': [basestring]},
# skip this task if unless the change files' SCHEDULES contains any of these components
{'skip-unless-schedules': list(schedules.ALL_COMPONENTS)},
# skip if SETA or skip-unless-schedules says to
{'skip-unless-schedules-or-seta': list(schedules.ALL_COMPONENTS)},
),
# the provisioner-id/worker-type for the task. The following parameters will