Bug 1340564: use attributes to identify talos jobs; r?bstack draft
authorDustin J. Mitchell <dustin@mozilla.com>
Tue, 25 Apr 2017 22:34:13 +0000
changeset 576295 18388333858039e502885becb601821f18839d46
parent 576294 69924d1d7d3e97a95d99a10d2d974f7857ff917e
child 628154 18b2331f00fa12966b32f46cacec1cbc6c75bcc5
push id58315
push userdmitchell@mozilla.com
push dateThu, 11 May 2017 15:34:51 +0000
reviewersbstack
bugs1340564
milestone55.0a1
Bug 1340564: use attributes to identify talos jobs; r?bstack MozReview-Commit-ID: B29F5SL8JNr
taskcluster/taskgraph/action.py
--- a/taskcluster/taskgraph/action.py
+++ b/taskcluster/taskgraph/action.py
@@ -93,17 +93,20 @@ def backfill(project, job_id):
 def add_talos(decision_task_id, times=1):
     """
     Run the add-talos task.  This function implements `mach taskgraph add-talos`,
     and is responsible for
 
      * Adding all talos jobs to a push.
     """
     full_task_json = get_artifact(decision_task_id, "public/full-task-graph.json")
-    task_labels = [label for label in full_task_json if "talos" in label]
+    task_labels = [
+        label for label, task in full_task_json.iteritems()
+        if "talos_try_name" in task['attributes']
+    ]
     for time in xrange(times):
         add_tasks(decision_task_id, task_labels, '{}-'.format(time))
 
 
 def load_decisions(s, project, resultsets, filters):
     """
     Given a project, a list of revisions, and a dict of filters, return
     a list of taskIds from decision tasks.