From 192a5658c012b03fec3cdfcccb4d9f56ab6baf6d Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Wed, 29 Apr 2026 17:23:42 -0500 Subject: [PATCH] fix: build-scripts/get_labels_expr.py should return an error when asked for exotics and none are found This will allow jenkins jobs to adjust filters accordingly. Ticket: ENT-14025 Changelog: none --- build-scripts/get_labels_expr.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build-scripts/get_labels_expr.py b/build-scripts/get_labels_expr.py index 7df9f605b..093f20954 100644 --- a/build-scripts/get_labels_expr.py +++ b/build-scripts/get_labels_expr.py @@ -70,7 +70,10 @@ def main(labels_f_path, exotics_f_path, run_on_exotics, only_exotics): else: labels_to_run = all_labels - if len(labels_to_run) != 0: + if len(labels_to_run) == 0: + print("No exotics were found. Returning error code 42 to indicate this.", file=sys.stderr) + return 42 + else: print("(", end="") labels_eqs = ('label == "%s"' % label for label in sorted(labels_to_run)) print(" || \\\n ".join(labels_eqs) + ")")