diff --git a/src/taskgraph/actions/util.py b/src/taskgraph/actions/util.py index 13c0c1278..253896314 100644 --- a/src/taskgraph/actions/util.py +++ b/src/taskgraph/actions/util.py @@ -64,12 +64,19 @@ def fetch_action(task_id): raise logger.debug(f"No label-to-taskid.json found for {task_id}: {e}") - namespace = "{}.v2.{}.pushlog-id.{}.actions".format( + # for backwards compatibility, look up actions via pushlog-id + pushlog_namespace = "{}.v2.{}.pushlog-id.{}.actions".format( graph_config["trust-domain"], parameters["project"], parameters["pushlog_id"], ) - for task_id in list_tasks(namespace): + # ... but also look by revision, since github doesn't have pushlog-id + rev_namespace = "{}.v2.{}.revision.{}.actions".format( + graph_config["trust-domain"], + parameters["project"], + parameters["head_rev"], + ) + for task_id in set(list_tasks(pushlog_namespace) + list_tasks(rev_namespace)): fetches.append(e.submit(fetch_action, task_id)) # Similarly for cron tasks..