Bug 1247168 - Don't remove hg-shared scopes; r=dustin draft
authorGregory Szorc <gps@mozilla.com>
Tue, 19 Jul 2016 14:10:14 -0700
changeset 390178 5b34fe6df7a6f2f7d4d6cc812a6843d7d4cd5a76
parent 390029 d224fc999cb6accb208af0a105f14433375e2e77
child 390179 98488527f872c0ca570cfabba478b087480b82ec
push id23614
push userbmo:gps@mozilla.com
push dateWed, 20 Jul 2016 19:22:19 +0000
reviewersdustin
bugs1247168
milestone50.0a1
Bug 1247168 - Don't remove hg-shared scopes; r=dustin These scopes will be introduced in subsequent commits. We don't want them to get removed, just like we don't want the tc-vcs caches to get removed. MozReview-Commit-ID: 790SzpAUxE4
taskcluster/taskgraph/task/legacy.py
--- a/taskcluster/taskgraph/task/legacy.py
+++ b/taskcluster/taskgraph/task/legacy.py
@@ -140,22 +140,23 @@ def set_interactive_task(task, interacti
 
     payload = task["task"]["payload"]
     if "features" not in payload:
         payload["features"] = {}
     payload["features"]["interactive"] = True
 
 
 def remove_caches_from_task(task):
-    r"""Remove all caches but tc-vcs from the task.
+    r"""Remove all caches but vcs from the task.
 
     :param task: task definition.
     """
     whitelist = [
         re.compile("^level-[123]-.*-tc-vcs(-public-sources)?$"),
+        re.compile("^level-[123]-hg-shared"),
         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)