Bug 1289643 - Allow level-{{level}}-checkouts cache to be used on Try; r?dustin draft
authorGregory Szorc <gps@mozilla.com>
Fri, 29 Jul 2016 11:10:48 -0700
changeset 394451 5e7b990bd849f6f5de7a16c61871a6841b296fc4
parent 394450 4620f74ff8f16f1076e03caf37fab0bcf3021180
child 394492 332a02947dbdd0aada669ed1e6f72d50b68a8f99
push id24568
push userbmo:gps@mozilla.com
push dateFri, 29 Jul 2016 18:30:46 +0000
reviewersdustin
bugs1289643
milestone50.0a1
Bug 1289643 - Allow level-{{level}}-checkouts cache to be used on Try; r?dustin Previously, the VCS checkout cache would be optimized away on Try. This meant every task on Try had to create its own checkout from scratch. This meant writing ~150,000 files. By allowing use of the cache, we minimize the amount of work tasks need to perform on Try and therefore make tasks complete faster, on average. MozReview-Commit-ID: EWuic8lFVtv
taskcluster/taskgraph/task/legacy.py
--- a/taskcluster/taskgraph/task/legacy.py
+++ b/taskcluster/taskgraph/task/legacy.py
@@ -147,16 +147,20 @@ def set_interactive_task(task, interacti
 def remove_caches_from_task(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$"),
+        # The assumption here is that `hg robustcheckout --purge` is used and
+        # the checkout will start from a clean slate on job execution. This
+        # means there should be no contamination from previous tasks.
+        re.compile("^level-[123]-checkouts$"),
         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)