Commit Graph

201 Commits

Author SHA1 Message Date
Dustin J. Mitchell
935b8b7768 Bug 1403342 - default to -j none and do not optimize_target_tasks for try; r=ahal
With this in place, all `-j`obs will not run by default on try.  This will omit
such jobs in most try pushes even if files-changed matches. This is
unfortunate, but better than running them unconditionally.  Fuzzy selections,
and later `just try it` pushes, are the ultimate solution here.

With this change, a push with no try syntax or try_task_config.json will schedule
no tasks at all.

MozReview-Commit-ID: FGjqlDW1FT6
2017-10-03 21:15:15 +00:00
Tom Prince
25e12b05a3 Bug 1385055 - Add some taskgraph parameters for dealing with comm-central and related repositories. r=dustin
MozReview-Commit-ID: 4tdxfJcx8Fz
2017-07-27 12:26:48 -06:00
Andrew Halberstadt
cb3e21d4f2 Bug 1404067 - [tryselect] Improve error message on parameter mismatch, r=dustin
MozReview-Commit-ID: GMiGuNApoUF
2017-09-28 15:25:34 -04:00
Brian Stack
6ad9f15c6b Bug 1400223 - Merge tasks added by action tasks into graphs used for subsequent tasks r=dustin
MozReview-Commit-ID: 7ZTbS5h0vPA
2017-09-20 12:52:29 -07:00
Justin Wood
51d92af27f Bug 1402457 - Add periodic file update task, but don't run it yet. r=dustin
MozReview-Commit-ID: GD7qRLxwDn5
2017-09-22 14:25:28 -04: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
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
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
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
Simon Fraser
0ab9dada04 Bug 1342392 Migrate partial update generation in-tree r=rail
MozReview-Commit-ID: G6EFXY0UzSa
2017-09-18 13:36:36 +01:00
Sebastian Hengst
f1bbda3eeb Backed out changeset 0d71c0be62de (bug 1342392) for bustage in partial update generator for docker images: recompress.sh not found. r=backout 2017-09-18 14:15:42 +02:00
Simon Fraser
d2b8ac4d0d Bug 1342392 Migrate partial update generation in-tree r=rail
MozReview-Commit-ID: 84fP48sMYhS
2017-09-15 11:04:35 +01:00
Sebastian Hengst
ca434b9d52 Backed out changeset a43387ee65d7 (bug 1342392) for failing flake8 and py-compat jobs. r=backout 2017-09-18 13:50:16 +02:00
Simon Fraser
498d6b87a7 Bug 1342392 Migrate partial update generation in-tree r=rail
MozReview-Commit-ID: 84fP48sMYhS
2017-09-15 11:04:35 +01:00
Sebastian Hengst
5c8ae89c25 merge autoland to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 59J88HMKk7r
2017-09-12 11:32:53 +02:00
Wes Kocher
d62fefa0af Backed out 2 changesets (bug 1342392) for bustage a=backout
Backed out changeset b0e86286b173 (bug 1342392)
Backed out changeset 01bf0c29331e (bug 1342392)

MozReview-Commit-ID: 71fcOZ2RgEp
2017-09-11 17:35:09 -07:00
Ralph Giles
9fd216c317 Bug 1398915 - Tasks can have interdependencies within the same kind. r=dustin
Per IRC dicussion, there is no technical or policy restriction on dependencies
within a task kind. Update the documentation to remove the out-of-date mention
of this limitation. In particular, toolchain build tasks tend to depend on
each other.

MozReview-Commit-ID: K6p0mxyjcvY
2017-09-11 13:05:45 -07:00
Simon Fraser
278648e798 Bug 1342392 Move partial update generation in-tree r=dustin,jlorenzo 2017-09-11 09:55:52 +01:00
Sebastian Hengst
27461f48cf Backed out 2 changesets (bug 1342392) for adding .orig file and flake lint failures. r=backout on a CLOSED TREE
Backed out changeset bf0bcdc7482e (bug 1342392)
Backed out changeset 7f5ae5ff1181 (bug 1342392)
2017-09-11 10:38:08 +02:00
Simon Fraser
e9d9241564 Bug 1342392 Move partial update generation in-tree r=dustin,jlorenzo 2017-09-11 09:24:10 +01:00
Sebastian Hengst
7ae593ebcf Backed out changeset c25af2c111a5 (bug 1383880) 2017-09-06 17:47:51 +02:00
Sebastian Hengst
cd4005d4a7 Backed out changeset b53ff084c2d7 (bug 1383880) 2017-09-06 17:47:45 +02:00
Dustin J. Mitchell
40fa2c8f48 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
a8cf91e988 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
Sebastian Hengst
1f22e7f4c1 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 17ViEoPyjPa
2017-09-05 23:55:39 +02:00
Nick Fitzgerald
6af810fd84 Bug 1277338 - Part 10: Add the SM-tc(rust) taskcluster task; r=sfink
This adds a new SpiderMonkey taskcluster test task that builds and tests the
js/rust crate.
2017-09-05 09:26:21 -07:00
Dustin J. Mitchell
8baac61f75 Bug 1396022: combine docker docs, talk about hsahes; r=garndt
MozReview-Commit-ID: A27Qoemw2T3
2017-09-01 17:47:46 +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
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
eb4e3749a5 Bug 1394883: update docs about docker hashes; r=wcosta
MozReview-Commit-ID: AwMWyCWs4aS
2017-08-30 16:05:10 +00:00
Dustin J. Mitchell
e323a864d3 Bug 1394883: clean up some leftover uses of /home/worker; r=wcosta
MozReview-Commit-ID: BssKG9QNVe1
2017-08-30 15:19:19 +00:00
Phil Ringnalda
b00e26f42d Backed out 4 changesets (bug 1394883) for Windows signing chain-of-trust failures
CLOSED TREE

Backed out changeset e3f42eca51c1 (bug 1394883)
Backed out changeset 081f830cf285 (bug 1394883)
Backed out changeset 9426705a05af (bug 1394883)
Backed out changeset 3a579a5054ef (bug 1394883)

MozReview-Commit-ID: 2viO8A8arHd
2017-08-31 20:02:34 -07:00
Dustin J. Mitchell
ae48d87a7a Bug 1394883: update docs about docker hashes; r=wcosta
MozReview-Commit-ID: AwMWyCWs4aS
2017-08-30 16:05:10 +00:00
Dustin J. Mitchell
d69366bba8 Bug 1394883: clean up some leftover uses of /home/worker; r=wcosta
MozReview-Commit-ID: BssKG9QNVe1
2017-08-30 15:19:19 +00:00
Brian Stack
fc668c6f6c Bug 1394026 - Add docs for new action tasks definition format r=dustin
MozReview-Commit-ID: IeB9QGwI761
2017-08-29 10:53:13 -07:00
Johan Lorenzo
9d82d58d34 Bug 1384482 - Rename android-api-15 into android-api-16 r=mtabara
MozReview-Commit-ID: 4j66pTZEJzq
2017-08-09 16:18:15 +02:00
Gregory Szorc
a7ff09d251 Bug 1390700 - Support sparse checkouts in run-task; r=dustin
`run-task` is taught a --sparse-profile argument to be passed down
to `hg robustcheckout` for the main source checkout. It does what
you expect: performs a sparse checkout using the named profile.

The Taskgraph YAML for run-task is taught a "sparse-profile"
property to define the sparse profile. When defined, --sparse-profile
will be passed down to `run-task` and the cache name will be updated
to reflect the use of sparse checkout.

Our cache checking transform is updated to audit for the use of
--sparse-profile without the corresponding "-sparse" cache name
variation.

The reason we need a distinct cache name for sparse is because
clients that aren't sparse aware will be unable to read checkouts
that are sparse. By forcing sparse and non-sparse into different
cache pools, we avoid compatibility issues.

In the ideal world, we probably support sparse profiles on all the
VCS checkouts that `run-task` supports (e.g. --tools-checkout).
Perfect is the enemy of done. All of this is defined in-tree and
it is easy enough to change atomically.

MozReview-Commit-ID: 79k7Vul0hHO
2017-08-23 18:54:14 -07:00
Dustin J. Mitchell
c73a5bb8f8 Bug 1391776: cleanup of taskgraph docs; r=ahal
* eliminate heading for test kinds, of which there is now only one
* make the caches document have a single heading in the TOC
* break out mach commands into a separate document, add ./mach taskgraph morphed
* remove docs for YAML templates support (the .yml file wasn't actually
  used -- I expect it was a merge leftover); these are still used for actions.yml,
  but once that is gone the code should be removed, too.
* break try out into its own document, edit to distinguish "how to run try"
  from "how to generate config"

MozReview-Commit-ID: 76ZopWA9TPL
2017-08-23 15:22:10 -04:00
Gregory Szorc
ff6e79eb22 Bug 1391789 - Improve cache coherence via run-task integration; r=dustin
Today, cache names are mostly static and are brittle as a result.

In theory, when a backwards incompatible change is performed on
something that touches a cache, the cache name needs to be changed
to ensure tasks running the old code don't see cached data from the
new task. (Alternatively, all code is forward compatible, but that is
hard to implement in practice.)

For many things, the process works as planned. However, not everyone
knows that cache names need changed. And, it isn't always obvious
that some things require fresh caches. When mistakes are made, tasks
break intermittently due to cache wonkiness.

One area where we get into trouble is with UID and GID mismatch.
Task A will use a Docker image where our standard "worker" user/group
is UID/GID 1000:1000. Then Task B will use UID/GID 500:500. (This is
common when mixing Debian and RedHel based distros.) If they use the
same cache, then Task B needs to chown/chmod all files in the cache
or there could be a permissions problem. This is exactly why
run-task recursively chowns certain paths before dropping root
privileges.

Permissions setting in run-task solves permissions problems. But
it doesn't solve content incompatibility problems. For that, you
need to change cache names, not use caches, or blow away content
when incompatibilities are detected.

This commit starts the process of adding a little bit more coherence
to our caching story.

There are two main features in this commit:

1) Cache names tied to run-task content
2) Cache validation in run-task

Taskgraph now detects when a task is using caches with run-task. When
caches and run-task are both being used, the cache name is adjusted to
contain a hash of run-task's content. When run-task changes, the cache
name changes. So, changing run-task ensures that all caches from that point
forward are "clean." This frees run-task and any functionality related
to run-task (such as maintaining version control checkouts) from
having to maintain backwards or forwards compatibility with any other
version of run-task. This does mean that any changes to run-task
effectively wipe out caches. But changes to run-task tend to be
seldom, so this should be acceptable.

The second part of this change is code in run-task to record per-cache
properties and validate whether a populated cache is appropriate for
use. To enable this, taskgraph passes a list of cache paths via an
environment variable. For each cache path, run-task looks for a
well-defined file containing a list of "requirements." Right now,
that list is simply a version string. But other features will be
worked into it. If the cache is empty, we simply write out a new
requirements file and are done. If the file exists, we compare
requirements and fail fast if there is a mismatch. If the cache
has content but not this special file, then we abort (because this
should never happen).

The "requirements" validation isn't very useful now because the only
entry comes from run-task's source code and modifying run-task will
change the hash and cause a new cache to be used. The implementation
at this point is more demonstrating the concept than doing anything
terribly useful with it.

MozReview-Commit-ID: HtpXIc7OD1k
2017-08-18 14:07:03 -07:00
Gregory Szorc
90bc333dde Bug 1391789 - Make tooltool cache level dependent; r=dustin
Caches shared across levels scare me, even if readers are purported to
perform content verification. We shouldn't take any risks with released
Firefox builds being contaminated by e.g. Try tasks.

Also, the old cache name interferes with my desire to make cache
names dynamic. This requires dynamic scopes. We already have
have level-{{level}}-* scopes for caches. So having all caches
prefixed with this makes things flexible.

MozReview-Commit-ID: LsrcxIYoEh1
2017-08-18 16:15:44 -07:00
Wes Kocher
9a9581c0d5 Merge m-c to inbound, a=merge
MozReview-Commit-ID: EgYue63nSkv
2017-08-18 16:29:11 -07:00
Ted Mielczarek
71d8561dc1 bug 1259832 - add a post-build task to upload generated source files. r=dustin
This change adds an upload-generated-sources task kind that runs after nightly
builds, fetches their `target.generated-files.tar.gz` artifact, and uploads
all the contained files to an S3 bucket. For actual nightly and release builds
on SCM level 3 trees, the S3 bucket is configured to be publicly accessible,
so that tools like Socorro will be able to fetch generated source files that
appear in crash reports, and debuggers will be able to fetch generated sources
when they show up while debugging Nightly or Release builds.

There are also level-2 and level-1 S3 buckets configured for builds happening
on trees of other levels such as try. They are not configured as publicly
accessible, but they exist so that these tasks can be tested in try.

MozReview-Commit-ID: Js1HRftbtep
2017-08-09 14:32:05 -04: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
Dustin J. Mitchell
9084bfc3f4 Bug 1390938: only use one top-level heading; r=bstack
MozReview-Commit-ID: DKRdlCx6Ng8
2017-08-16 16:26:58 +00:00
Brian Stack
b66151f391 Bug 1389248 - Move actions spec to taskcluster docs r=dustin
MozReview-Commit-ID: BsYRmivUZZ7
2017-08-10 13:59:05 -07:00
Simon Fraser
d73f893ae6 Bug 1387044 Update taskgraph how-to with mention of 'gron' r=dustin DONTBUILD
MozReview-Commit-ID: I3c9p014MF8
2017-08-03 14:30:59 +01:00
Mike Hommey
35f3fd9ad6 Bug 1386149 - Allow build jobs to use toolchain aliases instead of toolchain job names. r=dustin
It is desirable for e.g. smooth toolchain transitions, to be able to
refer them with generic name from toolchain jobs, while they have more
specific names, including version numbers. For example, in a near
future, there could be a linux64-gcc-4.9 toolchain and a linux64-gcc-6.
The default would be former, but at some point we'd want to switch to
the latter, without having to change all the toolchain definitions.

Moreover, when the switch happens, it would be desirable to have some
jobs stick with the old version, which is hard to keep track of when
all the toolchain definitions for build jobs use the same versioned
toolchain. With an alias, jobs that want the default use the alias, and
jobs that want to use a specific version use the versioned toolchain
name.
2017-07-27 18:02:38 +09:00
Andrew Halberstadt
9cbe59ace4 Bug 1380306 - Create a new 'try_task_config' method for scheduling tasks on try, r=dustin
This introduces a 'try_task_config' method of scheduling. En lieu of (or in addition to) try
syntax, you can now check in a file called 'try_task_config.json' to the root of the source
tree. The format is either a list of task labels, or dict where task labels are the keys.
Taskcluster will simply schedule any tasks that are listed there.

This file is primarily meant to be generated by tools (which don't exist yet), as the json
format is much easier for tools to generate or consume. These tools should use an in-memory
commit to add the file so it is automatically removed again after the push.

A server-side hook will be added in bug 1380357 to prevent this file from accidentally
landing on non-try trees.

MozReview-Commit-ID: 2zKfZXuuDhH
2017-06-27 13:33:20 -07:00