Goal
Wire maintainer-gated Firecracker/KVM E2E tests into GitHub Actions using an ephemeral GCP spot N2 runner.
The workflow should:
- Start a GCP spot N2 VM with nested virtualization/KVM enabled.
- Register or expose it as a GitHub self-hosted runner for this repo.
- Run the trusted Firecracker E2E/integration test lane.
- Capture test output, reports, and useful diagnostics as GitHub Actions artifacts.
- Always shut the VM down/delete it, even when tests fail.
Context
The public repo already keeps normal PR checks on free GitHub-hosted runners and keeps KVM tests maintainer-gated. Existing docs/workflows to review first:
docs/ci-release.md
docs/kvm-integration-ci.md
.github/workflows/kvm-integration.yml
ci/start-kvm-runner.sh
ci/stop-kvm-runner.sh
ci/wait-for-runner-online.sh
Makefile targets: make integration-kvm, make test-integration, make test-integration-run TEST=...
This issue should make the runner lifecycle concrete for GCP instead of leaving it as generic start/stop hooks.
Requirements
- Use a GCP spot VM, preferably N2 family, with nested virtualization available for Firecracker.
- Keep public PR safety boundaries intact:
- Do not run KVM tests automatically on arbitrary public PR code.
- Do not use
pull_request_target to execute PR code.
- Keep PR KVM runs behind maintainer-triggered
workflow_dispatch with exact PR head SHA validation.
- Run on pushes to
main and manual dispatch for reviewed PR SHAs.
- Ensure the VM has:
- Linux x86_64
/dev/kvm
- Firecracker
- Go/Node/npm/make/git
- rootfs/kernel/runtime assets or the ability to fetch/stage them
- network tools required by the integration suite
- Prefer an ephemeral self-hosted runner registered only for this run.
- Use least-privilege GCP credentials and document required IAM roles.
- Do not print GCP service account keys, GitHub runner tokens, Cloudflare tokens, or other secrets.
- Always run cleanup:
sudo bash scripts/test-cleanup.sh where appropriate
- unregister GitHub runner
- delete/stop the GCP spot VM
Report/artifact capture
Capture enough information to debug failures without SSHing into the runner:
- Raw
go test -v -tags integration output.
- JUnit or structured test report if practical.
- Firecracker/OCM integration state summaries when failures occur.
df -h, free -h, lsblk, /dev/kvm presence, Firecracker version.
- Cleanup logs.
- GitHub Actions artifact upload for reports/logs.
Acceptance criteria
- A maintainer can trigger the workflow for a PR by entering PR number and exact SHA.
- The workflow validates the SHA matches the PR head before running code.
- A GCP spot N2 KVM runner is created for the run and becomes online with the expected labels.
make integration-kvm runs on that runner.
- Test logs/reports are uploaded as artifacts on both success and failure.
- The runner is unregistered and the GCP VM is deleted/stopped on success, failure, and cancellation.
- The workflow remains safe for public PRs and does not expose privileged secrets to untrusted jobs.
- Documentation is updated with required GitHub secrets, GCP IAM, machine type/zone settings, and manual dispatch instructions.
Open questions
- Which GCP project/region/zone should be used for the public repo runner?
- Should the VM image be built ahead of time with Firecracker/rootfs assets, or should the workflow bootstrap from a base image each run?
- Should reports be plain artifacts only, or should the workflow also publish a commit status/check summary with the failed test names?
Goal
Wire maintainer-gated Firecracker/KVM E2E tests into GitHub Actions using an ephemeral GCP spot N2 runner.
The workflow should:
Context
The public repo already keeps normal PR checks on free GitHub-hosted runners and keeps KVM tests maintainer-gated. Existing docs/workflows to review first:
docs/ci-release.mddocs/kvm-integration-ci.md.github/workflows/kvm-integration.ymlci/start-kvm-runner.shci/stop-kvm-runner.shci/wait-for-runner-online.shMakefiletargets:make integration-kvm,make test-integration,make test-integration-run TEST=...This issue should make the runner lifecycle concrete for GCP instead of leaving it as generic start/stop hooks.
Requirements
pull_request_targetto execute PR code.workflow_dispatchwith exact PR head SHA validation.mainand manual dispatch for reviewed PR SHAs./dev/kvmsudo bash scripts/test-cleanup.shwhere appropriateReport/artifact capture
Capture enough information to debug failures without SSHing into the runner:
go test -v -tags integrationoutput.df -h,free -h,lsblk,/dev/kvmpresence, Firecracker version.Acceptance criteria
make integration-kvmruns on that runner.Open questions