Commit Graph
557 Commits
Author SHA1 Message Date
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
Wes Kocher 6ad0f8aebd Merge m-c to autoland, a=merge
MozReview-Commit-ID: BlE0HFQUP9c
2017-08-31 16:56:58 -07:00
Johan Lorenzo ff87fbb262 Bug 1384482 - Comply to Treeherder's nomenclature r=mtabara
MozReview-Commit-ID: 8bh8gI577sr
2017-08-31 11:17:54 +02: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
Wander Lairson Costa 6b7f9ef0d1 Bug 1338651 part 1: Change docker image home dir to /build. r=dustin,mshal
Using /home/worker is the build directory has a 30% talos performance
loss, because test machines has a /home mount directory.

MozReview-Commit-ID: 554IPMRWgzK
2017-08-28 08:44:51 -03: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
Mike Hommey 39382419e1 Bug 1391744 - Make tooltool manifests influence the index path for toolchain jobs. r=dustin 2017-08-23 14:53:56 +09: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 5e32e83855 Bug 1391476 - Automatically set cache/volume permissions in run-task; r=dustin
run-task's --chown and --chown-recursive are only used on volumes and
caches - the only locations that aren't controlled by the Docker image
itself and thus whose permissions could be "undefined."

Previous commits have taught run-task about the locations of all caches
and volumes. Therefore, we no longer need to manually define paths to
chown. Instead, we can chown as a side-effect of the path being a
cache or a volume.

So, this commit changes run-task to chown caches and volumes
automatically. Since we no longer have a use for --chown and
--chown-recursive, those arguments are removed.

There /could/ be some paths that are caches or volumes but aren't
getting defined as such in Taskgraph. I consider this a bug in
Taskgraph and the recourse is to properly define a path as a cache or
a volume there.

MozReview-Commit-ID: 1yqrhjil6gy
2017-08-23 12:07:18 -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
Gregory Szorc f3e600696e Bug 1391476 - Don't use ~ in paths; r=dustin
~ in paths is mostly a shell-ism. Let's not use it.

The real reason for this is it interfes with upcoming commits that
audit cache and volume paths.

MozReview-Commit-ID: AhjMwg5gexx
2017-08-21 17:11:49 -07:00
Gregory Szorc f798a78f67 Bug 1391476 - Inline list append; r=dustin
Static analysis in my editor was complaining about the old pattern.
Why not fix it while I'm here.

MozReview-Commit-ID: HtrGenolNXb
2017-08-21 10:55:10 -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
Sebastian Hengst 84bac37d68 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 8fJX1xXgzhD
2017-08-22 11:49:04 +02:00
Mike Hommey 181b300e4d Bug 1389435 - Forbid toolchain dependencies on aliases. r=dustin
This extends bug 1386920 in a more general way on toolchain jobs.
2017-08-22 13:45:44 +09:00
Gregory Szorc a09344b44c Bug 1391789 - Set relengapi-proxy on correct object; r=bustage
This corrects a bug introduced in 265873cf1388.

MozReview-Commit-ID: LkZlTVAM17E
2017-08-21 10:30:42 -07:00
Gregory Szorc 1db4880f89 Bug 1391789 - Stop versioning version control cache; r=dustin
We added this versioning as a mechanism to create clean breaks when
version control mechanisms change in significant ways. Now that
run-task's content influences cache names and this cache name
pattern must be used with run-task, we no longer need this
versioning and can rely on run-task's content and cache requirements
to switch to new caches.

MozReview-Commit-ID: KJ7IF7UzDsg
2017-08-18 17:05:26 -07: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
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
Gregory Szorc 5be5579a6a Bug 1391789 - Consolidate tooltool modifications to shared function; r=dustin
This pattern is repeated a number of times. Let's consolidate it.

A few places set relengapi-proxy=False. AFAICT this was a no-op because
the default value in the worker schema is False. So, these assignments
were dropped.

MozReview-Commit-ID: EoNPBhaMT2J
2017-08-18 16:06:19 -07:00
Justin Wood 9480ff60d7 Bug 1391643 - Make sure we use dep signing worker when using the dep signing scope. r=aki
MozReview-Commit-ID: Aeaa1CxN0aJ
2017-08-18 11:17:25 -04:00
Dustin J. Mitchell da609c4357 Bug 1394883: use /builds/worker in image building; r=gps
This includes adding TASKCLUSTER_VOLUMES to docker image builds directly.  The
env variable is not added as part of the task transform because `run-task` is
not in payload.command.  In fact, build-image.sh calls run-task after doing
some other housekeeping.

Ideally image builds would be turned into jobs and all of this would occur
automatically, but that turns out to be quite a bit too complex for this
incidental fix -- perhaps best solved in another bug.

MozReview-Commit-ID: FYHvafJras7
2017-08-30 16:30:13 +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
Ryan VanderMeulen 6d43cb38ae Backed out changeset 314ffe5d7d40 (bug 1385055) for decision task bustage. 2017-08-20 21:59:03 -04:00
Tom Prince 655eb0161c Bug 1385055 - Add taskgraph support for checking out comm-central and related branches. r=dustin
MozReview-Commit-ID: 1eU567Cuc8a
2017-07-27 12:39:08 -06:00
Phil Ringnalda 8375c5b301 Merge inbound to m-c, a=merge
MozReview-Commit-ID: LCCoXUsCtmv
2017-08-19 15:29:10 -07:00
Wes Kocher 9a9581c0d5 Merge m-c to inbound, a=merge
MozReview-Commit-ID: EgYue63nSkv
2017-08-18 16:29:11 -07:00
Wes Kocher 71b980ddf1 Merge inbound to central, a=merge
MozReview-Commit-ID: 4cWGBbMEU2x
2017-08-18 15:53:07 -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
Justin Wood fc991d301f Bug 1387199 - Do spidermonkey windows in taskgraph. r=dustin
Set these as tier 3 right now, because there are frequent intermittent test failures.

MozReview-Commit-ID: Gs6AXLKaVrF
2017-08-16 15:27:30 -04: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 9e75a4ef75 Bug 1385094 - Don't include docker image in chain of trust for builds if not using an in-tree image; r=aki,dustin
MozReview-Commit-ID: J6RkxSUqZrx
2017-08-16 13:14:39 -06: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
Aki Sasaki 46dc81a963 bug 1383771 - back out d25db0546c92 (reland ffc2e43aa834). r=backout a=release
MozReview-Commit-ID: LlNo4Npariw
2017-08-15 22:54:08 -07:00
Wes Kocher bce215c8c0 Merge autoland to central, a=merge
MozReview-Commit-ID: FOw9Q98gVXH
2017-08-15 18:51:25 -07:00
Aki Sasaki 1eecf1fa9d bug 1383771 - back out ffc2e43aa834 until we fix bug 1390552. r=backout a=release 2017-08-15 14:25:04 -07:00
Aki Sasaki b9eb30d090 bug 1390266 - l10n repack the linux signed tarball. r=Callek
MozReview-Commit-ID: LAJoFkS9jga
2017-08-14 16:10:43 -07:00
Kartikaya Gupta 9fd9300610 Bug 1383149 - Run the talos suite (minus g1 and g2) on linux64-qr/opt, on m-c and try. r=dustin
MozReview-Commit-ID: 94ZcluR2xET
2017-08-14 16:51:26 -04:00
Johan Lorenzo bc0780f4ac Bug 1383771 - Add widevine support to Nightly builds r=aki a=merge
Other related changes:
* Only target.{zip,tar.gz,tar.bz} get the widevine signature (not the various installers).
* Linux{32,64}-nightly are now repackaged. Their mar files are not signed during signed step anymore. It now happens after the repackage.
* As a consequence, funsize routes for linux are now set to repackage-signing (instead of signing)
* Signed upstream artifacts are now defined in a dedicated module (to avoid duplication)
* Platforms defined in beetmover_repackage now allow regex (to reduce duplication too)
* Mozharness configs: Delete unused (and misleading) `src_mozconfig` for windows. This value is actually not used when `run_configure` (in the same dict) is set to False.

MozReview-Commit-ID: COKqevW9Mzn
2017-08-10 19:25:36 +02:00
Nick Alexander 96e43d8f74 Bug 1383973 - Use run: using and build transforms to avoid tc-vcs in android-* tasks. r=dustin
MozReview-Commit-ID: aENMcIbglQ
2017-08-01 11:08:14 -07:00
Nick Alexander 66902e9e6d Bug 1383973 - Allow docker-image: that is not 'desktop-build'. r=dustin
There's little value in a more complicated process for setting the
underlying Docker image for a `run: using: mozharness` job.

This uncovered a typo (extraneous comma) in a Mac OS X repackage job.

MozReview-Commit-ID: DGOs1NvuS32
2017-08-01 18:00:26 -07:00
Aki Sasaki 32d40e5783 bug 1389260 - split by max # of locales per chunk. fix nightly l10n. r=bustage a=merge
MozReview-Commit-ID: Z4fW5rugEP
2017-08-10 17:25:46 -07:00
Wander Lairson Costa f1ea1f7075 Bug 1382280 part 2: Install debug information. r=ted
valgrind test will try to load debug information for the modules present
in a stack trace. If it fails to do it, we endup with a stack trace with
only memory addresses.

We install debuginfo for all installed packages and look for all libs
in the system common locations, and try to install the corresponding
debug information package.

These are acomplished with debuginfo-install yum utility script.

MozReview-Commit-ID: 76mHOUKKJud
2017-08-10 13:42:12 -03:00
Mike Hommey 56ecb5de61 Bug 1388573 - Imply needs-sccache from toolchain dependencies. r=dustin
After bug 1388569 and bug 1388572, all jobs that have needs-sccache set
have a dependency on either linux64-sccache or win64-sccache, and
vice-versa. Which means they are now redundant, and one should imply the
other.
2017-08-09 09:22:43 +09:00
Carsten "Tomcat" Book 6308fd0df4 merge mozilla-inbound to mozilla-central a=merge 2017-08-09 11:37:08 +02:00