Repository navigation
ci: fall back to hosted runners when queue host is offline - #4751
Merged
Merged
Conversation
Probe matching online repository runners with an optional status token, then share the selection with Build and Format. Keep hosted runner labels and required check names unchanged. Refs #4005. Ci-Attestation: {"at":1794521677,"gate":"rust/all/fmt","host":"linux-x86_64","key":"","lane":"lint","parents":["4a264aa4cd203372c83b30a5a010fef2e368654c"],"secs":288,"stamp":"2c5844cbff0548cc216f7f6ab50c5967","tree":"6a7a692c954b4679a571042fe53cfdac06a48dda","v":1,"via":"run"} Ci-Attestation: {"at":1794521677,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"","lane":"lint","parents":["4a264aa4cd203372c83b30a5a010fef2e368654c"],"secs":288,"stamp":"60ef7f8475a792103973750570284554","tree":"6a7a692c954b4679a571042fe53cfdac06a48dda","v":1,"via":"run"} Ci-Attestation: {"at":1794521677,"gate":"rust/x86_64-unknown-linux-gnu/dylint","host":"linux-x86_64","key":"","lane":"dylint","parents":["4a264aa4cd203372c83b30a5a010fef2e368654c"],"secs":288,"stamp":"e9c24f965a9de0f8fd0b5d59a051792b","tree":"6a7a692c954b4679a571042fe53cfdac06a48dda","v":1,"via":"run"}
zackees
marked this pull request as ready for review
November 12, 2026 22:24
zackees
enabled auto-merge
November 12, 2026 22:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When MQ_RUNNER_LABELS is configured but the self-hosted queue machine is offline, the static runs-on expressions leave merge-queue jobs waiting indefinitely. A short hosted select-mq-runner job now queries the repository runners API and selects those labels only when an online runner carries every label. Missing MQ_RUNNER_STATUS_TOKEN, malformed configuration, API errors, and no matching online runner produce a warning and preserve each job’s existing hosted fallback. Busy online runners remain eligible.
The selected JSON is shared with the existing Build and Format reusable workflows through optional string inputs; their other callers default to an empty selection. All existing MQ runner expressions, including the Linux matrix expression, consume this result. Required job names, lane selection, native coverage, and PR/push/schedule/release hosted labels are unchanged. Probe setup failures are tolerated at step level and warn without changing CI Gate’s failure policy.
The documentation describes the fine-grained status PAT with repository Administration: read permission and the intended NixOS netbooted Dell PowerEdge running jobs in its Ubuntu container image / FHS environment. Selection is an availability snapshot, so a host disappearing after the probe can still delay jobs. No runner registration, variables, or secrets are changed by this PR. CI changes are exempt from the features ledger under coordination.md.
RED commit 4a264aa records the failing tests:
uv run --no-project -m unittest discover -s ci -p test_select_mq_runner.pyexited 1 because the selector did not exist; the corresponding test_ci_scope.py command exited 1 with five failures and one error for the static expressions/missing selector job. The separate GREEN implementation makes all 16 selector tests and all 59 CI scope tests pass. The lane-proof and Tier 2 fanout regression suites also pass. The new selector test is wired into ./lint by its existing discovery of every ci/test_*.py. All HTTP behavior in these tests uses a fake HTTP layer, with no credentials or runner needed. Rust/C differential and protocol tiers do not apply to this CI-only change.A local pre-push review found the initial job-level error handling could still fail the gate; the final implementation uses guarded steps with continue-on-error and has regression assertions for that correction. The single required
SOLDR_PORCELAIN=0 ./lintrun used a 1,200-second deadline and exited 1 on two workflow-policy assertions: ci-pre must remain the first job and setup-uv must declare the master-only save-cache guard. Both were corrected in ci.yml. The affected suites then passed (11 test_ci_pre tests, 47 test_ci_toml tests), and all 59 CI scope tests passed again. Every other self-test reported passing in that full run. Full lint was not repeated, per the maintainer’s one-run constraint; it stopped before its later Rust formatting/clippy checks../pushsubsequently succeeded with prooft attestations for Rust formatting, host clippy, and Dylint. Hosted PR CI remains the merge gate.Refs #4005.
The push helper opened this PR as a draft because repository backpressure was closed: it reported the oldest queued run waiting 1,535 minutes for a runner. The worker has not overridden that admission guard.
The requested
gh pr merge 4751 --auto --match-head-commit d68867c4529d92ff1a7b6d3c51a96f110b1b6460exited 1: GitHub refused auto-merge because the PR is a draft. Admission remains blocked; the manager can decide when to mark it ready and arm auto-merge.