Bug 1289643 - Allow level-{{level}}-checkouts cache to be used on Try; r=dustin
authorGregory Szorc <gps@mozilla.com>
Fri, 29 Jul 2016 11:10:48 -0700
changeset 307523 6ea38e6856796ace377833cffd28dfc06dc362e8
parent 307522 50b87c38d18dc57a57de8b5c24079899180af11a
child 307524 4c8d8454a4c54dab9f20541906d97d72ef61ce86
push id30964
push usergszorc@mozilla.com
push dateMon, 01 Aug 2016 16:55:46 +0000
treeherderautoland@6ea38e685679 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin
bugs1289643
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 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)