Bug 1494333 - index crons just like artifacts r=Callek

Differential Revision: https://phabricator.services.mozilla.com/D7099

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Dustin J. Mitchell 2018-10-11 13:29:11 +00:00
parent ff2ee04ec2
commit c2f2a7caaf
2 changed files with 20 additions and 3 deletions
.taskcluster.yml
taskcluster/taskgraph/actions

@ -93,6 +93,8 @@ tasks:
- "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}"

@ -87,12 +87,27 @@ def fetch_graph_and_labels(parameters, graph_config):
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)