Skip to content

feat(test-guest): build cacheable QEMU images with Bazel - #2693

Open
drew wants to merge 5 commits into
mainfrom
codex/bazel-test-guest
Open

feat(test-guest): build cacheable QEMU images with Bazel#2693
drew wants to merge 5 commits into
mainfrom
codex/bazel-test-guest

Conversation

@drew

@drew drew commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

Make Bazel the build, cache, run, and test entrypoint for disposable QEMU test guests. Nix remains a narrow provider of pinned host tools, while prepared QCOW2 images and deterministic metadata become normal Bazel outputs eligible for local and remote caching.

Related Issue

Changes

  • Add reusable Bzlmod-native test-guest providers, rules, scripts, and host-toolchain wiring under bzl/test-guest
  • Keep pinned cloud-image repositories, distro configuration, prepared-image targets, runners, and tests under e2e/test-guest
  • Build flattened, sealed, fresh-boot-validated QCOW2 images as declared Bazel outputs
  • Consume prepared images from bazel run and bazel test targets using disposable writable overlays
  • Accept installable packages and copied guest files as Bazel labels, build them automatically, and transport them through runfiles instead of public host-path flags
  • Use a pinned Nix closure only for QEMU, OVMF, Ansible, SSH, and supporting host tools
  • Remove the legacy local/OCI image cache, dynamic Nix distro catalog, flake apps, mise task, and standalone E2E dispatcher
  • Document the Bazel cache model, reproducibility boundary, supported variants, artifact interface, and modern Bazel contribution guidance

Testing

  • mise run pre-commit passes
  • mise run test passes
  • bazel test //e2e/test-guest:fedora_podman_smoke passes from a cold image build and runs the architecture-matched Bazel-built OpenShell binary in the guest
  • Immediate repeat of the Bazel smoke test is served from cache with zero test executions
  • Bzlmod lock refresh, Buildifier, Nix expression/flake evaluation, shell syntax, launcher, metadata, and action-graph checks pass

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)

drew added 3 commits August 10, 2026 17:12
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
drew added 2 commits August 10, 2026 20:18
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
Signed-off-by: Drew Newberry <anewberry@nvidia.com>
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