Skip to content

ci(hw): gate the nightly hardware matrix on an enabled runner farm - #1957

Merged
zackees merged 1 commit into
mainfrom
agent/hw-ci-dormancy-gate
Nov 8, 2026
Merged

zackees merged 1 commit into
mainfrom
agent/hw-ci-dormancy-gate

Conversation

@zackees

@zackees zackees commented Nov 8, 2026

Copy link
Copy Markdown
Member

Problem

hw-ci.yml has been doing nothing but burning five queue slots every night.

gh api repos/FastLED/fbuild/actions/runners reports total_count: 0 — no
self-hosted runner carries the self-hosted/hw-ci labels. A job whose
runs-on names an unregistered runner is not skipped: it stays queued until
GitHub cancels it ~24 h later. The evidence:

date (scheduled 02:30Z) result
2026-11-03 cancelled
2026-11-04 cancelled
2026-11-05 cancelled
2026-11-06 cancelled
2026-11-07 cancelled
2026-11-08 (42439124994) still queued, 5 h in

Five matrix legs per night, zero steps ever executed.

The workflow header claimed the opposite ("Until that runner exists, the job
skips silently (the if: guard on each step ...)"). A step-level guard cannot
do that: a job that was never scheduled never reaches its steps. The dormancy
decision has to be made before scheduling.

Change

  • bringup now additionally requires vars.HW_CI_ENABLED == 'true', so with no
    farm the matrix is never scheduled and nothing queues.
  • A dormant job on a hosted runner (schedule only, 2 min timeout) posts the
    reason as a ::notice:: plus the enabling command, so the nightly run stays
    green and self-explaining instead of silently doing nothing.
  • agents/docs/hardware-ci-setup.md gains a "Dormant by default" section and
    the gate is folded into step 6 (enable, then dispatch).

Enabling is one command once the farm exists — no workflow edit, no second PR:

gh variable set HW_CI_ENABLED --body true -R FastLED/fbuild

No product code is touched; the matrix, fingerprints, known-good firmware and
failure-reporting path are unchanged.

Verification

  • Dispatched this branch (workflow_dispatch, run
    42460037917):
    completed/skipped in 2 seconds, dormant :: skipped,
    bringup :: skipped — no queue, no 24 h wait. The same dispatch on main
    (42439124994) is still queued after 5 h.
  • python ci/check_workflow_concurrency.py → OK (rc 0).
  • python -m unittest ci.test_fractional_workflows ci.test_gate_jobs ci.test_local_gate → 43 tests OK.
  • python ci/render_workflows.py --check → rc 0 (no rendered build-*.yml drift).
  • YAML re-parsed; both job if: expressions resolved as intended.

Not done here

  • Did not register a runner or set HW_CI_ENABLED — both are owner infra
    decisions, and the variable must stay unset until a farm exists.
  • Cancelled only tonight's stuck run (42439124994); historical cancelled runs
    are left as-is for the record.

With no self-hosted runner carrying the `hw-ci` label (the repo currently
reports zero registered runners), `runs-on: [self-hosted, hw-ci]` does not
skip: GitHub holds every matrix leg QUEUED until it cancels the job 24 h
later. The nightly 02:30Z schedule has therefore ended as a cancelled run
with five dead queue slots every night since 2026-11-03 while never
executing a single step -- and the workflow header claimed the opposite
("the job skips silently") because a step-level guard cannot run in a job
that was never scheduled.

Move the decision ahead of scheduling:

- `bringup` additionally requires `vars.HW_CI_ENABLED == 'true'`;
- a `dormant` job on a hosted runner posts the reason as a notice so the
  nightly run stays green and self-explaining;
- the setup doc gains the enable/disable commands.

Enabling is one command (`gh variable set HW_CI_ENABLED --body true`) and
is the only step needed once the runner farm from
agents/docs/hardware-ci-setup.md is registered.
@coderabbitai

coderabbitai Bot commented Nov 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@zackees
zackees added this pull request to the merge queue Nov 8, 2026
Merged via the queue into main with commit 36cc4a5 Nov 8, 2026
31 checks passed
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Nov 9, 2026
@zackees
zackees deleted the agent/hw-ci-dormancy-gate branch November 24, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant