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
--- 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)