From c5f5b6b78db51826599a36751790e8cd4ab270e2 Mon Sep 17 00:00:00 2001 From: Sergi Blanch Torne Date: Fri, 12 Dec 2025 11:18:53 +0100 Subject: [PATCH] crnm: default wo coloring when unknown GitLab job status When GitLab adds new job statuses, we need to upgrade the coloring dictionary. By having a default value for non-colored output, we handle future unknown status, and avoid crashes. Signed-off-by: Sergi Blanch Torne Reviewed-by: Eric Engestrom Part-of: --- bin/ci/ci_run_n_monitor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/ci/ci_run_n_monitor.py b/bin/ci/ci_run_n_monitor.py index 0657c3449b6..987deda427d 100755 --- a/bin/ci/ci_run_n_monitor.py +++ b/bin/ci/ci_run_n_monitor.py @@ -45,7 +45,7 @@ REFRESH_WAIT_LOG = 10 REFRESH_WAIT_JOBS = 6 MAX_ENABLE_JOB_ATTEMPTS = 3 -STATUS_COLORS = { +STATUS_COLORS = defaultdict(lambda: "", { "created": "", "running": "[blue]", "success": "[green]", @@ -55,7 +55,7 @@ STATUS_COLORS = { "manual": "", "pending": "", "skipped": "", -} +}) COMPLETED_STATUSES = frozenset({"success", "failed"}) RUNNING_STATUSES = frozenset({"created", "pending", "running"})