Skip to content

[NO-JIRA] Add devbox-em-ci-3, a control-only CI runner - #1065

Merged
johnnymo87 merged 1 commit into
mainfrom
em-ci-control-runner
Dec 2, 2026
Merged

johnnymo87 merged 1 commit into
mainfrom
em-ci-control-runner

Conversation

@johnnymo87

Copy link
Copy Markdown
Owner

Description

  • Adds devbox-em-ci-3, a third devbox runner container that registers with the em-ci-control label only (2 CPUs, 2G). eternal-machinery's ci.yml runs its control jobs (Detect changes, Docs guard, CI Passed) on that label. In overflow the failover reconciler also gives devbox-em-ci-1/2 em-ci-light, so they spend most of their time on 12-minute Linters runs and control jobs queue 15-25 minutes.
  • modules/em-ci-runners.nix: optional per-runner extraLabels, cpus, memoryMax, defaulting to today's values. gamebox and devbox em-ci-1/2 evaluate identically (compared unit and runner config before/after).
  • em-ci-failover: new EM_CI_CONTROL_ONLY_RUNNERS (derived from the runners whose labels are exactly em-ci-control). Those runners get the control label in every mode, never em-ci or em-ci-light (stripped if one appears), and control is never removed. TimeoutStartSec 16 -> 20 min for the extra writes. 21 new assertions (65 -> 86) over normal, overflow and failover.
  • em-ci-monitor: checks em-ci-3's runner and container; 7 new assertions (10 -> 17), including that an idle control-only runner is not counted as em-ci capacity.
  • Docs guard needs a full-history checkout and python3 (no devenv shell), hence the small cap.

Switch impact (not switched; devbox is NOT deployed by this PR)

Built the devbox toplevel without switching and diffed units against /run/current-system:

  • New: container@em-ci-3 (started via machines.target), ve-em-ci-3 NAT rules (the firewall unit has X-ReloadIfChanged, so a reload, not a restart).
  • Changed, but oneshot or timer-run and not restarted by a switch: em-ci-failover, em-ci-monitor, em-ci-monitor-dry-run, em-ci-disk-watchdog (now also stops container@em-ci-3).
  • Unchanged: container@em-ci-1, container@em-ci-2, the egress fence, goose-serve, honkd, cfp.
  • First boot needs no manual step: the module bind-mounts the same sops PAT, creates /var/lib/em-ci/{work,cache} by tmpfiles, and the first registration attempt fails with no network and is retried by Restart=on-failure after 60 s.

References

  • eternal-machinery bead bq50q; eternal-machinery .github/workflows/ci.yml (runs-on: [self-hosted, em-ci-control])

eternal-machinery's ci.yml runs its tiny control jobs (Detect changes, Docs
guard, CI Passed) on [self-hosted, em-ci-control]. In overflow the failover
reconciler also gives devbox-em-ci-1/2 em-ci-light, so they spend most of
their time on 12-minute Linters runs and control jobs queue 15-25 minutes.

devbox-em-ci-3 registers with em-ci-control only, 2 CPUs and 2G.

- modules/em-ci-runners.nix: optional per-runner extraLabels, cpus and
  memoryMax, defaulting to today's values (gamebox and em-ci-1/2 evaluate
  identically).
- hosts/devbox/em-ci.nix: em-ci-3 on 10.233.71.9/.10.
- em-ci-failover: EM_CI_CONTROL_ONLY_RUNNERS (derived from the runners'
  labels). They get the control label in every mode, never em-ci or
  em-ci-light (stripped if they appear), and control is never removed.
  21 new assertions across normal, overflow and failover.
- em-ci-monitor: watches em-ci-3's runner and container (derived from the
  runner set); 7 new assertions, including that an idle control-only runner
  does not count as em-ci capacity.
- em-ci-failover TimeoutStartSec 16 -> 20 min for the extra writes.
@johnnymo87
johnnymo87 merged commit 6f155ba into main Dec 2, 2026
2 checks passed
@johnnymo87
johnnymo87 deleted the em-ci-control-runner branch December 2, 2026 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant