Repository navigation
ci: run the guest and sandbox steps beside the default microVM suite - #706
Open
Pedro Henrique Penna (ppenna) wants to merge 1 commit into
Open
Pedro Henrique Penna (ppenna) wants to merge 1 commit into
Pedro Henrique Penna (ppenna) wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
No concrete defects were identified, but cross-backend execution and runner contention still need CI validation and human confirmation.
No open issues 🎉
What changed in this PR
Splits guest and sandbox tests from the default microVM suite to reduce CI turnaround while preserving coverage across KVM, MSHV, and WHP.
Changes:
- Adds parallel guest-and-sandbox jobs with distinct failure-log artifacts.
- Integrates both job groups into required-status, release, and performance-persistence gates.
- Adds regression checks and documents runner-capacity implications.
| File | Description |
|---|---|
scripts/test_nvx_tools.py |
Checks step selection, job parity, artifact names, and gate wiring. |
scripts/nvx_tools/ci.py |
Adds guest jobs to required-result policy. |
doc/ci.md |
Documents parallel jobs, artifacts, gates, and runner usage. |
.github/workflows/run-nvx-microvm-tests.yml |
Selects suite or guest steps and separates artifact names. |
.github/workflows/ci.yml |
Adds three parallel jobs and downstream gate dependencies. |
Review effort: Balanced
5 tasks
Pedro Henrique Penna (ppenna)
force-pushed
the
agents/split-microvm-guest-steps
branch
from
October 21, 2026 15:06
376f569 to
289be9c
Compare
This was referenced Oct 21, 2026
Pedro Henrique Penna (ppenna)
force-pushed
the
agents/split-microvm-guest-steps
branch
from
October 22, 2026 11:37
289be9c to
0ba6caf
Compare
Pedro Henrique Penna (ppenna)
force-pushed
the
agents/split-microvm-guest-steps
branch
from
October 22, 2026 12:35
0ba6caf to
20d0cb0
Compare
Each backend ran its NVX microVM tests in one job: the setup, the
default Alpine suite, and then the public managed sandbox acceptance,
the Ubuntu and Azure Linux guest smoke tests, the extended Ubuntu tests
on KVM, the Ubuntu sandbox steps, the aci_edge_sandboxes lifecycle, and
the runtime adapter scenarios. None of the later steps needs a result of
the suite, yet each waited for it. In reference run 39585909588, the WHP
job took 15.1 minutes, of which the suite took 10.1 and the later steps
4.2, and the WHP microVM job bounds every run that skips both OpenVMM
suites.
A new boolean input of run-nvx-microvm-tests.yml, guests-and-sandboxes,
selects the later steps instead of the suite, and ci.yml calls the
workflow a second time per backend with it, as the
nvx-microvm-guests-{kvm,mshv,whp} jobs. Each runs on its backend's
general runner pool beside the suite, downloads the same OpenVMM and
nvx-rs builds, and validates its runner the same way. The suite steps
skip when the input is set, and every later step requires it besides
the !inputs.debug-kernel guard that keeps it out of the debug-kernel
jobs, which never set the input and run as before.
Only the later steps read the Ubuntu initramfs, distro layer, and
scratch template and the Azure Linux initramfs, so only the new jobs
download those artifacts and wait for distro-artifacts. The default
suite jobs now download only the kernel and the Alpine initramfs and
wait only for artifacts, so a cold build of the distro images no longer
delays them. Apart from that dependency, each new job copies the
condition of its backend's default job, including the run-microvm-tests
selection, so fork, draft, path-filter, cancellation, and rerun
behavior is unchanged, and a failed part reruns alone. Top-level jobs,
rather than two jobs inside the reusable workflow, give each part a
result of its own, and one job definition keeps the setup steps in one
place.
The required status check, the development release, and performance
persistence require the new jobs as they require the default ones:
check-required-ci expects each to succeed when the change schedules the
microVM tests and to be skipped otherwise, and the release and
persistence conditions accept only a success or a skip. A second
upload of an artifact name in a run fails, so the new jobs upload their
failure logs as nvx-microvm-tests-<backend>-guests, and their scenario
duration reports under names that end their kernel part with -guests.
A new test evaluates every step condition for each backend. It checks
that both jobs take the same builds and validate the runner the same
way, that every other step of the former single job runs in exactly
one of them, that the default suite downloads only the kernel and the
Alpine initramfs and the guest and sandbox job every guest artifact
that the single job downloaded, that the extended Ubuntu tests stay on
KVM, that the debug-kernel jobs select the same steps as before, and
that each upload gets a distinct artifact name in every job, which the
scenario duration test checks for each job and attempt too. It also
checks that each guest and sandbox job equals its backend's suite job
apart from its name, the input, and its wait for distro-artifacts. The
existing tests cover the new jobs through REQUIRED_CI_MICROVM_TEST_JOBS,
including the mapping of each step to the guest artifacts that it
reads, the change detector's job selection, and the suite input drift
guard. The required status test now also checks that each job that it
checks is in its needs and reaches it as that job's result. doc/ci.md
describes the jobs, their artifacts, and the general runners that they
hold.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pedro Henrique Penna (ppenna)
force-pushed
the
agents/split-microvm-guest-steps
branch
from
October 22, 2026 13:18
20d0cb0 to
be3a265
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #695.
Part of #430.
Summary
Each backend's NVX microVM tests ran in one job: the default Alpine suite, then the guest smoke and sandbox steps, none of which needs a result of the suite. This PR runs those steps in a second job per backend, beside the suite, on the same runner pool and with the same OpenVMM and
nvx-rsbuilds. Only the new jobs read the Ubuntu and Azure Linux artifacts, so only they download them and wait fordistro-artifacts; the default suites wait only for the kernel and Alpine artifacts. The required status check, the development release, and performance persistence require both jobs. Every step still runs exactly once per backend, and the debug-kernel jobs are unchanged.Why
The WHP microVM job bounds every run that skips both OpenVMM suites (CI: maximize workflow parallelism and reduce turnaround time #430). In reference run 39585909588, it took 15.1 min, of which the default suite took 10.1 min and the guest and sandbox steps 4.2 min:
Over the 41 successful first-attempt runs with microVM jobs from 2026-10-20 21:05 to 2026-10-21 13:24 UTC, the WHP job took a median of 15.1 min (p10 14.3, p90 16.1), after a median queue of 0.1 min (max 8.4), and finished a median of 20.4 min after its run started. KVM took a median of 11.3 min and MSHV 9.8 min.
Changes
run-nvx-microvm-tests.yml: a new boolean input,guests-and-sandboxes, selects the steps that follow the default suite instead of the suite: the public managed sandbox acceptance, the Ubuntu and Azure Linux guest smoke tests, the extended Ubuntu tests (KVM only), the Ubuntu sandbox steps, theaci_edge_sandboxeslifecycle, and the runtime adapter scenarios. Each later step keeps its!inputs.debug-kernelguard. The downloads ofguest-ubuntu,guest-ubuntu-distro,guest-ubuntu-scratch, andguest-azurelinuxnow also require the input, so the default suite downloads onlyguest-kernelandguest-alpine, which every job's runner validation reads. A second upload of an artifact name in a run fails, so the new job uploads its failure logs asnvx-microvm-tests-<backend>-guestsand, since microvm tests: record each scenario's duration in a JSON Lines report #707, its scenario duration reports asnvx-microvm-durations-<os>-<backend>-default-guests-<run-id>-<run-attempt>, beside the default suite's...-default-<run-id>-<run-attempt>.ci.yml:nvx-microvm-guests-{kvm,mshv,whp}(NVX microVM tests / <platform> / Guests and sandboxes), with theneeds, condition,run-microvm-testsselection, runner labels, OpenVMM andnvx-rsartifacts, and secret of the default job before this change;nvx-microvm-tests-*jobs no longer wait fordistro-artifacts, so a cold build of the Ubuntu or Azure Linux images, about 4 min, no longer delays them;release,required-status-check, andperformance-persistlist the new jobs inneeds, and release and persistence accept onlysuccessorskippedfrom them, as from the default jobs.check-required-ci(scripts/nvx_tools/ci.py): the new jobs joinREQUIRED_CI_MICROVM_TEST_JOBSandREQUIRED_CI_RESULT_ENVIRONMENTS, so the required status check expects each to succeed when the change selects the microVM tests and to be skipped otherwise, and fails on any other result.doc/ci.md: describes the two jobs, the guest artifacts that each takes, their failure-log artifacts, the gates, and the general runners that they hold.Fork, draft, path-filter, and cancellation behavior is unchanged, because the new jobs copy the conditions of the default ones. A failed part now reruns alone.
Design notes:
debug-kernel, keeps the setup steps in one place and limits the diff to per-step conditions.Tests
test_ci_runs_the_steps_after_the_default_microvm_suite_beside_itevaluates every step condition for each backend and checks that:guest-kernelandguest-alpine, and the guest and sandbox job downloads every guest artifact that the single job did;distro-artifacts.test_every_microvm_job_uploads_its_scenario_durations(microvm tests: record each scenario's duration in a JSON Lines report #707) now derives the-guestspart of each job's report name and checks that the default suite and the guest and sandbox job of a backend upload separate reports in each attempt.test_required_ci_job_uses_tested_policynow also checks that each job that the policy checks is inneedsand reaches it as that job's result.REQUIRED_CI_MICROVM_TEST_JOBS, the existing tests cover the new jobs: ci: build the guest-artifact components in parallel and download only what each job uses #711's mapping of each step to the guest artifacts that it reads, which fails when a job lacks a component, downloads an extra one, or waits for the wrong producer; ci: classify microVM tests, benchmarks, and artifact builds separately #712's change-detector job selection and suite-input drift guard; the required-results policy; and the repository, CLI, andnvx-rshandoff tests.distro-artifactsonly for the guest and sandbox and platform jobs.Validation
206abd182(after ci: build the Linux OpenVMM VMM tests once for the KVM and MSHV jobs #708):scripts/test_nvx_tools.pyandscripts/test_microvm_tests.pypass (730 tests), including ci: build the guest-artifact components in parallel and download only what each job uses #711's step-to-component test with ci: build the Linux OpenVMM VMM tests once for the KVM and MSHV jobs #708's VMM-test jobs and this PR's jobs. On an earlier base, onetest_microvm_tests.pynetwork-script subtest errored once while pyright ran beside it, and passed alone and in a rerun of the module;ruff check,ruff format --check,pyrightfor Linux and Windows,check_markdown_links.py, andgit diff --check.ci.ymlandrun-nvx-microvm-tests.yml: the only finding is the known false positive onconcurrency.queuefrom ci: queue the dev push runs instead of cancelling the waiting one #734. It rejects a misspelledguests-and-sandboxesinput.distro-artifacts, a guest and sandbox job that misses the Azure Linux download,distro-artifactsin itsneeds, or its success in its condition, one that followsrun-benchmarks, a later step without the selector, a failure-log or scenario-duration artifact name without the suffix, and a guest and sandbox job missing from performance persistence.Expected effect
devpushes and full runs MSHV's too; WHP uses at most five of its eight. Since ci: run the Linux OpenVMM unit tests on a GitHub-hosted runner #717 moved the Linux OpenVMM unit tests off MSHV, a pull request leaves one MSHV general runner free.Results from this PR's CI
Queue plus duration of each microVM job, and the lane of each backend, from the creation of its microVM jobs to the completion of the later one:
In the first run, only one general WHP runner was free, so the two WHP jobs ran one after the other. In the second, about ten other CI runs queued at once: the KVM guest and sandbox job waited 72.5 min, and the KVM debug-kernel job, which this change doesn't touch, 83.4 min. In the third, the KVM pool's four general runners served three other runs' VMM tests and microVM jobs, so the KVM
OpenVMM binary / Linux GNUproducer, which both KVM microVM jobs wait for, queued 17.7 min, and the KVM jobs hadn't finished when the #707 rebase superseded the run. In the fourth, each backend's two jobs started within seconds of each other, the KVM pair after waiting 3.7 to 3.9 min for runners. Compared with the single job ofdevrun 39768324116, the two jobs of each backend ran every one of itsRunsteps exactly once: KVM 1 + 12 of 13, MSHV 1 + 11 of 12, and WHP 1 + 10 of 11. The default suites downloaded only the kernel and Alpine artifacts, and the seven microVM jobs uploaded seven distinctly named duration reports. The measurements on #695 give the details and the queue time that the extra job adds.Sibling pull requests
run-microvm-tests; the default suites take only the kernel and Alpine artifacts; the scenario duration reports of the two jobs of a backend have separate names; the required-results policy, the gates, anddoc/ci.mdkeep ci: build the Linux OpenVMM VMM tests once for the KVM and MSHV jobs #708'sbuild-openvmm-vmm-tests-linuxandopenvmm-vmm-tests-{linux,windows}beside the new jobs; and the documentation counts the Linux OpenVMM unit tests off MSHV and the Linux VMM-test build on KVM.Post-merge verification