Skip to content

Commit 4d91d7d

Browse files
committed
fix(hw): Properly group missing runners
1 parent 52c078b commit 4d91d7d

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.gitlab/scripts/gen_hw_jobs.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ def main():
360360
# Discover available runners (best-effort)
361361
available_runners = list_project_runners()
362362
if not available_runners:
363-
print("[WARN] Could not enumerate project runners or none found; skipping runner-tag availability checks.")
363+
print("[WARN] Could not enumerate project runners or none found; using conservative mode for tagged groups.")
364364

365365
# Accumulate all missing-runner groups to emit a single stub job
366366
missing_groups: list[dict] = []
@@ -375,6 +375,14 @@ def main():
375375
can_schedule = True
376376
if available_runners:
377377
can_schedule = any_runner_matches(tag_list, available_runners)
378+
else:
379+
# Conservative mode when we cannot list runners: treat groups that require extra
380+
# tags beyond the SOC or 'generic' as missing-runner to avoid running on generic.
381+
assume_missing = os.environ.get("ASSUME_TAGGED_GROUPS_MISSING", "1") == "1"
382+
if assume_missing:
383+
extra = [t for t in tag_list if t not in (chip, "generic")]
384+
if extra:
385+
can_schedule = False
378386

379387
if can_schedule:
380388
job_name = f"hw-{chip}-{test_type}-{tag_suffix}"[:255]

0 commit comments

Comments
 (0)