Skip to content

ci: migrate Rust + KVM sandbox lanes to self-hosted GCP KVM runner#576

Open
suchapalaver wants to merge 1 commit into
mainfrom
ci/gcp-kvm-runner
Open

ci: migrate Rust + KVM sandbox lanes to self-hosted GCP KVM runner#576
suchapalaver wants to merge 1 commit into
mainfrom
ci/gcp-kvm-runner

Conversation

@suchapalaver

Copy link
Copy Markdown
Contributor

Summary

Migrates the Rust CI and KVM sandbox-E2E lanes from arc-runner-set / kvm-enabled to a self-hosted GCP KVM runner (kvm-gcp) that auto-stops when idle, plus a reusable start-kvm-runner.yml that wakes the GCE instance via Workload Identity Federation before dependent jobs run.

Supersedes #560 — same migration, rebased onto current main with the review findings resolved.

What changed

  • rust-ci.ymlchanges, doctor, nextest, sandbox-adapter, sandbox-adapter-image, sandbox-adapter-image-handoff move to runs-on: kvm-gcp. A new start-runner job (reusable workflow) gates the lot transitively (start-runner → changes → rest).
  • sandbox-e2e-kvm.ymlprepare-fixture and kvm-e2e move from kvm-enabled to kvm-gcp, gated on the same start-runner.
  • start-kvm-runner.yml (new) — reusable WIF-authenticated wake workflow. Idempotent start (describes status first), serialised by a concurrency group so concurrent runs don't race the gcloud start API.

Review findings resolved (from #560)

  • 🔴 on.push.branches stays [main] — the test-scaffolding flip to the feature branch is gone, so post-merge push CI on main keeps firing.
  • 🟠 workflow_dispatch sleep operandwait_seconds is now declared on both workflow_call and workflow_dispatch, with a sleep "${{ inputs.wait_seconds || 60 }}" shell default as a belt-and-suspenders guard.
  • 🟠 Self-hosted runner fork-PR exposure — documented the two required controls (GitHub fork-approval setting + WIF attribute condition pinning repository / refusing fork subjects) in the workflow header, since both live outside this file.
  • 🟢 Warm-box sleep — the 60s register wait now runs only when the start step actually cold-booted the instance (started=true output), so warm runs don't burn it.

Scope note

claude-md-sync.yml and k8s-pilot-validation.yml still reference arc-runner-set — intentional partial migration, that runner-set is retained.

Merge readiness

  • rust-ci.yml is fully exercised by this PR: editing .github/workflows/rust-ci.yml trips the sandbox paths-filter, so the sandbox-adapter jobs run on kvm-gcp too.
  • ⚠️ sandbox-e2e-kvm.yml triggers on workflow_dispatch + weekly schedule only — not on pull_request. Manually dispatch it on this branch to validate its kvm-gcp migration before merge.
  • ⚠️ The fork-PR controls above are not testable by same-repo CI — verify them manually.

Move the rust-ci.yml jobs (changes, doctor, nextest, sandbox-adapter,
sandbox-adapter-image, sandbox-adapter-image-handoff) and the
sandbox-e2e-kvm.yml jobs from arc-runner-set / kvm-enabled to a
self-hosted GCP KVM runner (kvm-gcp) that auto-stops when idle.

Add a reusable start-kvm-runner.yml that wakes the GCE instance via
Workload Identity Federation before dependent jobs run. Every kvm-gcp
job gates on it transitively (start-runner -> changes -> rest). The
start step is idempotent (describes status first) and serialised by a
concurrency group so two runs don't race the gcloud start API.

The wake path only waits for runner re-registration when it actually
cold-booted the box, so warm runs don't burn the 60s sleep, and the
sleep operand stays valid on the workflow_dispatch path.

Install libdbus-1-dev (fnox -> keyring -> dbus-secret-service) and
libcap-ng-dev (microsandbox) explicitly in every Rust-build apt step.
The previous arc-runner-set / kvm-enabled images carried these; the
bare GCE box does not, and a repo-scoped target/ cache had been masking
the gap. Without them libdbus-sys' build script aborts ("dbus-1.pc
needs to be installed") on a cold cache.

claude-md-sync.yml and k8s-pilot-validation.yml still use
arc-runner-set, so that runner-set is intentionally retained.

on.push.branches stays [main]: the pull_request trigger already
exercises the full suite on kvm-gcp for this PR, so the runner is
validated without leaving main's push CI dead after merge.
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