Bug 1547781 - expire try decision artifacts after 28 days r=Callek
authorDustin J. Mitchell <dustin@mozilla.com>
Tue, 30 Apr 2019 13:48:25 +0000
changeset 535879 1fb59fab2d6bccfaa73021ffc7169598e04a5aec
parent 535878 80a1bc138c4f8c3b78778960769a1b4d3a3feee5
child 535880 efb47df74a705992417942aa52bc60709090c514
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersCallek
bugs1547781
milestone68.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 1547781 - expire try decision artifacts after 28 days r=Callek This ensures that the artifacts an action task might consult will be gone at the same time that the push's tasks expire. Differential Revision: https://phabricator.services.mozilla.com/D29270
.taskcluster.yml
--- a/.taskcluster.yml
+++ b/.taskcluster.yml
@@ -54,29 +54,34 @@ tasks:
   # takes place.
   - $if: 'tasks_for in ["hg-push", "action", "cron"]'
     then:
       $let:
         # sometimes the push user is just `ffxbld` or the like, but we want an email-like field..
         ownerEmail: {$if: '"@" in push.owner', then: '${push.owner}', else: '${push.owner}@noreply.mozilla.org'}
         # ensure there's no trailing `/` on the repo URL
         repoUrl: {$if: 'repository.url[-1] == "/"', then: {$eval: 'repository.url[:-1]'}, else: {$eval: 'repository.url'}}
+        # expire try earlier than other branches
+        expires:
+          $if: 'repository.project == "try"'
+          then: {$fromNow: '28 days'}
+          else: {$fromNow: '1 year'}
       in:
         taskId: {$if: 'tasks_for != "action"', then: '${ownTaskId}'}
         taskGroupId:
           $if: 'tasks_for == "action"'
           then:
             '${action.taskGroupId}'
           else:
             '${ownTaskId}' # same as taskId; this is how automation identifies a decision tsak
         schedulerId: 'gecko-level-${repository.level}'
 
         created: {$fromNow: ''}
         deadline: {$fromNow: '1 day'}
-        expires: {$fromNow: '1 year 1 second'} # 1 second so artifacts expire first, despite rounding errors
+        expires: {$eval: 'expires'}
         metadata:
           $merge:
             - owner: "${ownerEmail}"
               source: "${repoUrl}/raw-file/${push.revision}/.taskcluster.yml"
             - $if: 'tasks_for == "hg-push"'
               then:
                 name: "Gecko Decision Task"
                 description: 'The task that creates all of the other tasks in the task graph'
@@ -250,17 +255,17 @@ tasks:
                   --head-ref="$GECKO_HEAD_REF"
                   --head-rev="$GECKO_HEAD_REV"
                   ${extraArgs}
 
           artifacts:
             'public':
               type: 'directory'
               path: '/builds/worker/artifacts'
-              expires: {$fromNow: '1 year'}
+              expires: {$eval: expires}
 
         extra:
           $merge:
             - treeherder:
                 $merge:
                   - machine:
                       platform: gecko-decision
                   - $if: 'tasks_for == "hg-push"'