Commit Graph

165 Commits

Author SHA1 Message Date
Tom Prince
418068d917 Bug 1408145: Report comm-central revision to treeherder when building from a comm branch; r=dustin
MozReview-Commit-ID: A1HUqmit7ew
2017-10-10 09:47:28 -06:00
Brian Stack
74ceb528a9 Bug 1393277 - Record information about action tasks to support cot r=aki
MozReview-Commit-ID: Kyyh6G6yw2W
2017-09-22 12:48:33 -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
Tom Ritter
32e47f847b Bug 1330608 Add the MinGW32 toolchain build to Taskcluster r=glandium
MozReview-Commit-ID: JHS6y8kqr4T
2017-09-22 00:24:58 -05: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
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
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
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
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
Peter Moore
aeb85d1bb4 Bug 1382204 - enable coalescing on macOS/win10-gpu tests and disable on linux builds,r=dustin 2017-09-13 12:30:07 +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
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
Gregory Szorc
9ae6317d4e Bug 1397503 - Vary cache name when using out-of-tree Docker images; r=dustin
We currently vary the cache name for run-task tasks whenever run-task
changes. This allows us to not worry about backwards or forwards
compatibility of caches in run-task tasks.

This strategy doesn't work for out-of-tree Docker images because
the content of run-task cannot be determined at Taskgraph time:
the content of run-task was determined when that Docker image was
built and there is no way to get that content efficiently during
Taskgraph.

So, for out-of-tree Docker images we now vary the cache name by
the Docker image value, which includes its name and a tag or
hash. This means that out-of-tree run-task tasks will get separate
caches for each distinct Docker image.

This isn't ideal. Ideally we would share caches if run-task doesn't
vary between Docker images. But without any way of proving that
at Taskgraph time, we take the safe road and force cache separation.

MozReview-Commit-ID: FMiQBqfvjqW
2017-09-06 16:09:15 -07:00
Gregory Szorc
d695303742 Bug 1397503 - Perform cache sanitization for image_builder tasks; r=dustin
The image_builder Docker image doesn't set a "command" in its task
definition. The image instead relies on a RUN in its Dockerfile to
control the started command. This command is a shell script which
eventually runs run-task.

This all means that image_builder tasks are executing run-task but
the cache sanitization implemented in bug 1391476 isn't getting
applied to those tasks. This means run-task could barf due to
constraint violations due to improperly configured caches.

The fix for this is to teach the generic task transform that
image_builder tasks use run-task. The effect of this is that
some environment variables get set and the cache name changes
depending on the contents of run-task.

MozReview-Commit-ID: IFqsDxD0eDh
2017-09-06 15:35:13 -07:00
Andrew Halberstadt
ada64d6ce5 Bug 1395717 - Use filename source-test tasks are defined in as part of their label, r=dustin
This creates a new "job-from" field that contains the relative filename the job was defined
in. The filename is relative to 'config.path'. If the task came from the 'jobs' key defined
in kind.yml, this field will be set to 'kind.yml'.

MozReview-Commit-ID: 9e1tEb6XuZT
2017-08-31 16:38:08 -04:00
J. Ryan Stinnett
db0f6d33f4 Bug 1330412 - Clean up Stylo Treeherder symbols. r=jmaher
Clean up and standardize Treeherder symbols for Talos and AWSY tasks:

* Stylo disabled groups include `sd`
* Stylo sequential groups include `ss`

MozReview-Commit-ID: 7cl6e0XvXNO
2017-09-01 13:07:48 -05:00
J. Ryan Stinnett
01b2168ab5 Bug 1330412 - Convert Stylo jobs to Stylo disabled. r=jmaher
Convert all jobs that were exercising Stylo enabled to Stylo disabled instead.

Stylo enabled is now handled by the default jobs.

In Perfherder, Stylo enabled jobs will be untagged and take over the existing
Gecko series.  Stylo disabled jobs will have a new `stylo-disabled` tag and
create a new series.

MozReview-Commit-ID: BMXBRg3A95j
2017-08-31 11:18:46 -05: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
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
Brian Stack
5cbbcfb49d Bug 1394026 - Tag tasks with os and worker implementation. r=dustin
MozReview-Commit-ID: GWNiq6a3hlZ
2017-08-25 15:30:34 -07: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
Gregory Szorc
3641ed7fbf Bug 1391476 - Add UID and GID to cache parameters; r=dustin
The UID and GID that a task executes under is dynamic. As a result,
caches need to be aware of the UID and GID that owns files otherwise
subsequent tasks could run into permission denied errors. This is
why `run-task --chown-recursive` exists. By recursively changing
ownership of persisted files, we ensure the current task is able
to read and write all existing files.

When you take a step back, you realize that chowning of cached
files is an expensive workaround. Yes, this results in cache hits.
But the cost is you potentially have to perform hundreds of thousands
of I/O system calls to mass chown. The ideal situation is that
UID/GID is consistent across tasks on any given cache and
potentially expensive permissions setting can be avoided. So, that's
what this commit does.

We add the task's UID and GID to run-task's requirements. When we
first see a cache, we record a UID and GID with it and chown the
empty cache directory to that UID and GID. Subsequent tasks using
this cache *must* use the same UID and GID or else run-task will
fail.

Since run-task now guarantees that all cache consumers use the same
UID and GID, we can avoid a potentially expensive recursive chown.

But there is an exception. In untrusted environments (namely Try),
we recursively chown existing caches if there is a uid/gid mismatch.
We do this because Try is a sandbox and any random task could
experiment with a non-standard uid/gid. That populated cache would
"poison" the cache for the next caller. Or vice-versa. It would be
annoying if caches were randomly poisoned due to Try pushes that
didn't realize there was a UID/GID mismatch. We could outlaw "bad"
UID and GIDs. But that makes the barrier to testing things on Try
harder. So, we go with the flow and recursively chown caches in
this scenario.

This change will shine light on all tasks using inconsistent UID
and GID values on the same cache. Bustage is anticipated.
Unfortunately, we can't easily know what will break. So it will be
one of those things where we will have to fix problems as they arise.
Fortunately, because caches are now tied to the content of run-task,
we only need to back out this change and tasks should revert to caches
without UID and GID pinning requirements and everything will work
again.

MozReview-Commit-ID: 2ka4rOnnXIp
2017-08-22 16:49:26 -07:00
Gregory Szorc
6be419bf57 Bug 1391476 - Tell run-task about volumes so it can sanitize them; r=dustin
We recently introduced support for telling run-task about caches so
it could sanitize them automatically. We also recently taught
docker-worker and docker-engine how to declare volumes.

Building on that work, we now pass a list of paths corresponding
to Docker volumes to run-task.

run-task now verifies volumes behave as expected. Unless the volume
paths correspond to caches, run-task verifies they are empty and chowns
them to an appropriate owner.

Requiring empty volumes is an arbitrary decision. But as the inline
comment says, it keeps things simpler and makes caches and volumes
behave more like each other.

MozReview-Commit-ID: 5lm2uIitrS3
2017-08-23 10:47:37 -07:00
Gregory Szorc
140cd1126c Bug 1391476 - Require that all cache paths be declared as volumes; r=dustin
See the inline comment for the rationale here.

This check may not catch all volumes and caches. But after subsequent
commits refactor how permissions for caches and volumes are handled,
this edge case will likely result in permissions errors in the task,
so it isn't worth worrying about.

Several Dockerfile have been updated to add missing VOLUME so the check
passes.

In the case of desktop1604-test, we stopped removing
/home/worker/.cache because you can't remove a mount point, which is
what volumes are inside Docker containers.

MozReview-Commit-ID: GEyNkkX00kN
2017-08-23 08:57:59 -07:00
Gregory Szorc
da0635b42a Bug 1391476 - Capture Docker volumes in docker-worker config; r=dustin
Docker volumes are host-mounted filesystems. We typically mount
caches at their location. But not always. The reason we define
VOLUME in Dockerfiles is we're guaranteed to get a fast host
filesystem instead of AUFS when a cache isn't mounted.

In this commit, we teach the docker-worker payload builder about
the existence of Docker volumes. Docker volumes can be declared
inline in the YAML. More conveniently, we automatically parse out
VOLUME lines from corresponding in-tree Dockerfile.

We'll do useful things with this data in subsequent commits.

MozReview-Commit-ID: BNxp8EDEYw
2017-08-23 08:53:56 -07:00
Gregory Szorc
c122832581 Bug 1391476 - Track whether caches should be used in untrusted environments; r=dustin
Previously, we conditionally added caches to a task if the current
parameters warranted it.

In order to audit that all caches fulfill basic requirements, we need
to have unconditional knowledge of all caches.

This commit introduces an optional key on each cache entry stating
whether it should be skipped in "untrusted" environments. When we
convert a task definition to a worker payload, we filter out these
caches if necessary.

This change uncovered an inconsistency with filtering caches. In
one location we filtered on the source repo name. In others, we
filtered on the SCM level.

Setting the caches in the spidermonkey kind also changed slightly
to ensure we're not overwriting existing caches. I don't think this
has any behavior changes. But the new method is more correct.

MozReview-Commit-ID: 1crpdWHqQ68
2017-08-22 15:06:40 -07:00
Andrew Halberstadt
5974a0f9bd Bug 1391675 - [tryselect] Add a test for 'mach try fuzzy' and associated task, r=gps
Basic test to get the ground work laid out.

MozReview-Commit-ID: LmjA3Kq7xKN
2017-08-21 11:52:28 -04:00
Gregory Szorc
02ead359ab Bug 1391789 - Validate certain caches are used with run-task; r=dustin
run-task just grew features to aid with cache validation.
Attempts by run-task to use caches not under its control will fail.

So, we add a transform that audits for and ensures that certain
caches are only being used with run-task. This will help catch
stragglers attempting to use e.g. the legacy VCS checkouts or
tooltool caches without run-task. Fortunately, there are no
violations for this policy. Yay!

MozReview-Commit-ID: LBCmDUdgcuM
2017-08-18 15:30:32 -07: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
Andrew Halberstadt
4cb029561b Bug 1387135 - Tag all tasks with their kind, r=dustin
MozReview-Commit-ID: DqMKNbSmgj3
2017-08-16 15:52:18 -04:00
Tom Prince
a6dee70925 Bug 1385094 - Allow support for taskgraph taks to refer to indexed docker images, in addition to in-tree and docker-hub images. r=dustin
MozReview-Commit-ID: HFmsBswwsA1
2017-07-27 14:39:51 -06:00
Joel Maher
215f3ee9ef Bug 1383789 - Enable Stylo Talos tests on more desktop platforms. r=rwood
MozReview-Commit-ID: IcJc46A3izI
2017-08-16 10:21:06 -04:00
Dustin J. Mitchell
34258f751c Bug 1382729: allow uploading docs at all levels; r=gps
The upload now uses MOZ_SCM_LEVEL to determine which secret and bucket to
upload to, so it can potentially run at any level.

This also modifies task descriptions to allow {level} in scopes, and updates
try syntax to allow `-j doc-upload` even though run-on-tasks says it doesn't
run on try by default.

MozReview-Commit-ID: Dm27TGPa7IM
2017-08-08 19:13:05 +00:00
Bob Clary
04c8397192 Bug 1378526 - Measure Stylo memory usage using AWSY tests, r=erahm, kmoir. 2017-08-01 15:59:22 -07:00
Chris AtLee
201150fd16 Bug 1384792: pass signed_installer_url to xpcshell tests for bbb r=aki
MozReview-Commit-ID: LWleRnEAgoi
2017-07-27 00:01:35 -04:00
Mike Hommey
4f6447524d Bug 1374940 - Add artifact paths to toolchain jobs definitions. r=dustin
The toolchain jobs produce artifacts that are going to be used by other
jobs, but there is no reliable way for the decision task to know the
name of those artifacts. So we make their definition required in the
toolchain job definitions.
2017-06-21 15:13:35 +09:00
John Dorlus
b5c1df46a9 Bug 1358670 - add telemetry-harness jobs to CI r=dustin
MozReview-Commit-ID: 9tPAMBAkvCs

Added config via tests.yml, test-sets.yml
Added remove_installer to config for linux.
Added blank for windows as that will come later.
2017-06-22 18:16:29 -04:00
Wes Kocher
74ae140aad Backed out 3 changesets (bug 1358670) for flake8 failures a=backout
Backed out changeset ab3693949c72 (bug 1358670)
Backed out changeset e04b9716ebad (bug 1358670)
Backed out changeset 0c5cf70baa50 (bug 1358670)

MozReview-Commit-ID: 2kVtLMvs9En
2017-07-20 11:20:00 -07:00
John Dorlus
ca9712838f Bug 1358670 - add telemetry-harness jobs to CI r=dustin
MozReview-Commit-ID: 9tPAMBAkvCs

Added config via tests.yml, test-sets.yml
Added remove_installer to config for linux.
Added blank for windows as that will come later.
2017-06-22 18:16:29 -04:00