From de8b608f747be40f309a31cbf57857d26cdf62f0 Mon Sep 17 00:00:00 2001 From: Harsh Aggarwal Date: Tue, 25 Aug 2026 19:34:03 +0530 Subject: [PATCH] ci: don't treat "waiting" runs as active in the bot-CI priority gate A run in GitHub Actions "waiting" status is parked on an environment protection rule, not consuming a runner. The only environment gate in this repo is falcor-ci (a manual ci-approvers approval on the Falcor bridge test), so a "waiting" run is blocked on a human, not on runner capacity. Since #12614 the falcor-build-approval-gate job (needs: [filter]) makes every run enter "waiting" on the falcor-ci approval almost immediately. With "waiting" in ACTIVE_STATUSES, the priority gate then saw CI as permanently busy so every nv-slang-bot dispatch yielded and ran zero tests, and the retry saw CI as never quiet so yielded runs were never rerun -- a deadlock (observed: 29/29 currently-waiting bot dispatch runs had executed no builds). Drop "waiting" from ACTIVE_STATUSES. Runs that truly hold or await runners are queued/in_progress/requested/pending and remain counted; approval-parked runs flip to those states once approved and are counted then. --- extras/ci/ci_priority_common.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/extras/ci/ci_priority_common.py b/extras/ci/ci_priority_common.py index b2d36f7a5f6..a7a7fbc3814 100644 --- a/extras/ci/ci_priority_common.py +++ b/extras/ci/ci_priority_common.py @@ -26,7 +26,20 @@ } # Run statuses that mean a run still holds, or is waiting for, runner capacity. -ACTIVE_STATUSES = {"queued", "in_progress", "waiting", "requested", "pending"} +# +# Deliberately excludes "waiting": in GitHub Actions that status means a job is +# parked on an environment protection rule, not that it is consuming a runner. +# The only environment gate in this repo is `falcor-ci` (a manual `ci-approvers` +# approval on the Falcor bridge test), so a "waiting" run is idle build-wise -- +# it is blocked on a human, not on runner capacity. Counting it as active caused +# a deadlock: since #12614 every run parks in "waiting" on the falcor-ci approval +# early (the falcor-build-approval-gate job only needs [filter]), which made the +# priority gate treat CI as permanently busy (so bot dispatches always yielded) +# and made the retry treat CI as never quiet (so yielded runs were never rerun). +# Runs that truly hold/await runners flip to queued/in_progress once approved and +# are counted then. NOTE: if a second environment gate is ever added whose +# pending state *should* count as contention, revisit this. +ACTIVE_STATUSES = {"queued", "in_progress", "requested", "pending"} def normalize_bot_logins(extra_logins=None):