Bug 1426324 - Make toolchain cache indexes vary depending on the docker image name. r=dustin
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 21 Dec 2017 14:01:31 +0900
changeset 397677 841178c05781ac908585956088662ad5fa5608b9
parent 397676 c1e20de19b6f0e50e5454945492ea7ee3b504b91
child 397678 5afa32a16a2f7ebbd8bf19e49efc50832110980d
push id98591
push usermh@glandium.org
push dateThu, 04 Jan 2018 05:52:45 +0000
treeherdermozilla-inbound@5afa32a16a2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin
bugs1426324
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1426324 - Make toolchain cache indexes vary depending on the docker image name. r=dustin
taskcluster/taskgraph/transforms/job/toolchain.py
--- a/taskcluster/taskgraph/transforms/job/toolchain.py
+++ b/taskcluster/taskgraph/transforms/job/toolchain.py
@@ -83,16 +83,27 @@ def get_digest_data(config, run, taskdes
     # If the task has dependencies, we need those dependencies to influence
     # the index path. So take the digest from the files above, add the list
     # of its dependencies, and hash the aggregate.
     # If the task has no dependencies, just use the digest from above.
     deps = taskdesc['dependencies']
     if deps:
         data.extend(sorted(deps.values()))
 
+    # If the task uses an in-tree docker image, we want it to influence
+    # the index path as well. Ideally, the content of the docker image itself
+    # should have an influence, but at the moment, we can't get that
+    # information here. So use the docker image name as a proxy. Not a lot of
+    # changes to docker images actually have an impact on the resulting
+    # toolchain artifact, so we'll just rely on such important changes to be
+    # accompanied with a docker image name change.
+    image = taskdesc['worker'].get('docker-image', {}).get('in-tree')
+    if image:
+        data.extend(image)
+
     # Likewise script arguments should influence the index.
     args = run.get('arguments')
     if args:
         data.extend(args)
     return data
 
 
 @run_job_using("docker-worker", "toolchain-script", schema=toolchain_run_schema)