Bug 1896366 - avoid running both nightly-all and nightly-android graphs on the same revision. r=releng-reviewers,taskgraph-reviewers,gbrown

Differential Revision: https://phabricator.services.mozilla.com/D210165
This commit is contained in:
Julien Cristau 2024-05-13 15:10:48 +00:00
Родитель af33427f78
Коммит 013154bbfd
1 изменённых файлов: 13 добавлений и 12 удалений

Просмотреть файл

@ -1632,18 +1632,19 @@ def target_tasks_nightly_android(full_task_graph, parameters, graph_config):
"focus-nightly-firebase",
)
index_path = (
f"{graph_config['trust-domain']}.v2.{parameters['project']}.revision."
f"{parameters['head_rev']}.taskgraph.decision-nightly-android"
)
if os.environ.get("MOZ_AUTOMATION") and retry(
index_exists,
args=(index_path,),
kwargs={
"reason": "to avoid triggering multiple nightlies off the same revision",
},
):
return []
for platform in ("android", "all"):
index_path = (
f"{graph_config['trust-domain']}.v2.{parameters['project']}.revision."
f"{parameters['head_rev']}.taskgraph.decision-nightly-{platform}"
)
if os.environ.get("MOZ_AUTOMATION") and retry(
index_exists,
args=(index_path,),
kwargs={
"reason": "to avoid triggering multiple nightlies off the same revision",
},
):
return []
return [l for l, t in full_task_graph.tasks.items() if filter(t, parameters)]