Skip to content

CI: route Linux x64 jobs Dells-first via pool-select lease (gh-runner#312) #2214

Backlog

Description

@zackees

Operator directive 2026-11-28: the Dells eagerly take every job they can run, and GitHub-hosted runners take a job only when the Dells are full.

In the 24 h to 2026-11-29 07:00 UTC, 277 Linux x64 jobs in FastLED/fbuild ran on GitHub-hosted runners, while both Dells had idle capacity most of that time. These jobs hard-code runs-on: ubuntu-latest (or use a non-lease probe), so they never ask Signal for a Dell.

Ask: put a selector job using forge-ci/ci.yml/actions/pool-select in front of each Linux x64 job, with source: lease, lease-class: linux-x64-large, fallback: ubuntu-latest and the job permission id-token: write. Then use runs-on: ${{ fromJSON(needs.<select>.outputs.runs-on) }}. Signal grants a Dell when a slot is free. It answers hosted when the Dells are full, down or slow, so nothing ever stalls.

PR jobs stay hosted for now (allow_pr: false, and fork PRs never get a Dell). See forge-ci/gh-runner#401 and forge-ci/ci.yml#584.

Activity

  1. zackees commented on Nov 30, 2026

    @zackees
    MemberAuthor

    Steward tick 2026-11-30T14:5xZ — stage 1 shipped as PR #2219 (unmerged).

    Measured first, on the 40 most recent runs: 352 hosted Linux jobs, and the workflow-level split names the biggest consumers — template_build.yml (every per-board build), check-ubuntu.yml (glibc-floor, python-facade-tests; check was already selected), bench-205.yml, fmt.yml, validate-boards.yml, crate-gate.yml, lint-subprocess.yml, loc-gate.yml, ci-workflow-drift.yml.

    All of those now carry the selector pattern check-ubuntu.yml already proves (same pinned pool-select@a36bc81a, FORGE_POOL_LABELS, fallback: ubuntu-latest), with three properties enforced by a new ci/test_pool_selector.py:

    1. an unset variable / dead endpoint / fork PR falls back to ubuntu-latest and never stalls;
    2. every routed job carries !cancelled(), because needs: pool alone would skip the gate when the selector is skipped;
    3. no new selector fires on a pull_request (allow_pr: false).

    Live confirmation of (3) on the PR itself: every new Select runner job is skipping and each routed job still ran (Formatting pass 25s, Lint subprocess spawns pass 11s, Prooft formatting plan pass 10s).

    Deliberately deferred, each named in the guard's DEFERRED map with its reason: dylint.yml's Dylint Full lane (ci/test_fractional_workflows.py pins it free of any if: so it can never be conditionally skipped — converting it needs a guard-visible selector, not a weakened invariant); the rendered ci-minimal/ci-full/ci-test aggregators and fbuild_bin (a render_workflows.py change, kept out of this mechanical pass); qemu-linux-runtime.yml (KVM capability probe needed); nightly-platforms.yml; benchmark-build-comparison.yml (netns shape); release-auto.yml.

    Real output: ci.test_pool_selector 6/6 with the RED proof (one routed job reverted to runs-on: ubuntu-latest → completeness guard failed), full drift suite 673 passed / 0 failed, render_workflows.py --check exit 0, concurrency / complexity / types clean.

    This issue stays open for stage 2.

  2. zackees commented on Nov 30, 2026

    @zackees
    MemberAuthor

    Stage 2, acceptance matrix: on main — #2220 5d939bf3 (squash of 1e4c6692, merged 2026-11-30T16:09:41Z; GraphQL enqueue position 1; merge-group 46456854239 SUCCESS, linux / Check 12060-line log with 0 soldr#3377 / 0 INFRA - / 0 relay resets / 0 FAILED / 0 error[E, 56 test result: ok).

    Why this lane first, measured from the real job lists of the two newest ci-minimal runs (46440332120 push, 46437135354 PR): glibc 2.17 floor 13m49s, linux / Check 6m57s–7m13s, dylint / Dylint Full 4m07s, Build fbuild 2m24s, Python facade tests 1m50s, per-board build ~1m30s. Everything above already consumes the selector; the Acceptance (#205) matrix was the largest unrouted lane left, and each of its 12 gates is a full test-binary compile plus a vendor framework download under a 45-minute timeout.

    What landed:

    • acceptance-205.yml gains the pool selector job (same pinned forge-ci/ci.yml/actions/pool-select@a36bc81a, continue-on-error, fallback: ubuntu-latest). Its trusted-event gate adds schedule because this workflow is otherwise only scheduled or dispatched; pull_request stays absent, and since a called workflow's github.event_name is the caller's, the ci-full tier's PR call skips the selector and the gates stay hosted (fork PRs can never reach the pool).
    • acceptance takes needs: pool with if: ${{ !cancelled() }} and the needs.pool.result == 'success' && fromJSON(...) || 'ubuntu-latest' form, so a skipped selector runs the gate hosted instead of silently skipping it.
    • ci/test_pool_selector.py: acceptance-205.yml moved from DEFERRED to ROUTED; two remaining deferrals now carry the measurement that justifies them — audit-ignored-tests (static #[ignore] inventory, no build) and esp32s3-size-parity (firmware size parity: a pool image difference would read as a size regression, so it is not a capacity question).

    Verification: ci.test_pool_selector 6/6; RED proven by restoring HEAD's YAML while the job stayed in ROUTED (2 failures + 2 errors, '!cancelled()' not found in ''), then restored from a saved copy → 6/6; full drift suite 673 passed / 0 failed; render_workflows --check 0; concurrency OK; complexity "All checks passed!"; check_python_types 0 errors; ruff clean. Live on the PR: 38 checks, 0 non-success, CLEAN before enqueue.

    Still open here, unchanged and not claimed: dylint's Dylint Full lane (needs a guard-visible selector pattern — ci.test_fractional_workflows pins it free of any if:), the rendered ci-{minimal,full,test} jobs (render_workflows.py), qemu (needs a KVM pool probe), nightly, benchmark-compare and release-auto.

  3. zackees commented on Nov 30, 2026

    @zackees
    MemberAuthor

    Stage 3 (2026-11-30): PR #2221 — dylint.yml's Dylint Full (Linux builder, all OS targets) lane is now routed through the pinned pool-select@a36bc81a selector.

    Why it needed real work rather than the stage 1-2 pattern: ci/test_fractional_workflows.py pins that job free of any if: (it is the required Dylint check and must never be conditionally skippable), and needs: pool alone lets a skipped selector skip the gate.

    • selector offers the pool only on trusted events (push, merge_group, workflow_dispatch), never pull_request — fork PRs stay off self-hosted hardware, PR lane stays hosted;
    • the lane takes needs: pool + if: ${{ !cancelled() }} and reads needs.pool.outputs.runs-on only after the selector succeeded, with a literal ubuntu-latest fallback;
    • the structural guard is now an EXACT pin (${{ !cancelled() }} + needs: pool + that runs-on); success() / needs.pool.result == 'success' fail it, so the guard cannot be weakened into a skippable gate. ci/test_pool_selector.py pins the same shape and moves the lane from DEFERRED to ROUTED.

    Real output: RED proof with HEAD's YAML restored → 2 failures + 4 errors ('!cancelled()' not found, no pool job); green → 34/34 on the two modules, full drift suite 674/0 (TMPDIR=/tmp), render_workflows --check 0, check_python_types 0 errors, complexity 0, concurrency 0, ruff check clean.

    Measured context (main push 46458640046): after stages 1-2 every lane above ~1.5 min was already selector-routed and fell back to hosted only because the pool was saturated; Dylint Full at 3m04s was the largest remaining unrouted build lane.

    Still deferred here, with reasons: qemu-linux-runtime.yml (needs a pool KVM capability probe), ci-test.yml PR-only tiers, the rendered ci-{minimal,full} aggregators, esp32s3-size-parity.yml (firmware size, not capacity), nightly/benchmark/release-auto, and dylint's static policy job.

  4. zackees commented on Nov 30, 2026

    @zackees
    MemberAuthor

    Steward tick 2026-11-30T19:0xZ — BLOCKER: the pool is empty for FastLED; stages 1–3 are currently inert.

    I stopped before adding a fourth routing stage, because I measured the thing the stages exist to do and it never happens. Every selector answers hosted with online=0, not "saturated" as my earlier ticks recorded.

    Evidence, in order:

    1. GitHub org runner inventory (authoritative): orgs/FastLED/actions/runners → total_count = 4, and all four are self-hosted,Linux,forge-quick. orgs/FastLED/actions/runner-groups/3/runners (Dell-NixOS, the group that served this repo) → total_count = 0.
    2. Signal pool status, ?org=FastLED: the FastLED section lists exactly one label set — [Linux, forge-quick, self-hosted], online 4 / busy 0 — with dispatcher: null. The two Dells (dell-fsx3mn2, dell-jw22zc3, labels Linux,X64,forge-pool,forge-dispatch,nixos-host,self-hosted) now appear only under the forge-ci org key, with dispatcher.room = 22 each (max 24, busy 2).
    3. Production selector logs today: every routed lane prints pool-select: hosted: not enough pool capacity (source=signal, online=0, busy=0, idle=0, required=1) — fmt push 46477281945, 46458639573, 46440331740; and the three selectors in ci-minimal push 46477282403 (linux / dylint / glibc 2.17 floor). Because select_pool.py matches by wanted.issubset(runner_labels), a label set that no online runner carries resolves to zero capacity — a correct, silent, permanent fallback to hosted.
    4. It used to work, and the boundary is sharp. FastLED jobs ran on dell-fsx3mn2-fastled-1/2 through 2026-11-28T18:16Z (merge_group 46174964959); the very next merge_group, 2026-11-28T20:00Z (46184120359), and every run since — 5 merge_groups today included — has zero Dell runners. So this is not load or a flaky route: the FastLED Dell registration disappeared between those two times, and everything merged since (stages 1–3) has been falling back.
    5. A label-set trap waiting behind it: the repo variable is FORGE_POOL_LABELS = ["self-hosted","forge-pool","ubuntu-2404"], and no label set Signal reports anywhere carries ubuntu-2404 (the Dells report nixos-host, not ubuntu-2404). So even after the runners come back, this variable must be reconciled with the labels that are actually registered or the selectors will still answer hosted.
    6. Our pinned action is older than the mechanism that now serves the Dells. forge-ci/ci.yml/actions/pool-select@a36bc81a is the 2026-11-21 merge of feat/pool-select-signal. Since then upstream added dispatcher spare-room capacity (refactor(config): thread project_dir through deploy board-resolution fallbacks (#519) #564, 2026-11-22), reservation waiting (fix(config): split board tests under LOC gate (#519 follow-up) #567) and, at c38a3b1f (2026-11-30T18:08Z), a Signal lease client (source: lease, lease-class, OIDC id-token) — which is the mechanism the directive in this issue actually names, and the only one that can reach a host that is not registered to this repo's org.

    Also flagged (upstream, not fbuild): the Signal lease ledger is internally inconsistent right now — classes["linux-x64-large"] = {slots_online: 24, granted: 0, claimed: 0}, hosts_online: 2, room: 22 per host, yet last_decision = {reason: "no_free_slot", class: "linux-x64-large", at: 18:52:48Z} and reasons_1h: {no_free_slot: 2}. Any lease-based client will be declined until that is explained, which is why I did not migrate the lanes to source: lease blind.

    What I did not do: no new routing stage, no source: lease migration, no repo-variable edit. Each of those would be unverifiable today and would add a fourth inert layer.

    Owner asks, either one unblocks the program:

    • (a) re-register the Dell runners into this repo's Dell-NixOS group (and tell me the exact label set so FORGE_POOL_LABELS can be corrected — ubuntu-2404 matches nothing today), or
    • (b) confirm the Dells are now lease-only and that Signal will grant linux-x64-large again; then the correct change here is bumping the pin to c38a3b1f+ and switching the routed selectors to source: lease with id-token: write.

    #2214 stays open. Stages 1–3 are correct in shape and cost nothing while they fall back, but they buy no pool capacity until one of the two above lands.

  5. zackees commented on Nov 30, 2026

    @zackees
    MemberAuthor

    Steward tick 2026-11-30T20:1xZ — CORRECTION to my 19:04Z receipt, plus the one stage that was still shippable.

    I said last hour "bump the pin to c38a3b1f+". That advice was wrong, and I verified why before acting on it. Three sourced findings:

    1. The Signal client is not allowlisted for us yet. forge-ci/ci.yml governs which pool-select commits a repo may pin in ci_lint/data/forge_quick_allowlist.toml. At main, that list ends at 52f6ada3ed (PR #569, "allow a reserved Dell listener time to come online"). c38a3b1f — the commit that adds the Signal route/lease client — has no allowlist entry, and the same tree's actions/pool-select/README.md now calls source: route (POST /v2/route, job's GitHub OIDC identity) the current mechanism and source: lease the legacy one. So the migration the issue names needs an upstream allowlist entry first; a FastLED lane pinning it today would be a fleet-policy violation, not a routing fix.

    2. The lease/route payload explains the ledger's no_free_slot. In select_pool.py, reserve_runner() posts labels = the configured pool labels minus self-hosted/forge-pool. With FORGE_POOL_LABELS=["self-hosted","forge-pool","ubuntu-2404"] that is exactly ["ubuntu-2404"], and no runner anywhere advertises that label (the Dells report linux, x64, forge-pool, forge-dispatch, nixos-host, self-hosted, <hostname>; they never reported ubuntu-2404). So the no_free_slot decisions in the ledger are at least partly our label, not capacity: at 20:06Z signal showed two dispatcher hosts at spare=24 each and linux-x64-large slots_online=23, granted=0, claimed=0.

    3. Still zero Dell runners in the FastLED org (re-checked 20:06Z): orgs/FastLED/actions/runners = 4, all forge-quick; group Dell-NixOS = 0; ?org=FastLED still reports dispatcher: null while the same two hosts serve ?org=forge-ci. Both the label path (stages 1-3) and any org-scoped signal answer remain dead until that registration exists.

    Shipped this tick (#2214 stage 4, the in-repo half): PR #2222 — ci/test_pool_selector.py now walks every workflow and asserts every pool-select@<ref> use is a full 40-hex sha and identical across all 11 lanes. A per-file bump leaves some lanes on an older client, and that is invisible in CI because an older client also answers hosted. This is stage 4 in the only form that does not guess: it makes the eventual route/lease migration one atomic pin change. Evidence: RED twice (one lane at a foreign sha -> 'a36bc81a…' != '52f6ada3…'; one lane at @v1 -> '^[0-9a-f]{40}$' not found in 'v1'), module 8/8, full drift suite 701/701, types 0, ruff clean, render --check 0.

    What only an owner can do (pick either):

    • (a) label path — re-register dell-jw22zc3 and dell-fsx3mn2 into FastLED's Dell-NixOS group with their real label set, and tell me whether ubuntu-2404 is the intended image label or should be replaced in FORGE_POOL_LABELS (I will not guess a label: with no Dell in the org, every candidate still reads online=0, so a wrong value is indistinguishable from today's).
    • (b) route/lease path — allowlist the Signal client commit in forge-ci/ci.yml, grant the selector jobs id-token: write, and confirm the ledger label set; then it is one PR from me (single-pin guard already landed, so it is one SHA edit plus source: route + lease-class: linux-x64-large in the 11 lanes).

    I am recording this issue as blocked on those owner actions rather than re-reporting it every hour; any edit to this issue re-opens it, and I re-verify on the next runner-inventory change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions