Bug 1286652: also remove cache scopes on try and fix scopes; r=Callek
authorDustin J. Mitchell <dustin@mozilla.com>
Wed, 13 Jul 2016 20:13:06 +0000
changeset 305455 484a3b7cb17b08931956af88707e1425727d3b5e
parent 305454 0a12376c8ba5f35864ccfa49752ae5fedb6cceef
child 305456 649120d26209ce3787aff18222f387ce73127694
push id30463
push usercbook@mozilla.com
push dateTue, 19 Jul 2016 14:02:45 +0000
treeherdermozilla-central@37cc0da01187 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersCallek
bugs1286652
milestone50.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 1286652: also remove cache scopes on try and fix scopes; r=Callek MozReview-Commit-ID: 7s1CVCEVNwN
taskcluster/ci/legacy/tasks/builds/firefox_l10n_base.yml
taskcluster/ci/legacy/tasks/builds/mulet_haz_linux.yml
taskcluster/taskgraph/kind/legacy.py
--- a/taskcluster/ci/legacy/tasks/builds/firefox_l10n_base.yml
+++ b/taskcluster/ci/legacy/tasks/builds/firefox_l10n_base.yml
@@ -5,17 +5,17 @@
     build_name: 'linux64-l10n'
     build_product: 'firefox'
     build_type: 'opt'
 docker-image: desktop-build
 task:
   scopes:
     - 'docker-worker:cache:tooltool-cache'
     - 'docker-worker:relengapi-proxy:tooltool.download.public'
-    - 'docker-worker:cache:level-{{level}}-{{project}}-{{build_name}}-workspace'
+    - 'docker-worker:cache:level-{{level}}-{{project}}-l10n-{{build_name}}-workspace'
 
   payload:
     image:
       type: 'task-image'
       path: 'public/image.tar'
       taskId:
         task-reference: "<docker-image>"
     cache:
--- a/taskcluster/ci/legacy/tasks/builds/mulet_haz_linux.yml
+++ b/taskcluster/ci/legacy/tasks/builds/mulet_haz_linux.yml
@@ -10,17 +10,17 @@ task:
 
   workerType: mulet-debug
 
   routes:
     - 'index.buildbot.branches.{{project}}.linux64-haz-mulet'
     - 'index.buildbot.revisions.{{head_rev}}.{{project}}.linux64-haz-mulet'
 
   scopes:
-    - 'docker-worker:cache:level-{{level}}-{{project}}-build-mulet-linux-workspace'
+    - 'docker-worker:cache:level-{{level}}-{{project}}-build-mulet-haz-linux-workspace'
     - 'docker-worker:cache:tooltool-cache'
     - 'docker-worker:relengapi-proxy:tooltool.download.public'
 
   payload:
     cache:
       level-{{level}}-{{project}}-build-mulet-haz-linux-workspace: '/home/worker/workspace'
       tooltool-cache: '/home/worker/tools/tooltool-cache'
 
--- a/taskcluster/taskgraph/kind/legacy.py
+++ b/taskcluster/taskgraph/kind/legacy.py
@@ -151,19 +151,25 @@ def remove_caches_from_task(task):
     :param task: task definition.
     """
     whitelist = [
         re.compile("^level-[123]-.*-tc-vcs(-public-sources)?$"),
         re.compile("^tooltool-cache$"),
     ]
     try:
         caches = task["task"]["payload"]["cache"]
+        scopes = task["task"]["scopes"]
         for cache in caches.keys():
             if not any(pat.match(cache) for pat in whitelist):
                 caches.pop(cache)
+                scope = 'docker-worker:cache:' + cache
+                try:
+                    scopes.remove(scope)
+                except ValueError:
+                    raise ValueError("scope '{}' not in {}".format(scope, scopes))
     except KeyError:
         pass
 
 
 def query_vcs_info(repository, revision):
     """Query the pushdate and pushid of a repository/revision.
 
     This is intended to be used on hg.mozilla.org/mozilla-central and