Bug 1494333 - index crons just like artifacts r=Callek
☠☠ backed out by 2f85c2b55cd2 ☠ ☠
authorDustin J. Mitchell <dustin@mozilla.com>
Tue, 02 Oct 2018 19:02:14 +0000
changeset 440554 8db96096643ba13f2c5e5db526de96f1cf55dddc
parent 440553 56b783db0fd3052b6344d55962e46bc692bc5383
child 440555 8de1df1879492c846ae8af65f1b26c773068a031
push id34824
push usertoros@mozilla.com
push dateWed, 10 Oct 2018 21:56:50 +0000
treeherdermozilla-central@389e356499df [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.${ownTaskId}"
                 # 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