Bug 1455448: Don't include `firefox` in the decision task index; r=dustin,mshal,rail,Callek a=release
authorTom Prince <mozilla@hocat.ca>
Thu, 19 Apr 2018 15:32:02 -0600
changeset 463483 82e0d69ecde1d708ba327f125e32d7478b7d16b5
parent 463482 059226cf0195aed9b2b7d5c5834e2b289c42c0fd
child 463484 7fb24c4b9c3cf0f0a92bf6f167fbd1db0bfd6e9a
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdustin, mshal, rail, Callek, release
bugs1455448
milestone60.0
Bug 1455448: Don't include `firefox` in the decision task index; r=dustin,mshal,rail,Callek a=release The decision task is used for everything built as part of a push (for mozilla-central, this is firefox, devedition and fennec, as well as tasks that aren't strictly part of any product). Thus, having `firefox` encoded as part of the decision task doesn't make sense. This changes the route from index.gecko.v2.${repository.project}.latest.firefox.decision to index.gecko.v2.${repository.project}.latest.taskgraph.decision while leaving the latter for backwards compatability with tools that expect it. Differential Revision: https://phabricator.services.mozilla.com/D996
.taskcluster.yml
taskcluster/taskgraph/parameters.py
--- a/.taskcluster.yml
+++ b/.taskcluster.yml
@@ -47,29 +47,35 @@ tasks:
         then: {createdForUser: "${ownerEmail}"}
         else:
           $if: 'tasks_for == "action"'
           then:
             createdForUser: '${ownerEmail}'
             kind: 'action-callback'
 
       routes:
-        $if: 'tasks_for == "hg-push"'
-        then:
-          - "index.gecko.v2.${repository.project}.latest.firefox.decision"
-          - "index.gecko.v2.${repository.project}.revision.${push.revision}.firefox.decision"
-          - "index.gecko.v2.${repository.project}.pushlog-id.${push.pushlog_id}.decision"
+        $flatten:
           - "tc-treeherder.v2.${repository.project}.${push.revision}.${push.pushlog_id}"
-          - "notify.email.${ownerEmail}.on-failed"
-          - "notify.email.${ownerEmail}.on-exception"
-        else:
-          - "tc-treeherder.v2.${repository.project}.${push.revision}.${push.pushlog_id}"
-          - $if: 'tasks_for == "action"'
-            then: "index.gecko.v2.${repository.project}.pushlog-id.${push.pushlog_id}.actions.${ownTaskId}"
-            else: "index.gecko.v2.${repository.project}.latest.firefox.decision-${cron.job_name}"
+          - $if: 'tasks_for == "hg-push"'
+            then:
+              - "index.gecko.v2.${repository.project}.latest.taskgraph.decision"
+              - "index.gecko.v2.${repository.project}.revision.${push.revision}.taskgraph.decision"
+              - "index.gecko.v2.${repository.project}.pushlog-id.${push.pushlog_id}.decision"
+              - "notify.email.${ownerEmail}.on-failed"
+              - "notify.email.${ownerEmail}.on-exception"
+              # These are the old index routes for the decision task.
+              # They are still here so external tools that referenced them continue to work.
+              - "index.gecko.v2.${repository.project}.latest.firefox.decision"
+              - "index.gecko.v2.${repository.project}.revision.${push.revision}.firefox.decision"
+            else:
+              $if: 'tasks_for == "action"'
+              then: "index.gecko.v2.${repository.project}.pushlog-id.${push.pushlog_id}.actions.${ownTaskId}"
+              else:
+              - "index.gecko.v2.${repository.project}.latest.taskgraph.decision-${cron.job_name}"
+              - "index.gecko.v2.${repository.project}.latest.firefox.decision-${cron.job_name}"
 
       scopes:
         $if: 'tasks_for == "hg-push"'
         then:
           - 'assume:repo:${repoUrl[8:]}:branch:default'
           - 'queue:route:notify.email.${ownerEmail}.*'
         else:
           $if: 'tasks_for == "action"'
--- a/taskcluster/taskgraph/parameters.py
+++ b/taskcluster/taskgraph/parameters.py
@@ -183,17 +183,19 @@ def load_parameters_file(filename, stric
         # reading parameters from a local parameters.yml file
         f = open(filename)
     except IOError:
         # fetching parameters.yml using task task-id, project or supplied url
         task_id = None
         if filename.startswith("task-id="):
             task_id = filename.split("=")[1]
         elif filename.startswith("project="):
-            index = "gecko.v2.{}.latest.firefox.decision".format(filename.split("=")[1])
+            index = "gecko.v2.{project}.latest.taskgraph.decision".format(
+                project=filename.split("=")[1],
+            )
             task_id = find_task_id(index)
 
         if task_id:
             filename = get_artifact_url(task_id, 'public/parameters.yml')
         f = urllib.urlopen(filename)
 
     if filename.endswith('.yml'):
         return Parameters(strict=strict, **yaml.safe_load(f))