From c38757f4c5f019ee29f8cbc3e33c1982a81e642d 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 needs to output "true" in case no labels are found e.g. when a build will not include exotics a partial expression is pre-pended to the output of this script EXOTIX_CONFIGURATIONS_FILTER: (!label.contains("mingw") && !label.contains("_HUB_") && !label.contains("hpux") && !label.contains("aix") && !label.contains("solaris")) && \ so a true at the end of that expression will be a no-op and appropriate. Ticket: ENT-14025 Changelog: none (cherry picked from commit 810e1f933de44d5a27830d8cee951cd0b99852cc) --- 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 c641329b8..c83fe9f9c 100644 --- a/build-scripts/get_labels_expr.py +++ b/build-scripts/get_labels_expr.py @@ -54,7 +54,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: + # if no labels are found we print true to be a no-op in an expression that likely includes other elements like no exotics or specific labels + print("true") + else: print("(", end="") labels_eqs = ('label == "%s"' % label for label in sorted(labels_to_run)) print(" || \\\n ".join(labels_eqs) + ")")