Commit Graph

43 Commits

Author SHA1 Message Date
Mike Hommey
8d6e70ff9b Bug 1405570 - Never remove tasks with an index-search optimization. r=dustin 2017-10-05 10:36:32 +09:00
Dustin J. Mitchell
8ff3f5ff2e Bug 1383880: handle keyError from find_task_id; r=gps
MozReview-Commit-ID: F3mVgKcqZwA
2017-09-21 12:02:44 +00:00
Dustin J. Mitchell
38c002ce31 Bug 1383880: use a vcs-compatible reader in decision tasks; r=gps
This continues to use a file-based reader when run locally.

MozReview-Commit-ID: CJuYKDj2E3n
2017-09-07 18:28:22 +00:00
Dustin J. Mitchell
3fba84ab2d Bug 1383880: add only-if-dependencies-run optimization for follow-ons; r=ahal
MozReview-Commit-ID: JuhwyQIx3Mh
2017-08-25 21:18:13 +00:00
Dustin J. Mitchell
218cc73f50 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
2017-08-23 16:21:06 +00:00
Dustin J. Mitchell
aff71cd7a6 Bug 1383880: optimize in three phases; r=ahal
In preparation for much more thorough optimization of task-graphs, this
makes a few changes:

 * optimization is split into thre phases, with task removal in one phase
   (following dependency links) and task replacement in the next (in the
   reverse order).
 * optimization uses class instances instead of functions for optimizations;
   this allows different functions for different phases, and also leaves open
   the possibility of composing optimizations.
 * the replacement phase can also support removal; this is when utility tasks
   like symbol uploads can be optimized away iff their parent task is
   optimized.

MozReview-Commit-ID: C5QznNpwqXn
2017-08-20 20:00:17 +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
6b16ccfa82 Bug 1383880: use a vcs-compatible reader in decision tasks; r=gps
This continues to use a file-based reader when run locally.

MozReview-Commit-ID: CJuYKDj2E3n
2017-09-07 18:28:22 +00:00
Dustin J. Mitchell
59febcd0f2 Bug 1383880: add only-if-dependencies-run optimization for follow-ons; r=ahal
MozReview-Commit-ID: JuhwyQIx3Mh
2017-08-25 21:18:13 +00:00
Dustin J. Mitchell
78986c786d 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
2017-08-23 16:21:06 +00:00
Dustin J. Mitchell
7c810dfd0c Bug 1383880: optimize in three phases; r=ahal
In preparation for much more thorough optimization of task-graphs, this
makes a few changes:

 * optimization is split into thre phases, with task removal in one phase
   (following dependency links) and task replacement in the next (in the
   reverse order).
 * optimization uses class instances instead of functions for optimizations;
   this allows different functions for different phases, and also leaves open
   the possibility of composing optimizations.
 * the replacement phase can also support removal; this is when utility tasks
   like symbol uploads can be optimized away iff their parent task is
   optimized.

MozReview-Commit-ID: C5QznNpwqXn
2017-08-20 20:00:17 +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
175faf245f Bug 1383880: add only-if-dependencies-run optimization for follow-ons; r=ahal
MozReview-Commit-ID: JuhwyQIx3Mh
2017-08-25 21:18:13 +00:00
Dustin J. Mitchell
79890fc0d7 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
2017-08-23 16:21:06 +00:00
Dustin J. Mitchell
10d6e8ceb4 Bug 1383880: optimize in three phases; r=ahal
In preparation for much more thorough optimization of task-graphs, this
makes a few changes:

 * optimization is split into thre phases, with task removal in one phase
   (following dependency links) and task replacement in the next (in the
   reverse order).
 * optimization uses class instances instead of functions for optimizations;
   this allows different functions for different phases, and also leaves open
   the possibility of composing optimizations.
 * the replacement phase can also support removal; this is when utility tasks
   like symbol uploads can be optimized away iff their parent task is
   optimized.

MozReview-Commit-ID: C5QznNpwqXn
2017-08-20 20:00:17 +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
Dustin J. Mitchell
39e222aa43 Bug 1379163: make parameterization functions into utilities; r=bstack
These both have a similar form, recursing over a nested JSON structure, and are
useful outside of the modules in which they are defined.

MozReview-Commit-ID: 1bsRtlaQol7
2017-07-20 19:24:50 +00:00
Ryan VanderMeulen
5b7104b1af Merge m-c to autoland on a CLOSED TREE. a=merge 2017-05-26 15:45:41 -04:00
Joel Maher
9375aa009a Bug 1364421 - renable seta for BBB jobs. r=dustin
MozReview-Commit-ID: CLkKUKRMtWE
2017-05-26 12:09:20 -04:00
Dustin J. Mitchell
b04b5ac742 Bug 1359942: rename optimization to skip-unless-changed; r=glandium
MozReview-Commit-ID: 4d4zoDDJYnz
2017-05-23 10:22:53 -04:00
ayodeji.oyewole
aaa8085b19 Bug 1351010 - Return a single value from optimize functions; r=bstack,TheNavigat
This simplifies the return value of optimize functions:
 * False -- don't optimize
 * True -- optimize away
 * <taskId> -- replace with this task

Original patch by ayodeji.oyewole, with test updates by dustin.

MozReview-Commit-ID: HKoWcINVSnV
2017-05-16 18:03:05 +00:00
Dustin J. Mitchell
7558586019 Bug 1364421: actually disable SETA, instead of never running talos; r=bstack a=infra-fix
MozReview-Commit-ID: ABtOy6FqKKT
2017-05-13 19:15:35 +00:00
Joel Maher
365cebea54 Bug 1364421 - fix flake8 errors. r=me a=CLOSED TREE 2017-05-12 15:14:10 -04:00
Joel Maher
cb1d55e618 Bug 1364421 - temporarily disable SETA for BBB only. r=bstack, a=CLOSED TREE 2017-05-12 14:55:42 -04:00
Joel Maher
3415369015 Bug 1364421 - temporarily disable SETA. r=bstack, a=CLOSED TREE
MozReview-Commit-ID: KEoiYhR6bXs
2017-05-12 14:41:52 -04:00
Sebastian Hengst
e5c0f98909 Backed out changeset e5073b47f5c8 (bug 1351010) for failing taskcluster/taskgraph/test/test_optimize.py. r=backout 2017-04-26 16:19:19 +02:00
Ayodeji Oyewole
cbd614d7de Bug 1351010 - Fix return statements in optimize.py; r=dustin
MozReview-Commit-ID: ctgm1fw0Fo
***
Bug 1351010 - Completely fixed; r?dustin

MozReview-Commit-ID: HKoWcINVSnV
2017-04-01 15:59:36 -04:00
Joel Maher
2efc03bc5b Bug 1349667 - do not used files-changed to conditionally exclude tasks when run from a cron job. r=dustin
MozReview-Commit-ID: 9SOjTxPprMV
2017-03-24 14:02:08 -04:00
Dustin J. Mitchell
655ce811d6 Bug 1333255: only apply seta optimizations for tests; r=jonasfj
MozReview-Commit-ID: FoIlgwBe4Gd
2017-03-09 14:45:12 -05:00
Dustin J. Mitchell
154a1cb600 Bug 1333255: implement optimizations as named functions; r=jonasfj
MozReview-Commit-ID: 9xkHny7IYfA
2017-03-10 18:17:43 +00:00
Dustin J. Mitchell
67df47f36f Bug 1277579: use 'name' in dependency error message; r=kmoir
MozReview-Commit-ID: GXX5KNQOGve
2016-09-16 20:25:29 +00:00
Dustin J. Mitchell
1c449ca5e0 Bug 1286075: add support for optimizing based on files changed in the push; r=gps
MozReview-Commit-ID: 5di7TuL9X2P
2016-09-12 18:40:12 +00:00
Dustin J. Mitchell
eb9e6613fa Bug 1286075: allow optimization of tasks whose dependencies have not been optimized; r=armenzg
MikeLing initially did this in bug 1287018.  The intent of this conditional was
to make optimization faster by not even checking most tasks, based on the
assumption that if the prerequisite to a task has changed (for example, a
docker image or a build), then naturally we will want to execute that task.
However, as we have developed actual optimization methods, this has proven not
to be the case: we might want to optimize a test out if its inputs have not
changed, even if a new installer has been built.  Similarly, SETA may optimize
tasks out even if their inputs have changed.

MozReview-Commit-ID: LgHET3Z84GB
2016-09-07 00:10:51 +00:00
Kalpesh Krishna
701956d8fb Bug 1281062 - Create Action Tasks to schedule new jobs. r=dustin
MozReview-Commit-ID: 5MvqLfGrlLC
2016-07-11 22:43:58 +05:30
Dustin J. Mitchell
dd34a63fe1 Bug 1280231: rename types.py to taskgraph.py; r=Callek
MozReview-Commit-ID: Jf6CVyFCGMI
2016-06-20 19:11:52 +00:00
Dustin J. Mitchell
95e890d6db Bug 1280231: refactor task kinds to task classes; r=jonasfj
MozReview-Commit-ID: 1cNukxBgfey
2016-06-27 22:57:44 +00:00
Wes Kocher
d3e226b5f1 Backed out 3 changesets (bug 1280231) for decision task failures CLOSED TREE
Backed out changeset 4b1d94901b4d (bug 1280231)
Backed out changeset 7898d1ab1afc (bug 1280231)
Backed out changeset ba5cbf4e06a5 (bug 1280231)
2016-06-27 15:45:44 -07:00
Dustin J. Mitchell
0b73b6890c Bug 1280231: rename types.py to taskgraph.py; r=Callek
MozReview-Commit-ID: Jf6CVyFCGMI
2016-06-20 19:11:52 +00:00
Dustin J. Mitchell
c27fdb1128 Bug 1280231: refactor task kinds to task classes; r=jonasfj
MozReview-Commit-ID: 1cNukxBgfey
2016-06-20 20:45:15 +00:00
Justin Wood
46e1d74044 Bug 1280956 - Use in-tree linter job to flake8 test taskcluster directory. r=dustin
MozReview-Commit-ID: FsWmAnnycZ2
2016-06-20 21:06:55 -04:00
Dustin J. Mitchell
833bb86436 Bug 1274611: Implement task-graph optimization; r=gps
* Implement & document optimization (although legacy kind doesn't do much of it)
 * Introduce `optimize_target_tasks` parameter to control whether tasks in the
   target set can be optimized (no for try, yes for most other branches)
 * Refactor to include resolved taskIds in the optimized task graph
 * Include a `label-to-taskid.json` artifact.
 * Introduce {'task-reference': '... <dependency-name> ...'} for referring to
   parent tasks' taskId.

MozReview-Commit-ID: LWvlWNz49U5
2016-06-05 19:49:41 +00:00