Bug 1494333 - index crons just like artifacts r=Callek
authorDustin J. Mitchell <dustin@mozilla.com>
Thu, 11 Oct 2018 13:29:11 +0000
changeset 440763 623c34a2c9dcceebe35432602b0ca47eb8ea9869
parent 440762 ed70a55e2721cc9e84a05ecec3b67ef296f15950
child 440764 6e9980bbb079c59e20495ec1161eb86f0f88d706
push id70801
push userdmitchell@mozilla.com
push dateThu, 11 Oct 2018 19:56:37 +0000
treeherderautoland@623c34a2c9dc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersCallek
bugs1494333
milestone64.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 1494333 - index crons just like artifacts r=Callek Differential Revision: https://phabricator.services.mozilla.com/D7099
.taskcluster.yml
taskcluster/taskgraph/actions/util.py
--- a/.taskcluster.yml
+++ b/.taskcluster.yml
@@ -88,16 +88,18 @@ tasks:
               else:
                 $if: 'tasks_for == "action"'
                 then:
                 - "notify.email.taskcluster-notifications+action-task@mozilla.com.on-failed"
                 - "notify.email.taskcluster-notifications+action-task@mozilla.com.on-exception"
                 - "index.gecko.v2.${repository.project}.pushlog-id.${_pushId}.actions.${ownTaskId}"
                 else:  # cron
                 - "index.gecko.v2.${repository.project}.latest.taskgraph.decision-${cron.job_name}"
+                # list each cron task on this revision, so actions can find them
+                - 'index.gecko.v2.${repository.project}.revision.${push.revision}.cron.${as_slugid("decision")}'
                 # These are the old index routes for the decision task.
                 - "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}.*'
--- a/taskcluster/taskgraph/actions/util.py
+++ b/taskcluster/taskgraph/actions/util.py
@@ -82,22 +82,37 @@ def fetch_graph_and_labels(parameters, g
     label_to_taskid = get_artifact(decision_task_id, "public/label-to-taskid.json")
 
     # Now fetch any modifications made by action tasks and swap out new tasks
     # for old ones
     namespace = '{}.v2.{}.pushlog-id.{}.actions'.format(
         graph_config['trust-domain'],
         parameters['project'],
         parameters['pushlog_id'])
-    for action in list_tasks(namespace):
+    for task_id in list_tasks(namespace):
+        logger.info('fetching label-to-taskid.json for action task {}'.format(task_id))
         try:
-            run_label_to_id = get_artifact(action, "public/label-to-taskid.json")
+            run_label_to_id = get_artifact(task_id, "public/label-to-taskid.json")
             label_to_taskid.update(run_label_to_id)
         except HTTPError as e:
-            logger.info('Skipping {} due to missing artifact! Error: {}'.format(action, e))
+            logger.debug('No label-to-taskid.json found for {}: {}'.format(task_id, e))
+            continue
+
+    # Similarly for cron tasks..
+    namespace = '{}.v2.{}.revision.{}.cron'.format(
+        graph_config['trust-domain'],
+        parameters['project'],
+        parameters['head_rev'])
+    for task_id in list_tasks(namespace):
+        logger.info('fetching label-to-taskid.json for cron task {}'.format(task_id))
+        try:
+            run_label_to_id = get_artifact(task_id, "public/label-to-taskid.json")
+            label_to_taskid.update(run_label_to_id)
+        except HTTPError as e:
+            logger.debug('No label-to-taskid.json found for {}: {}'.format(task_id, e))
             continue
 
     return (decision_task_id, full_task_graph, label_to_taskid)
 
 
 def create_task_from_def(task_id, task_def, level):
     """Create a new task from a definition rather than from a label
     that is already in the full-task-graph. The task definition will