Bug 1388573 - Imply needs-sccache from toolchain dependencies. r?dustin draft
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 09 Aug 2017 09:22:43 +0900
changeset 642929 475f645333f5c3f76c757bd6200e428b2ef28d30
parent 642919 b7eedec10be0ebf04cd63b6fb0bd8a9cb780ee36
child 643114 1b424b2b9a4c26724a724234343233fbab164b66
child 643115 b6872bb500afea7c029700bb409a9817b1ef7499
push id72926
push userbmo:mh+mozilla@glandium.org
push dateWed, 09 Aug 2017 00:25:00 +0000
reviewersdustin
bugs1388573, 1388569, 1388572
milestone57.0a1
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.
taskcluster/ci/build/linux.yml
taskcluster/ci/static-analysis/kind.yml
taskcluster/ci/valgrind/kind.yml
taskcluster/taskgraph/transforms/build.py
taskcluster/taskgraph/transforms/toolchain.py
--- a/taskcluster/ci/build/linux.yml
+++ b/taskcluster/ci/build/linux.yml
@@ -549,17 +549,16 @@ linux64-jsdcov/opt:
         - linux64-gcc
         - linux64-sccache
 
 linux64-ccov/opt:
     description: "Linux64-CCov Opt"
     index:
         product: firefox
         job-name: linux64-ccov-opt
-    needs-sccache: false
     treeherder:
         platform: linux64-ccov/opt
         symbol: tc(B)
         tier: 2
     run-on-projects: [ ]
     worker-type: aws-provisioner-v1/gecko-{level}-b-linux
     worker:
         max-run-time: 36000
--- a/taskcluster/ci/static-analysis/kind.yml
+++ b/taskcluster/ci/static-analysis/kind.yml
@@ -15,17 +15,16 @@ transforms:
 
 job-defaults:
     index:
         product: firefox
     treeherder:
         symbol: S
         kind: build
         tier: 1
-    needs-sccache: true
 
 jobs:
     linux64-st-an/debug:
         description: "Linux64 Debug Static Analysis"
         index:
             job-name: linux64-st-an-debug
         treeherder:
             platform: linux64/debug
--- a/taskcluster/ci/valgrind/kind.yml
+++ b/taskcluster/ci/valgrind/kind.yml
@@ -25,17 +25,16 @@ jobs:
             kind: build
             tier: 1
         worker-type: aws-provisioner-v1/gecko-{level}-b-linux
         worker:
             docker-image: {in-tree: desktop-build}
             max-run-time: 72000
             env:
                 TOOLTOOL_MANIFEST: "browser/config/tooltool-manifests/linux64/releng.manifest"
-        needs-sccache: true
         run:
             using: mozharness
             actions: [get-secrets build valgrind-test]
             custom-build-variant-cfg: valgrind
             config:
                 - builds/releng_base_linux_64_builds.py
                 - balrog/production.py
             script: "mozharness/scripts/fx_desktop_build.py"
--- a/taskcluster/taskgraph/transforms/build.py
+++ b/taskcluster/taskgraph/transforms/build.py
@@ -15,17 +15,16 @@ transforms = TransformSequence()
 
 
 @transforms.add
 def set_defaults(config, jobs):
     """Set defaults, including those that differ per worker implementation"""
     for job in jobs:
         job['treeherder'].setdefault('kind', 'build')
         job['treeherder'].setdefault('tier', 1)
-        job.setdefault('needs-sccache', True)
         _, worker_os = worker_type_implementation(job['worker-type'])
         worker = job.setdefault('worker', {})
         if worker_os == "linux":
             worker.setdefault('docker-image', {'in-tree': 'desktop-build'})
             worker['chain-of-trust'] = True
             extra = job.setdefault('extra', {})
             extra.setdefault('chainOfTrust', {})
             extra['chainOfTrust'].setdefault('inputs', {})
--- a/taskcluster/taskgraph/transforms/toolchain.py
+++ b/taskcluster/taskgraph/transforms/toolchain.py
@@ -75,16 +75,19 @@ def use_toolchains(config, jobs):
                 # Build jobs don't support toolchain artifacts with the same
                 # name: they would overwrite one with the other.
                 raise Exception('%s-%s cannot use both %s and %s toolchains: '
                                 'they both have the same artifact name %s'
                                 % (config.kind, job['name'], filenames[f],
                                    t, f))
             filenames[f] = t
 
+            if t.endswith('-sccache'):
+                job['needs-sccache'] = True
+
         if toolchains:
             job.setdefault('dependencies', {}).update(
                 ('toolchain-%s' % t, 'toolchain-%s' % t)
                 for t in toolchains
             )
             # Pass a list of artifact-path@task-id to the job for all the
             # toolchain artifacts it's going to need, where task-id is
             # corresponding to the (possibly optimized) toolchain job, and