Граф коммитов

1990 Коммитов

Автор SHA1 Сообщение Дата
Phil Ringnalda e300bc2504 Merge autoland to m-c, a=merge
MozReview-Commit-ID: BFVS6hRAxIb
2017-08-26 18:12:15 -07:00
Aki Sasaki 8e6740ad55 bug 1394130 - 2 locales per chunk to avoid signing timeouts. r=bustage a=release DONTBUILD
MozReview-Commit-ID: 36iGm6Rxtda

--HG--
extra : histedit_source : b10c8c259960ccfd11205f230839bb45a5ffc4f2
2017-08-26 14:23:30 -07:00
Gregory Szorc 10773f0d43 Bug 1390693 - Upload docs to project and version specific locations; r=dustin
Previously, we uploaded the main Firefox tree docs to /.

In reality, there are multiple Sphinx projects in the repo. In
addition, it is sometimes desirable to access docs for an older
version of Firefox.

In this commit, we add support for specifying the S3 key prefix
for uploads. Then we change the upload code to upload to multiple
locations:

* <project>/latest (always)
* <project>/<version> (if a version is defined in the Sphinx config)
* / (for the main Sphinx docs project)

For the Firefox docs, ``version`` corresponds to a sanitized value from
``milestone.txt``. Currently, it resolves to ``57.0``.

While we're here, we add support for declaring an alternate project
name in the Sphinx conf.py file. If ``moz_project_name`` is defined,
we use that as the project name. For Firefox, we set it to ``main``.
This means our paths (local and uploaded) are now ``main`` instead of
``Mozilla_Source_Tree_Docs``. That's much more pleasant.

MozReview-Commit-ID: 8Gl6l2m6uU4

--HG--
extra : rebase_source : e56885092c12eb8cc76e5e7300f938be566e3e5a
extra : intermediate-source : 8509af1e135177a93460270b27f263c10a62d996
extra : source : 71b4f32caf209fe9dffc340c0b8ccb51ac79c7de
2017-08-24 11:12:21 -07:00
Gregory Szorc 17296bc970 Bug 1390693 - Fold `mach doc-upload` into `mach doc`; r=dustin
We now have an --upload flag to control whether upload is performed.

We don't inline it because we want to maintain a "firewall" between
regular docs and all the extra packages and imports needed for S3.

MozReview-Commit-ID: DVKhsS545gp

--HG--
extra : rebase_source : 7fee832145189be882db0f0ca057eda6158e0492
2017-08-24 11:31:54 -07:00
Gregory Szorc 4b1e2d4a2e Bug 1390693 - Generate docs archive within mach command; r=dustin
By using mozpack, we get deterministic archives. This also makes the
task command simpler.

MozReview-Commit-ID: EPI7tuGQuso

--HG--
extra : rebase_source : babcbf3d5607480321106b40eaa4598c0faee188
2017-08-24 10:37:53 -07:00
Gregory Szorc b6b11591af Bug 1390693 - Run documentation generation everywhere; r=dustin
We want to verify that Sphinx docs work on all repos. It is only
uploading that should be limited.

MozReview-Commit-ID: An6EZ7jpaWh

--HG--
extra : rebase_source : 86400968630b3ab1c09c43d5fa42d456cec159c4
2017-08-24 11:58:28 -07:00
J. Ryan Stinnett 4cd937870c Bug 1393819 - Enable M(bc) for linux64-stylo/debug. r=xidorn
MozReview-Commit-ID: FsZJn6AWHeP

--HG--
extra : rebase_source : 3b278a62459d20abfcbc1dccddb65d3779a7e091
2017-08-24 19:02:52 -05:00
Wes Kocher 7ea5ed6e6a Merge m-c to autoland, a=merge
MozReview-Commit-ID: LEKykpTAKjv
2017-08-25 17:32:33 -07:00
Maja Frydrychowicz fbfedce632 Bug 1393865 - Add try aliases for web-platform-tests-wdspec; r=dustin
This fixes the issue where "-u web-platform-tests-wdspec" scheduled
nothing. Now it will schedule a e10s-enabled run of wdspec tests.

MozReview-Commit-ID: AdHZqtk1hLy

--HG--
extra : rebase_source : 8d5926277b37952616c4dffdb20133868913bab2
2017-08-25 15:52:07 -04:00
Gregory Szorc 6bf25db065 Bug 1390700 - Use sparse checkouts for decision task; r=dustin
The updated Docker image contains robustcheckout and run-task support
for sparse checkouts, which are obvious prerequisites.

We change the cache name so sparse and non-sparse checkouts don't
use the same working directory. If we didn't do this, tasks running
from images with old Mercurial clients or without a sparse aware
robustcheckout would fail.

The effect of using a sparse checkout is that we reduce the number
of files in the checkout from ~234,000 to ~3,600. This reduces time
for a fresh checkout from several dozen seconds to under 2s.

MozReview-Commit-ID: IJz794g8ZKH

--HG--
extra : source : 9923fffd4f64a1aa9d762e6027e0e2424a19c49c
2017-08-23 12:09:00 -07:00
Joel Maher 20d6994825 Bug 1383789 - enable stylo talos tests on osx. r=rwood 2017-08-25 11:15:40 -04:00
Johan Lorenzo 66ee2c99b9 Bug 1390123 - Snap: Automate uploads to Ubuntu Store r=mtabara
MozReview-Commit-ID: 7JVwiUaxk0G

--HG--
extra : amend_source : d3c88b2018f4fb195597151b69389e59f17525e2
2017-08-14 15:00:33 +02:00
Gregory Szorc a22927dbb3 Backed out changeset 9923fffd4f64 (bug 1390700) for somehow breaking chain of trust on some Windows builds
CLOSED TREE

--HG--
extra : amend_source : e039e6840e52ee3186f4c8c0ae20d75cdccdee5a
2017-08-24 21:42:18 -07:00
Gregory Szorc d4da1b9397 Bug 1390700 - Use sparse checkouts for decision task; r=dustin
The updated Docker image contains robustcheckout and run-task support
for sparse checkouts, which are obvious prerequisites.

We change the cache name so sparse and non-sparse checkouts don't
use the same working directory. If we didn't do this, tasks running
from images with old Mercurial clients or without a sparse aware
robustcheckout would fail.

The effect of using a sparse checkout is that we reduce the number
of files in the checkout from ~234,000 to ~3,600. This reduces time
for a fresh checkout from several dozen seconds to under 2s.

MozReview-Commit-ID: IJz794g8ZKH

--HG--
extra : rebase_source : d262c8314381a136cf5cdc5c33669c8c61818d1d
2017-08-23 12:09:00 -07:00
Gregory Szorc 22bae15639 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

--HG--
extra : rebase_source : babe9b42e2796c2341bffc6ecfe829f4daff9e0f
2017-08-23 18:54:14 -07:00
Gregory Szorc 605775b621 Bug 1390700 - Fix some error messages in run-task; r=dustin
Include "error:" so Treeherder log parser picks things up (hopefully).

Also, actually include cache path in string.

MozReview-Commit-ID: 8b8ou7TJYZs

--HG--
extra : rebase_source : 52b43dd18419a6a8cfb096a6bf4262852c7c0ccc
2017-08-24 09:06:45 -07:00
Wes Kocher e8f7cc0bb3 Backed out 2 changesets (bug 1392787) for build bustage a=backout CLOSED TREE
Backed out changeset 2ce8a387fa80 (bug 1392787)
Backed out changeset bf5a6ff97a8f (bug 1392787)

MozReview-Commit-ID: 2cA5bdnNDIe
2017-08-24 14:00:42 -07:00
Andrew Halberstadt b24f01064e Bug 1392787 - Add a linter to prevent comment-disabling tests in manifestparser manifests, r=jmaher
MozReview-Commit-ID: LG47ASBMA17

--HG--
extra : rebase_source : df925b5d234a889bfb472eb33a3204465aa64f79
2017-08-23 09:33:18 -04:00
J. Ryan Stinnett d86c63be6d Bug 1393229 - Enable tp6s and tp6st for macOS with Stylo. r=jmaher
MozReview-Commit-ID: 9G1Jcc4duRj

--HG--
extra : rebase_source : 958dc364347501c77c51b5d0aeed5a1bb72d4a27
2017-08-22 12:52:31 -05:00
Dustin J. Mitchell 98a3631d7b 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

--HG--
extra : rebase_source : 6946d866f9df6eec591b9a05ddedc6467dd69e4b
2017-08-23 15:22:10 -04:00
Mike Hommey e5f075d9b4 Bug 1391744 - Make tooltool manifests influence the index path for toolchain jobs. r=dustin
--HG--
extra : rebase_source : 6fc636fbd8cd8d55d0912cb8a429415a43707c53
2017-08-23 14:53:56 +09:00
Gregory Szorc 5fb99cdfc3 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

--HG--
extra : rebase_source : ccb2b0a9230694f989775b26d5276fd3ac928af3
extra : source : 083d2e1cc8fe44b04e44f74bda3dd8bc75ba826c
2017-08-22 16:49:26 -07:00
Gregory Szorc 4e063535e6 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

--HG--
extra : rebase_source : 82c9ccb33f09d3ce50a6b7c6021e1e5b77d1b738
2017-08-23 12:07:18 -07:00
Gregory Szorc 8711c29066 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

--HG--
extra : rebase_source : abb0be1a36f24d8d818515885dd2a75d13aed48a
2017-08-23 10:47:37 -07:00
Gregory Szorc 3f5ebbd098 Bug 1391476 - Don't install nexus.xml in a Docker volume; r=mshal
We're about to ban files in Docker volumes so they behave almost
identically to caches (which start empty).

We move the install of nexus.xml from Docker image time to
task time. This also means that changes to nexus.xml don't result
in having to rebuild the Docker image.

MozReview-Commit-ID: JIjeJN4mt2

--HG--
rename : taskcluster/docker/android-gradle-build/nexus.xml => taskcluster/scripts/builder/build-android-dependencies/nexus.xml
extra : rebase_source : 53848f06820bda7979b2ae15456e07f8aed2363d
2017-08-23 10:34:14 -07:00
Gregory Szorc 4e98543647 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

--HG--
extra : rebase_source : 19b3165d8c6e4431aa43dca51828be255e82e34f
2017-08-23 08:57:59 -07:00
Gregory Szorc d0e06fff99 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

--HG--
extra : rebase_source : 1aa6dbb000386cd2789d526708ce369640d532c9
2017-08-23 08:53:56 -07:00
Gregory Szorc 29d31d4990 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

--HG--
extra : rebase_source : 69469014dcc92d4de98d5e887b10542af00e05be
2017-08-22 15:06:40 -07:00
Gregory Szorc f470161083 Bug 1391476 - Print cache info; r=dustin
For forensic purposes.

MozReview-Commit-ID: 6pcOm90cPdw

--HG--
extra : rebase_source : d4da9e48152e2ecc1ac90b9eef2ccf65ddf29dfc
2017-08-22 16:48:03 -07:00
Gregory Szorc ffc20b23b1 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

--HG--
extra : rebase_source : dd997a5d9c1123beecaa14bc5458a9338b3e07db
2017-08-21 17:11:49 -07:00
Gregory Szorc 86bd8a5bb8 Bug 1391476 - Dedent block; r=dustin
MozReview-Commit-ID: 1l8gWfBNBMs

--HG--
extra : rebase_source : 5a2fd9c97379cbfd5f2db5d460a27648f1f60d80
2017-08-22 12:40:44 -07:00
Gregory Szorc 148577452a 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

--HG--
extra : rebase_source : e3ffc4f7961dfd90767b6d1af2b93ad7551de3be
2017-08-21 10:55:10 -07:00
Gregory Arndt 85a855ffff Bug 1391288 - Rebuild decision task image with new robustcheckout r=dustin,gps
MozReview-Commit-ID: J53XXqBQsJw

--HG--
extra : rebase_source : bca5f697f049a6a3f85168aaa667ae7509e60243
2017-08-17 14:32:42 -05:00
Aki Sasaki 8d6f733276 bug 1392803 - fix bm-r. r=aki
MozReview-Commit-ID: 87Zdbh7o3lH

--HG--
extra : rebase_source : 9dcab195a8ce5cf1ec39b7333f32aa4cfac8b3b0
2017-08-23 14:57:10 -07:00
Rok Garbas f3a3affcf2 Bug 1284475 - migrate ToolTool blueprint to new codebase of relengapi r=KWierso
UPGRADE_NSS_RELEASE a=kaie
MozReview-Commit-ID: 7CB1VYb8OJP

--HG--
extra : rebase_source : 04751620add813cd1780898d109d9f7fa89d7b2d
2017-08-08 10:55:52 +02:00
Andrew Halberstadt a4a6ffdd99 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

--HG--
extra : rebase_source : c32e1954b6b5b88c825075c64c8b9993be3035c6
2017-08-21 11:52:28 -04:00
Gregory Szorc 0ef27f30cd Bug 1392886 - Enable sparse extension in Docker images; r=mshal
This needs to be globally enabled to support sparse checkouts
and accessing repos using sparse checkouts.

Having the extension enabled should no-op unless sparse checkouts
are being used. i.e. it should be harmless to globally enable.

MozReview-Commit-ID: AKNUOXfYQPx

--HG--
extra : rebase_source : d32b8a89c56c39923d7b0cd61583c2828a29a872
2017-08-22 20:44:57 -07:00
J. Ryan Stinnett 560715eee2 Bug 1385025 - Enable Stylo tests on Linux32. r=kmoir
MozReview-Commit-ID: FVVh9kyVSgT
2017-08-22 14:54:21 -05:00
Gregory Szorc 0c0f6ca8db Bug 1392700 - Use Mercurial 4.3 in mozharness tests; r=aki
We use Mercurial 4.3.1 pretty much everywhere in CI now.
Mozharness should be testing with it as well.

MozReview-Commit-ID: HT2rocEvdIe

--HG--
extra : rebase_source : 148a9cd82b18e693ee570f31fc961373e8466a3c
2017-08-22 10:14:32 -07:00
Sebastian Hengst 75955d0246 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 8fJX1xXgzhD
2017-08-22 11:49:04 +02:00
Mike Hommey fe086521ec Bug 1389435 - Use GCC 6 to build the Firefox we ship on Linux. r=froydnj 2017-08-22 13:46:00 +09:00
Mike Hommey e9c90cf459 Bug 1389435 - Explicitly use GCC 4.9 for hazard builds. r=me
The GCC plugin used for hazard builds was built for GCC 4.9. Until a new
plugin is built by a toolchain job for the "default" version of GCC we
build Firefox with, the builds using the plugin need to stay with the
version the plugin was built for.
2017-08-22 13:45:54 +09:00
Mike Hommey 9239c39c7c 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 e50add9dfc Bug 1391789 - Set relengapi-proxy on correct object; r=bustage
This corrects a bug introduced in 265873cf1388.

MozReview-Commit-ID: LkZlTVAM17E

--HG--
extra : rebase_source : bf442e620abd6b47adee3d4c56e6f0c19964aea1
2017-08-21 10:30:42 -07:00
Gregory Szorc e23a086148 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

--HG--
extra : rebase_source : 9d562ec3977fea7920039a66be13cfae8980475e
2017-08-18 17:05:26 -07:00
Gregory Szorc ffba62a0c4 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

--HG--
extra : rebase_source : 9a290470088a8d55693dfbadc5186a018d3669b6
2017-08-18 15:30:32 -07:00
Gregory Szorc 02d1cf283b 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

--HG--
extra : rebase_source : 2424696b1fde59f20152617a6ebb2afe14b94678
2017-08-18 14:07:03 -07:00
Gregory Szorc 303f662591 Bug 1391789 - Extract permission setting to own functions; r=dustin
I must have been in a closure mood when I wrote this code. The
main function is getting a bit heavyweight. So let's extract
these closures to make things less dense.

MozReview-Commit-ID: 4p5yKB1tTxn

--HG--
extra : rebase_source : 3c3e0b352da6290043013aa36c783e21e01460ba
extra : source : 053f0b0b48635c6a87aefe15ad73f361f0f64f79
2017-08-17 17:06:16 -07:00
Gregory Szorc ecdc35a7eb Bug 1391789 - Make hash_path() a "public" API; r=dustin
So we can use it from another module without feeling dirty.

MozReview-Commit-ID: 1TCk9dda6mL

--HG--
extra : rebase_source : 15c2ee0e4d6aa812ab8acc3564da0c3e7ba45e19
2017-08-18 13:30:05 -07:00
Gregory Szorc f114aa8c35 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

--HG--
extra : rebase_source : dfe97f92a726059200ed79afe215ef2cf1fd7bf1
2017-08-18 16:15:44 -07:00