Commit Graph

99 Commits

Author SHA1 Message Date
Iris Hsiao
a28f0ee740 merge mozilla-inbound to mozilla-central a=merge 2016-09-26 18:34:20 +08:00
Dustin J. Mitchell
66c14f0dc6 Bug 1302227: set the taskGroupId to match the decision task; r=garndt
In this case, the tasks must have the same schedulerId as the existing task,
so this is calculated using parameters['level'].

MozReview-Commit-ID: G8EE2kvFstT
2016-09-22 21:30:56 +00:00
Dustin J. Mitchell
b08faca9d5 Bug 1277579: fix taskgraph tests after code change; r=philor
MozReview-Commit-ID: 7wJWFhcnA5s
2016-09-17 00:54:39 +00:00
Dustin J. Mitchell
b5148a1840 Bug 1286075: delete the legacy kind; r=mshal
MozReview-Commit-ID: F99tUGUWj6d
2016-09-08 00:31:35 +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
f0e186cfc5 Bug 1286075: fix target task generation, including try; r=Callek
This uses the run_on_projects attribute introduced earlier for most branches,
adjusts the `ash` method to handle that branch as the legacy implementation
did, and updates try syntax to match builds as well as tests.

In the process, this enables optimizing target tasks, meaning that tasks
specifically requested in the try syntax might be optimized.  While this is
probably not ideal, it matches the existing behavior of try (where `-j all` is
the default but all jobs are set to run only when certain files have been
modified).  This change can be reverted later, in a more advanced version of
try.

MozReview-Commit-ID: 5FYeUTAsafr
2016-09-12 18:41:58 +00:00
Dustin J. Mitchell
28515da8c6 Bug 1286075: factor load_yaml into a util module; r=gps
MozReview-Commit-ID: DPWZWslcphy
2016-09-06 18:01:27 +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
Dustin J. Mitchell
d9d4600c28 Bug 1286075: improve dict merging support; r=gps
MozReview-Commit-ID: D3691sf2LqZ
2016-08-19 18:12:40 +00:00
Justin Wood
fc47ef6bc5 Bug 1293789 - Single Locale in TC - Add task def for try. r=rail
MozReview-Commit-ID: 7n2NqqHj9wL
2016-09-03 10:32:22 -04:00
Geoff Brown
50f1e6a143 Bug 1274578 - Do not use alias when specific try -u test requested; r=dustin 2016-08-16 14:56:45 -06:00
Dustin J. Mitchell
22ce8a311d Bug 1293397: fix fake to make tests pass? r=armenzg
MozReview-Commit-ID: AuQBk2w8Ka1
2016-08-08 21:03:38 +00:00
Gregory Szorc
253c498807 Bug 1290611 - Normalize mode of created file in tests; r=dustin
Without this, current umask may influence test results. That was
causing differences between automation and local runs.

MozReview-Commit-ID: 1eu613aBpKB
2016-08-02 08:36:19 -07:00
Dustin J. Mitchell
83ad8880df Bug 1290611: make test_p_expands_ridealongs resilient; r=gps
Use the source RIDEALONG_BUILDS value in the module under test so that changes
to that variable do not cause the test to fail.

MozReview-Commit-ID: EfHQ7baBziB
2016-07-29 23:01:04 +00:00
Dustin J. Mitchell
29364a87ea Bug 1290611: fix test_generate_context_hash; r=gps
The existing hash was for an empty tarfile.  Oops!

MozReview-Commit-ID: 1KOZxnDmoOH
2016-07-29 22:54:18 +00:00
Gregory Szorc
3b60ffe817 Bug 1288567 - Inline create_context_tar; r=dustin
The function was only used once and was providing little to no value.

A test of this function has been removed. Tests for the lower-level
context creation function are sufficient.

MozReview-Commit-ID: D9EhmZQlqG5
2016-07-25 11:48:20 -07:00
Gregory Szorc
47830cf2f1 Bug 1288567 - Add special Dockerfile syntax to add arbitrary files to context; r=dustin
A limitation of traditional docker build context generation is it
only includes files from the same directory as the Dockerfile. When
repositories have multiple, related Dockerfiles, this limitation
results file duplication or putting all Dockerfiles in the same
directory (which isn't feasible for mozilla-central since they would
need to be in the root directory).

This commit enhances Dockerfiles to allow *any* file from the
repository checkout to be ADDed to the docker build context.

Using the syntax "# %include <path>" you are able to include paths
or directories (relative from the top source directory root) in the
generated context archive. Files add this way are available under the
"topsrcdir/" path and can be ADDed to Docker images.

Since context archive generation is deterministic and the hash of
the resulting archive is used to determine when images need to be
rebuilt, any extra included file that changes will change the hash
of the context archive and force image regeneration.

Basic tests for the new feature have been added.

MozReview-Commit-ID: 4hPZesJuGQV
2016-07-21 16:51:30 -07:00
Gregory Szorc
1498dcf793 Bug 1288567 - Use create_context_tar in generate_context_hash; r=dustin
This restores order to only having a single hash for a context
directory.

Using a tempfile here is a bit unfortunate. It can be optimized later,
if needed.

MozReview-Commit-ID: LMNsvt3fDYx
2016-07-22 12:46:06 -07:00
Gregory Szorc
a3dd46e83d Bug 1288567 - Add basic test for context tar creation; r=dustin
Now that the context tar creation function is standalone and doesn't
rely on external state, we can start unit testing it easier.

We establish a basic unit test that verifies the function works as
advertised and that output is deterministic.

MozReview-Commit-ID: H4MY28PiHSN
2016-07-22 10:57:27 -07:00
Dustin J. Mitchell
7f8ec1b437 Bug 1281004: Specify test tasks more flexibly; r=gps; r=gbrown
This introduces a completely new way of specifying test task in-tree,
completely replacing the old spider-web of YAML files.

The high-level view is this:

 - some configuration files are used to determine which test suites to run
   for each test platform, and against which build platforms

 - each test suite is then represented by a dictionary, and modified by a
   sequence of transforms, duplicating as necessary (e.g., chunks), until
   it becomes a task definition

The transforms allow sufficient generality to support just about any desired
configuration, with the advantage that common configurations are "easy" while
unusual configurations are supported but notable for their oddness (they
require a custom transform).

As of this commit, this system produces the same set of test graphs as the
existing YAML, modulo:

  - extra.treeherder.groupName -- this was not consistent in the YAML
  - extra.treeherder.build -- this is ignored by taskcluster-treeherder anyway
  - mozharness command argument order
  - boolean True values for environment variables are now the string "true"
  - metadata -- this is now much more consistent, with task name being the label

Testing of this commit demonstrates that it produces the same set of test tasks for
the following projects (those which had special cases defined in the YAML):

  - autoland
  - ash (*)
  - willow
  - mozilla-inbound
  - mozilla-central
  - try:
    -b do -p all -t all -u all
    -b d -p linux64,linux64-asan -u reftest -t none
    -b d -p linux64,linux64-asan -u reftest[x64] -t none[x64]

(*) this patch omits the linux64/debug tc-M-e10s(dt) test, which is enabled on
ash; ash will require a small changeset to re-enable this test.

IGNORE BAD COMMIT MESSAGES (because the hook flags try syntax!)

MozReview-Commit-ID: G34dg9f17Hq
2016-07-11 23:27:14 +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
Kalpesh Krishna
de61f99d07 Bug 1285755 - Adding a from_json function to TaskGraph and each Task subclass. r=dustin
MozReview-Commit-ID: 8fmALSP8nDs
2016-07-11 22:39:04 +05:30
Dustin J. Mitchell
d7455c195e Bug 1281004: factor out searching for python objects by path; r=gps
MozReview-Commit-ID: 4ioEqPA7BQk
2016-06-29 22:12:09 +00:00
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
9a56719bd1 Bug 1280231: Load kinds in order by dependencies; r=jonasfj
This enables kinds that generate tasks based on those output by another kind.
For example, the test kind might generate a set of test tasks for each build
task.

MozReview-Commit-ID: K7ha9OmJ6gd
2016-06-27 22:31:06 +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
afbf045084 Bug 1280231: Load kinds in order by dependencies; r=jonasfj
This enables kinds that generate tasks based on those output by another kind.
For example, the test kind might generate a set of test tasks for each build
task.

MozReview-Commit-ID: K7ha9OmJ6gd
2016-06-27 22:31:06 +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
Justin Wood
01e2ab21a8 Bug 1280914 - Fix test_create after "Bug 1276216 - All tasks with no other dependencies should depend on the decision task"
MozReview-Commit-ID: CCdXafMIDUD
2016-06-20 10:22:15 -04:00
Justin Wood
7b36b1a0c6 Bug 1280904 - Fix test_decision after Bug 1277417 Output JSON from mach taskgraph commands. r=dustin
MozReview-Commit-ID: Iymc0k5GeVK
2016-06-14 14:19:50 -04:00
Justin Wood
4dbf0a1449 Bug 1171736 - Add taskcluster scheduling logic (on try) for linux l10n. r=sfink
MozReview-Commit-ID: Auz7sOW5Ptr
2016-06-06 16:09:51 -04:00
Sebastian Hengst
f35806845d Backed out changeset c7ddd550008c (bug 1171736) for breaking gecko-decision opt. r=backout on a CLOSED TREE 2016-06-12 21:01:43 +02:00
Justin Wood
821fad6f16 Bug 1171736 - Add taskcluster scheduling logic (on try) for linux l10n. r=sfink
MozReview-Commit-ID: Auz7sOW5Ptr
2016-06-06 16:09:51 -04:00
Dustin J. Mitchell
2779596fe2 Bug 1275409: remove taskcluster_graph.build_task; r=wcosta
MozReview-Commit-ID: IphYcikdlxX
2016-06-04 21:11:59 +00:00
Dustin J. Mitchell
260859ce70 Bug 1275409: move taskcluster_graph.commit_parser; r=wcosta
MozReview-Commit-ID: JWCzOWVUEP6
2016-06-04 21:09:18 +00:00
Dustin J. Mitchell
8bc81a73e8 Bug 1275409: remove taskcluster_graph.image_builder; r=wcosta
MozReview-Commit-ID: 21HBtcDVPXC
2016-06-06 18:55:10 +00:00
Dustin J. Mitchell
317e49e5f6 Bug 1275409: move taskcluster_graph.from_now to taskgraph.util.time; r=wcosta
MozReview-Commit-ID: 3GFO4f34dg8
2016-06-04 19:20:07 +00:00
Dustin J. Mitchell
2ccf79973b Bug 1275409: move templates to taskgraph.util; r=wcosta
MozReview-Commit-ID: 3vdnm20W4OD
2016-06-05 18:34:22 +00:00
Dustin J. Mitchell
6df2fabd03 Bug 1277417: output task information in JSON or just labels; r=ahal
The JSON output is suitable for processing with `jq` to extract features of
interest.

MozReview-Commit-ID: 5wpV7sXlOz3
2016-06-07 03:09:48 +00:00
Dustin J. Mitchell
999f47ed79 Bug 1276216: make any tasks without dependencies depend on the decision task; r=ahal
MozReview-Commit-ID: 5k5jC7CCHNW
2016-06-06 17:23:03 +00:00
Dustin J. Mitchell
ee0ff9e682 Bug 1274611: implement docker image builds as a distinct kind; r=wcosta
MozReview-Commit-ID: 81Ad9LcBdx6
2016-06-05 19:15:53 +00: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
Dustin J. Mitchell
1b37a54f15 Bug 1269340: add support for try -t option; r=jmaher
This adds support for the `-t`/`--talos` option, matching such jobs against
`talos_try_name`.  There are no such tasks just yet.

MozReview-Commit-ID: FTEx7Nyyi9Z
2016-05-18 17:55:33 +00:00
Dustin J. Mitchell
856120aa44 Bug 1273673: use Python logging for taskgraph generation; r=gps
MozReview-Commit-ID: EYI6hGFUWP8
2016-05-18 18:02:51 +00:00
Dustin J. Mitchell
2db03e8aeb Bug 1258497: Implement a new taskgraph generation system; r=gps
The `taskgraph` package generates TaskCluster task graphs based on collections
of task "kinds".  Initially, there is only one kind, the "legacy" kind, which
reads the YAML files from `testing/taskcluster/tasks` to generate the task
graph.

Try syntax is implemented by filtering the tasks in the taskgraph after it has
been created, then extending the result to include any prerequisite tasks.

A collection of `mach taskgraph` subcommands are provided for developers to
extend or debug the task-graph generation process.

MozReview-Commit-ID: 1TJCns4XxZ8
2016-05-16 22:53:22 +00:00
Kalpesh Krishna
c9a71b5cf2 Bug 1304428 - Adding a from_json test in decision task. r=jlund
MozReview-Commit-ID: 7QgfSutjoFZ
2016-09-23 19:26:39 +05:30