Commit Graph

142 Commits

Author SHA1 Message Date
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
Gregory Szorc
1023ddfdcd Bug 1381613 - Populate a repository-less index route for "trunk" repos; r=dustin
There are a few places where we walk commit ancestry looking for things
attached to a specific revision. Because the repository name is attached
to the index path and because a revision can exist in multiple
repositories, we often have to perform N index lookups to find a result
for a specific revision. This is inefficient.

To facilitate faster index lookups by revision, we introduce a new route
that doesn't contain the repository name. In theory, we should be able
to do this globally - for all repos. However, the configuration of
tasks can vary significantly by repo. So e.g. a linux64 build on
"central" is sufficiently different from a linux64 build on "beta" or
"release." For that reason, this commit takes the conservative
approach and only defines a shared route for repositories with a similar
configuration: the "trunk" repositories.

MozReview-Commit-ID: 8rIgUbzW4eL
2017-07-19 18:24:12 -07:00
Sebastian Hengst
2263fa0be0 Backed out changeset 543c503f745c (bug 1381613) for failing flake8 at taskcluster/taskgraph/transforms/task.py:836 with "too many blank lines". r=backout 2017-07-19 10:04:34 +02:00
Gregory Szorc
2c51605e07 Bug 1381613 - Populate a repository-less index route for "trunk" repos; r=dustin
There are a few places where we walk commit ancestry looking for things
attached to a specific revision. Because the repository name is attached
to the index path and because a revision can exist in multiple
repositories, we often have to perform N index lookups to find a result
for a specific revision. This is inefficient.

To facilitate faster index lookups by revision, we introduce a new route
that doesn't contain the repository name. In theory, we should be able
to do this globally - for all repos. However, the configuration of
tasks can vary significantly by repo. So e.g. a linux64 build on
"central" is sufficiently different from a linux64 build on "beta" or
"release." For that reason, this commit takes the conservative
approach and only defines a shared route for repositories with a similar
configuration: the "trunk" repositories.

MozReview-Commit-ID: 8rIgUbzW4eL
2017-07-17 13:28:48 -07:00
Gregory Szorc
26503db748 Bug 1380885 - Index more tasks by pushlog id; r=dustin
365731510976 (bug 1380391) added index routes for decision tasks by
pushlog id. This is a good idea. The pushlog id is guaranteed to always
be incrementing (except for repos that are periodically reset, which
we don't care about). It is useful to provide strict ordering for
pushes and is simpler for machines to consume and sort than dates.

So let's index all tasks by pushlog id.

MozReview-Commit-ID: BPqx4ARza1c
2017-07-13 16:51:16 -07:00
Mark Banner
42e2269ec9 Bug 1379119 - Add a builder to run the unit tests for eslint-plugin-mozilla. r=ahal
MozReview-Commit-ID: 5QsxUsvJz8O
2017-07-10 15:27:00 +01:00
Rail Aliiev
99126298fe Bug 1378454 - Add predictable routes to repackage and repackage-signing tasks r=Callek
MozReview-Commit-ID: Kv59SWBdbz5
2017-07-07 13:58:06 -04:00
Justin Wood
a4f5156d62 Bug 1376550 - Add repackage signing kind. r=dustin
Support OSX Signed nightlies (in the complete.mar too)

MozReview-Commit-ID: HVJwMuXUixX
2017-06-27 14:55:09 -07:00
Justin Wood
48d2153604 Bug 1373326 - Add beetmover and balrog to taskgraph. r=dustin
(For Landing more OSX Nightly Support from date to central)

MozReview-Commit-ID: BeXoChssNjF
2017-06-16 16:01:38 -04:00
Alin Selagea
64308cbe4f Bug 1363742 - delete code that references mozilla-aurora in buildbot configs and taskcluster, r=kmoir (patch by spacurar) 2017-06-20 15:09:11 +03:00
Carsten "Tomcat" Book
7a98a03a05 Backed out changeset ca9a7fa7d6a9 (bug 1363742) for breaking decision task 2017-06-19 14:25:11 +02:00
Alin Selagea
8a4bb6cb1a Bug 1363742 - delete code that references mozilla-aurora in buildbot configs and taskcluster, r=kmoir (patch by spacurar) 2017-06-19 14:53:57 +03:00
Andrew Halberstadt
bce781d9b8 Bug 1373294 - Fix E305 (two blank lines after method or class) in files enabled by flake8 linter, r=jmaher
This is needed before we can upgrade to flake8 3.3.0, as that version starts flagging these errors.

These files were modified by running:
autopep8 --select E305 --in-place -r <dir>

on the affected directories. I did it one dir at a time and verified the result after each.

MozReview-Commit-ID: FmlsfiKIbtr
2017-06-15 12:10:59 -04:00
Dustin J. Mitchell
f3f59ca1c7 Bug 1359976: base worker payload generation on worker-type; r=wcosta r=aki
To date we have variously specified both worker-type and worker-implementation,
often manually coordinated. We also embedded a few awkward assumptions such as
that the native engine only runs on OS X.

But a worker type has one and only one implementation, and that implementation
is stable over time (as changing it would require simultaneous landings on all
trees).

Instead, this change makes worker-type the primary configuration, and derives
both a worker implementation (defining the payload format) and worker OS
(determining what to include in the payload) from that value. The derivation
occurs when deciding how to implement a particular job, where the run_using
functions are distinguished by worker implementation.

The two-part logic to determine how and where to run a test task based on its
platform is combined into a single transform, `set_worker_type`.

This contains some other related changes:
 - MOZ_AUTOMATION is set in specific jobs, rather than everywhere docker-worker
   is used
 - the URL to test packages is factored out into a shared function
 - docker-worker test defaults are applied in `mozharness_test.py`
 - the WORKER_TYPE array in `task.py`, formerly mixing two types of keys, is
   split
 - the 'invalid' workerType is assigned an 'invalid' implementation
 - all tasks that do not use job descriptions but use docker-worker, etc. have
   `worker.os` added

Tested to not produce a substantially different taskgraph for a regular push, a
try push, or a nightly cron.

MozReview-Commit-ID: LDHrmrpBo7I
2017-05-08 22:53:50 +00:00
Dustin J. Mitchell
af4ef3ee08 Bug 1357753: optionally run linux Talos on native-engine; r=wcosta
This makes talos obey the `-w` try syntax flag.

MozReview-Commit-ID: 2v6X3ko2t9K
2017-05-10 21:12:02 +00: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
Gregory Arndt
7e2414f141 Bug 1364266 - Specify task priority within task definition r=dustin
Tasks should be assigned a priority based on the branch they originated from. It
is important that certain branches receive preferential treatment, such as a release
branch task being executed before a task from Try. Branch priority mirrors
the priorities defined within buildbot.

MozReview-Commit-ID: 8qR9F34lzzc
2017-05-05 15:22:03 -05:00
Phil Ringnalda
512bd79c63 Backed out changeset 6a2176a26495 (bug 1364266) on suspicion of overwhelming the taskcluster queue
MozReview-Commit-ID: EQ0Ip3kIeLh
2017-05-21 09:37:12 -07:00
Gregory Arndt
6a0f2794ca Bug 1364266 - Specify task priority within task definition r=dustin
Tasks should be assigned a priority based on the branch they originated from. It
is important that certain branches receive preferential treatment, such as a release
branch task being executed before a task from Try. Branch priority mirrors
the priorities defined within buildbot.

MozReview-Commit-ID: 8qR9F34lzzc
2017-05-05 15:22:03 -05:00
Mike Hommey
de0d8d21f6 Bug 1356700 - Set MOZ_AUTOMATION on all taskcluster jobs. r=dustin 2017-04-15 07:30:42 +09:00
Ben Hearsum
40c7ff6fc3 bug 1358601: set up CI builds and tests for DevEdition on mozilla-beta - add linux devedition builds r=aki,kmoir
MozReview-Commit-ID: 9mghIaHomfs
2017-04-27 10:35:36 -04:00
Johan Lorenzo
a5a0806cc1 Bug 1354038 - [push-apk] taskgraph: Use rollout and deactivate dry-run on release r=aki
MozReview-Commit-ID: 4Rc0Qd5ZI4Z
2017-04-20 18:21:52 +02:00
Justin Wood
a90803ce28 Bug 1357867 - Add repackage tasks suited for generating a .dmg from a signed tarball of OSX binaries. r=dustin
MozReview-Commit-ID: 7TdQxTlKm9D
2017-04-19 15:18:44 -04:00
Sebastian Hengst
a9d2df10b6 Backed out changeset 26ed99596031 (bug 1356700) for letting js/src/vtune/ittnotify_static.c fail on spidermonkey asan, msan and arm64. r=backout on a CLOSED TREE 2017-04-18 00:52:22 +02:00