Bug 1836015 Updated error message for missing '-' in new label extraction r=perftest-reviewers,taskgraph-reviewers,releng-reviewers,sparky,bhearsum

Differential Revision: https://phabricator.services.mozilla.com/D181877
This commit is contained in:
Alex Finder 2023-06-28 17:47:59 +00:00
Родитель 557ec11a59
Коммит 3ed769d370
1 изменённых файлов: 8 добавлений и 0 удалений

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

@ -203,7 +203,15 @@ def new_label(label, tasks):
For instance, we try to backfill chunk #3, however, a previous push does not contain such
chunk, thus, we try to reuse another task/label.
"""
logger.info(f"Extracting new label for {label}")
if "-" not in label:
raise Exception(
f"Expected '-' was not found in label {label}, cannot extract new label."
)
begining_label, ending = label.rsplit("-", 1)
if ending.isdigit():
# We assume that the taskgraph has chunk #1 OR unnumbered chunk and we hijack it
if begining_label in tasks: