Commit Graph

118 Commits

Author SHA1 Message Date
Tom Prince
c0e88c80e3 Bug 1495480: [taskgraph] Load taskgraph config before loading parameters; r=dustin
Differential Revision: https://phabricator.services.mozilla.com/D7304
2018-10-01 23:37:53 +00:00
Tom Prince
8c04221c86 Bug 1481121: [release] Add support for tasks declaring the release-relevant artifacts, for downstream tasks to inspect; r=Callek
Differential Revision: https://phabricator.services.mozilla.com/D3814
2018-08-20 12:29:15 -06:00
Gregory Szorc
61b22ffc3d Bug 1469999 - Use yaml.safe_load() in taskgraph; r=dustin
yaml.load() can evaluate arbitrary Python code via syntax such as
`!!python/object/apply:os.system`. Seriously.

Let's switch taskgraph to yaml.safe_load(), which is reasonable
about limiting magic.

Differential Revision: https://phabricator.services.mozilla.com/D1736
2018-06-25 21:34:30 +00:00
Tom Prince
430ce7c24a Bug 1458700: [taskgraph] Move load_graph_config into taskgraph.config; r=dustin
Differential Revision: https://phabricator.services.mozilla.com/D1123
2018-05-02 19:28:43 -06:00
Tom Prince
e5bb2514f3 Bug 1418058: [taskcluster] Pass a graph_config through action task generation; r=dustin
Differential Revision: https://phabricator.services.mozilla.com/D912
2018-04-11 10:24:14 -06:00
Chris AtLee
1f47f275a3 Bug 1420449: Skip schema validation with --fast r=dustin,ahal
MozReview-Commit-ID: 6wWYrNOG677
2017-12-07 22:23:57 -05:00
Coroiu Cristina
1d235fed44 Backed out changeset 7a47accb11c5 (bug 1420449) for build bustage r=backout on a CLOSED TREE 2018-01-03 19:04:32 +02:00
Chris AtLee
d1b5d6b8cf Bug 1420449: Skip schema validation with --fast r=dustin,ahal 2018-01-03 10:27:16 -05:00
Tom Prince
5c1e459dac Bug 1415199: Move some logic for loading taskgraph kinds from mozbuild.mach_bootstrap to taskgraph. r=dustin
This fixes the fallout from the mach command not being updated for 69c60c8fc528d8d038e22a2ae62f5ff7b1131231.

MozReview-Commit-ID: 7WZ8wW4gnCY
2017-11-07 10:08:49 -07:00
Sebastian Hengst
3e4740d424 Backed out changeset ec6b9fda1868 (bug 1415199) for breaking gecko decision task. r=backout on a CLOSED TREE 2017-11-07 19:50:30 +02:00
Tom Prince
b146a4c9e0 Bug 1415199: Move some logic for loading taskgraph kinds from mozbuild.mach_bootstrap to taskgraph. r=dustin
This fixes the fallout from the mach command not being updated for 69c60c8fc528d8d038e22a2ae62f5ff7b1131231.

MozReview-Commit-ID: 7WZ8wW4gnCY
2017-11-07 10:08:49 -07:00
Tom Prince
31a9f87229 Bug 1410513: Move ridealong build configuration to ci/config.yml; r=dustin
MozReview-Commit-ID: 761zWtiZFtz
2017-11-02 14:34:47 -06:00
Tom Prince
afcf60d7e5 Bug 1410513: Treeherder group names from config file; r=dustin
MozReview-Commit-ID: CuEQyn03Anh
2017-11-02 11:37:20 -06:00
Andrew Halberstadt
a4af6ae878 Bug 1408352 - [taskgraph] Implement 'always_target' attribute, r=dustin
Tasks that have the 'always_target' attribute set will be always be included
in the target_task_graph, regardless of target task filtering.

Furthermore, if they were only added because of this attribute (i.e, the
filters would have excluded the task), then the task will be a candidate for
optimization even if the 'optimize_target_tasks' parameter is False.

MozReview-Commit-ID: 9eoVJ5qpAMO
2017-10-30 09:41:51 -04:00
Andrew Halberstadt
5d671852d0 Bug 1411796 - [taskgraph] Skip parameters.rst doc verification if parameters.strict is False, r=dustin
This is needed to prevent parameter mismatch errors when using |mach try fuzzy|
from an older revision. This can happen if the parameters.yml is being
downloaded from a commit with a recently added parameter.

MozReview-Commit-ID: 4NxCM7i8B4W
2017-10-25 20:27:17 -04:00
Sebastian Hengst
10cbbd0a3d Backed out changeset 6f205bfdd139 (bug 1411796) for failing e.g. taskgraph's taskcluster/taskgraph/test/test_generator.py::TestGenerator::test_full_task_graph. r=backout on a CLOSED TREE 2017-10-26 17:39:25 +02:00
Andrew Halberstadt
ae13c70f37 Bug 1411796 - [taskgraph] Skip parameters.rst doc verification if parameters.strict is False, r=dustin
This is needed to prevent parameter mismatch errors when using |mach try fuzzy|
from an older revision. This can happen if the parameters.yml is being
downloaded from a commit with a recently added parameter.

MozReview-Commit-ID: 4NxCM7i8B4W
2017-10-25 20:27:17 -04:00
Aki Sasaki
c121be27ac bug 1397552 - add a release promotion action. r=bstack
Add a release promotion custom action for releng's TC release promotion migration work.

This action generates a graph dependent on previously built tasks. To track these, we add the `do_not_optimize` and `existing_tasks` parameters. The `do_not_optimize` parameter specifies tasks that we want to explicitly exclude from taskgraph optimization. The `existing_tasks` parameter specifies a label-to-taskid map for tasks from previous graphs.

MozReview-Commit-ID: 1vKrNUavM4V
2017-10-24 15:28:19 -07:00
Dustin J. Mitchell
d08f492fb6 Bug 1383880: parse try config during the decision task; r=ahal
This sets the try_mode property, and parses the try message (if given), early
in the decision task and puts the results into the parameters.

The proximate need is to set optimze_target_tasks for some try modes and not
others. This also replaces the existing logic for parsing messages for certain
kinds, and makes the distinction between the different try modes a little
clearer.

MozReview-Commit-ID: AXJEGLh6pEV
2017-08-21 23:14:14 +00:00
Dustin J. Mitchell
19cecfbbba Bug 1383880: allow only one optimization per task; r=ahal,glandium
It is not at *all* clear how multiple optimizations for a single task should
interact. No simple logical operation is right in all cases, and in fact in
most imaginable cases the desired behavior turns out to be independent of all
but one of the optimizations. For example, given both `seta` and
`skip-unless-files-changed` optimizations, if SETA says to skip a test, it is
low value and should be skipped regardless of what files have changed. But if
SETA says to run a test, then it has likely been skipped in previous pushes, so
it should be run regardless of what has changed in this push.

This also adds a bit more output about optimization, that may be useful for
anyone wondering why a particular job didn't run.

MozReview-Commit-ID: 3OsvRnWjai4
2017-08-01 20:02:59 +00:00
Phil Ringnalda
b76b48b887 Backed out 12 changesets (bug 1383880) for decision task bustage
CLOSED TREE

Backed out changeset fd3615e7e0a3 (bug 1383880)
Backed out changeset 8cceb6a82bfb (bug 1383880)
Backed out changeset 571a6c9054a5 (bug 1383880)
Backed out changeset ec2b8ba5a949 (bug 1383880)
Backed out changeset 8e5847d9acda (bug 1383880)
Backed out changeset b354fdf6e233 (bug 1383880)
Backed out changeset ebdd6ccbcfca (bug 1383880)
Backed out changeset ebcc9d20981a (bug 1383880)
Backed out changeset 97eedc84d6e8 (bug 1383880)
Backed out changeset a3116da52b4e (bug 1383880)
Backed out changeset b3eb0c939720 (bug 1383880)
Backed out changeset 7c07cb798530 (bug 1383880)

MozReview-Commit-ID: EPDuQHr7w2y
2017-09-20 19:57:39 -07:00
Dustin J. Mitchell
a7457a95f7 Bug 1383880: parse try config during the decision task; r=ahal
This sets the try_mode property, and parses the try message (if given), early
in the decision task and puts the results into the parameters.

The proximate need is to set optimze_target_tasks for some try modes and not
others. This also replaces the existing logic for parsing messages for certain
kinds, and makes the distinction between the different try modes a little
clearer.

MozReview-Commit-ID: AXJEGLh6pEV
2017-08-21 23:14:14 +00:00
Dustin J. Mitchell
8f421b7a25 Bug 1383880: allow only one optimization per task; r=ahal,glandium
It is not at *all* clear how multiple optimizations for a single task should
interact. No simple logical operation is right in all cases, and in fact in
most imaginable cases the desired behavior turns out to be independent of all
but one of the optimizations. For example, given both `seta` and
`skip-unless-files-changed` optimizations, if SETA says to skip a test, it is
low value and should be skipped regardless of what files have changed. But if
SETA says to run a test, then it has likely been skipped in previous pushes, so
it should be run regardless of what has changed in this push.

This also adds a bit more output about optimization, that may be useful for
anyone wondering why a particular job didn't run.

MozReview-Commit-ID: 3OsvRnWjai4
2017-08-01 20:02:59 +00:00
Ryan VanderMeulen
c41dc43ff0 Backed out 9 changesets (bug 1383880) for decision task bustage.
Backed out changeset 53f5d47a7cb0 (bug 1383880)
Backed out changeset a0abda41172a (bug 1383880)
Backed out changeset 729a7e2091e8 (bug 1383880)
Backed out changeset a33f5a14a471 (bug 1383880)
Backed out changeset 5b10d321cfee (bug 1383880)
Backed out changeset 8056488d8aed (bug 1383880)
Backed out changeset e62c90e3c1e8 (bug 1383880)
Backed out changeset 91f116ce6c2a (bug 1383880)
Backed out changeset 045498bc36c4 (bug 1383880)
2017-09-01 15:37:08 -04:00
Dustin J. Mitchell
464d6eeb31 Bug 1383880: parse try config during the decision task; r=ahal
This sets the try_mode property, and parses the try message (if given), early
in the decision task and puts the results into the parameters.

The proximate need is to set optimze_target_tasks for some try modes and not
others. This also replaces the existing logic for parsing messages for certain
kinds, and makes the distinction between the different try modes a little
clearer.

MozReview-Commit-ID: AXJEGLh6pEV
2017-08-21 23:14:14 +00:00
Dustin J. Mitchell
18da9b3836 Bug 1383880: allow only one optimization per task; r=ahal
It is not at *all* clear how multiple optimizations for a single task should
interact. No simple logical operation is right in all cases, and in fact in
most imaginable cases the desired behavior turns out to be independent of all
but one of the optimizations. For example, given both `seta` and
`skip-unless-files-changed` optimizations, if SETA says to skip a test, it is
low value and should be skipped regardless of what files have changed. But if
SETA says to run a test, then it has likely been skipped in previous pushes, so
it should be run regardless of what has changed in this push.

This also adds a bit more output about optimization, that may be useful for
anyone wondering why a particular job didn't run.

MozReview-Commit-ID: 3OsvRnWjai4
2017-08-01 20:02:59 +00:00
Mike Hommey
7f32a943d3 Bug 1384433 - Generalize verifications done on task graphs. r=dustin 2017-08-29 07:53:57 +09:00
Andrew Halberstadt
91fd656da8 Bug 1387135 - Add ability to apply templates to task definitions via try_task_config.json, r=dustin
This provides a mechanism to modify the behaviour of tasks from a try push. The try_task_config.json
looks something like:

{
  "tasks": ["build-linux64/opt", "test-linux64/opt-mochitest-e10s-1"],
  "templates": {
    "artifact": {"enabled": 1}
  }
}

This tells taskgraph to apply the 'artifact' template to all tasks. Templates are JSONe based
.yml files that live under taskcluster/taskgraph/templates. Taskgraph will render every template
against every task definition. The templates themselves can then use JSONe condition statements to
filter out which tasks they should or shouldn't apply to.

MozReview-Commit-ID: J8HVZzOt4mX
2017-08-15 11:36:29 -04:00
Mike Hommey
77c0e90a53 Bug 1374940 - Allow transforms to access info about tasks from kind dependencies of the current kind. r=dustin 2017-07-19 07:25:26 +09:00
Dustin J. Mitchell
cef5efbeff Bug 1333255: introduce graph morphs, use them to make index tasks; r=jonasfj
Graph morphs modify the graph after optimization, without changing its meaning.
In this case, that means adding index tasks that will insert paths into the
index beyond the relatively limited number afforded in task.routes.

MozReview-Commit-ID: AJy4exX7q2v
2017-03-07 20:39:27 +00:00
Dustin J. Mitchell
f5b1646423 Bug 1333255: always include docker-image tasks in the target task graph; r=jonasfj
MozReview-Commit-ID: GX18D68TAWG
2017-03-10 17:08:34 +00:00
Dustin J. Mitchell
7b617b9156 Bug 1333255: rename taskgraph.task to taskgraph.loader; r=jonasfj
MozReview-Commit-ID: 6aPdGbxn0D1
2017-03-09 19:00:49 -05:00
Dustin J. Mitchell
37dca4a3be Bug 1333255: always transform tasks; r=jonasfj
MozReview-Commit-ID: 3A5wzXKG0Yp
2017-03-09 16:40:33 -05:00
Dustin J. Mitchell
4168dc665a Bug 1333255: remove t.get_dependencies(); r=jonasfj
MozReview-Commit-ID: 1UF9yKXeRt7
2017-03-08 21:22:31 +00:00
Dustin J. Mitchell
a0095736a7 Bug 1333255: use normal old functions to load tasks; r=jonasfj
Instead of using a class's static method, use a simple function, specified by
the `loader` key.

MozReview-Commit-ID: IeOl9qiSCXf
2017-03-09 23:14:40 -05:00
Wander Lairson Costa
97113977c9 Bug 1333167: Add extra try options to taskcluster. r=dustin a=jmaher
We add the following command line options to Taskcluster try syntax:

--spsProfile - enable profile mode.
--rebuild-talos <N> - retrigger talos tests N times.
--setenv <VAR>=<val> - add extra environments variables.
--tag <TAG> - run tests only the tag TAG.
--no-retry - doesn't retry failed jobs.

We have a chicken-egg problem, as we first generate the full task graph
and then parse the try message. But the graph generation step needs to
know the try message to process the aforementioned options. The
solution is to parse the message before graph generation and then
pass the command line options to the transforms. Then, each transform
can look at the option that interests it and process it accordingly.

The message parse function is configured in kind.yml, which gives some
flexibility for future implementations of alternative syntaxes.

MozReview-Commit-ID: GPFdi0FD6Vn
2017-02-02 09:34:43 -02:00
Sebastian Hengst
6ceaf1e6a8 Backed out changeset d6648b8f36ed (bug 1333167) for breaking gecko decision task. r=backout on a CLOSED TREE 2017-01-31 21:47:45 +01:00
Wander Lairson Costa
97963da965 Bug 1333167: Add extra try options to taskcluster. r=dustin a=jmaher
We add the following command line options to Taskcluster try syntax:

--spsProfile - enable profile mode.
--rebuild-talos <N> - retrigger talos tests N times.
--setenv <VAR>=<val> - add extra environments variables.
--tag <TAG> - run tests only the tag TAG.
--no-retry - doesn't retry failed jobs.

We have a chicken-egg problem, as we first generate the full task graph
and then parse the try message. But the graph generation step needs to
know the try message to process the aforementioned options. The
solution is to parse the message before graph generation and then
pass the command line options to the transforms. Then, each transform
can look at the option that interests it and process it accordingly.

The message parse function is configured in kind.yml, which gives some
flexibility for future implementations of alternative syntaxes.

MozReview-Commit-ID: DMwRjuV2vpf
2017-01-31 18:16:07 -02:00
Sebastian Hengst
7cb5f66fd9 Backed out changeset 50cf83b69046 (bug 1333167) for breaking gecko decision task. r=backout 2017-01-31 18:25:50 +01:00
Wander Lairson Costa
064a62b081 Bug 1333167: Add extra try options to taskcluster. r=dustin a=jmaher
We add the following command line options to Taskcluster try syntax:

--spsProfile: enable profile mode.
--rebuild-talos <N>: retrigger talos tests N times.
--setenv <VAR>=<val>: add extra environments variables.
--tag <TAG>: run tests only the tag TAG.
--no-retry: doesn't retry failed jobs.

We have a chicken-egg problem, as we first generate the full task graph
and then parse the try message. But the graph generation step needs to
know the try message to process the aforementioned options. The
solution is to parse the message before graph generation and then
pass the command line options to the transforms. Then, each transform
can look at the option that interests it and process it accordingly.

The message parse function is configured in kind.yml, which gives some
flexibility for future implementations of alternative syntaxes.

MozReview-Commit-ID: EQlE6q5E8z7
2017-01-31 15:03:10 -02:00
Hammad Akhtar
ad6e3856ce Bug 1326462 - Make the check for duplicate gecko v2 routes, happen during full graph; r=Callek
MozReview-Commit-ID: HkHpfvcjlQG
2017-01-02 19:39:30 +05:30
Justin Wood
b835b115db Bug 1325398 - Make the check for duplicate Treeherder symbols, happen during full graph not target graph stage. r=dustin
MozReview-Commit-ID: GfwAgERKdsL
2016-12-22 11:45:10 -05:00
Hammad Akhtar
4fd926d2ee Bug 1302804 - Ensure that tasks in a taskgraph do not have duplicate gecko.v2 routes; r=dustin
MozReview-Commit-ID: B4Ok4WhqBVq
2016-12-21 13:34:04 +05:30
Hammad Akhtar
331cc8e455 Bug 1323633 - Ensure that task graphs do not contain duplicate Treeherder symbols, also consider treeherder.collection.keys(); r=dustin
MozReview-Commit-ID: 3F0BHQQmSOg
2016-12-13 11:51:53 +05:30
Phil Ringnalda
2390a77384 Backed out changeset 6034929c3e4a (bug 1302802) for decision task bustage
CLOSED TREE
2016-12-13 10:01:05 -08:00
Hammad Akhtar
83471420c6 Bug 1302802 - Ensure that task graphs do not contain duplicate Treeherder symbols; r=dustin
MozReview-Commit-ID: LO2fEbxzZH2
2016-12-13 11:51:53 +05:30
Hammad Akhtar
419f90c11b Bug 1322193 - Verify taskgraph implementations against documentation, with proper regex. Updated doc verification for fake values of kinds, parameters etc., regex optimized r=Callek
MozReview-Commit-ID: 56ZEJECbtK5
2016-12-06 12:03:36 +05:30
Hammad Akhtar
b7f4533590 Bug 1302800 - Verify taskgraph implementations against documentation; r=dustin
MozReview-Commit-ID: J8djr4ifvzm
2016-11-26 01:22:46 +05:30
Gregory Szorc
5d56d07832 Bug 1318200 - Introduce task graph filtering; r=dustin
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
2016-11-17 15:53:30 -08:00
Gregory Szorc
49ecc723ac Bug 1318200 - Obtain target tasks method from parameters; r=dustin
Previously, all callers outside of tests that passed
"target_tasks_method" to TaskGraphGenerator all used the same pattern
of looking for a key in the parameters and calling a function in
the target_tasks module.

Future commits will refactor how target tasks graph work. To
make the transition easier, we move the logic for obtaining the
target tasks method into TaskGraphGenerator.

MozReview-Commit-ID: 3QU09iGhoXh
2016-11-17 16:29:51 -08:00