Repository navigation
[NVX] Limit image caches to 10 GiB - #1815
Draft
Huzaifa Danish (huzaifa-d) wants to merge 3 commits into
Draft
Huzaifa Danish (huzaifa-d) wants to merge 3 commits into
Huzaifa Danish (huzaifa-d) wants to merge 3 commits into
Conversation
Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The mandatory Windows/WHP capacity scenario requires 30 GiB of free space, but nightly-pool capacity and completion of the full scheduled lane remain unverified despite a successful isolated run.
No open issues 🎉
What changed in this PR
Configures the signed NVX agent’s existing image-cache admission limit to 10 GiB per create-and-run and lifecycle state root. This addresses capacity management related to #1712, not age-based refresh, and adds no request or SDK API fields.
Changes:
- Applies the limit through shared agent setup while preserving other image settings.
- Adds functional capacity coverage and requires its discovery and completion in scheduled validation.
- Documents eviction, protected images, offline behavior, and exclusions from the limit.
| File | Description |
|---|---|
src/mxc-sdk/tests/nvx_e2e.rs |
Adds capacity, eviction, re-pull, concurrency, and lifecycle-protection scenarios. |
src/mxc-sdk/src/backends/nvx/crate_runtime.rs |
Sets the 10 GiB limit and verifies setup serialization. |
scripts/tests/microvm-validation.test.js |
Tests capacity-scenario discovery and completion enforcement. |
scripts/ci/stage-nvx-validation-tests.ps1 |
Requires discovery of the new capacity test. |
scripts/ci/run_backend_validation_tests.ps1 |
Requires the capacity scenario’s completion marker. |
docs/development/build-and-test/ci-validation-infrastructure.md |
Documents coverage and the 30 GiB free-space prerequisite. |
docs/backends/nvx/nvx.md |
Explains admission limits, eviction protections, and cache behavior. |
Review effort: Balanced
Co-authored-by: Copilot App <[email protected]>
Co-authored-by: Copilot App <[email protected]>
This branch has not been deployed
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.
📖 Description
Configure the signed NVX agent's existing admission limit to 10 GiB
(10,737,418,240 bytes) in each create-and-run and lifecycle state root. Document
capacity eviction, in-use protection, offline behavior, and the fact that this
is not an immediate trim or a total disk-usage limit. The limit does not refresh
images by age.
The maintainer accepted this operational setting without a separate spec; it
does not add a request or SDK API field.
🔗 References
Refs #1712; accepted scope.
🔍 Validation
At head
d7b4952a08bd5a9c9e33c36ec300b380c5dc0002:src:cargo fmt --all -- --check— passed.src:cargo clippy --locked -p mxc-sdk --no-default-features --features microvm --test nvx_e2e -- -D warnings— passed.node --test scripts\tests\microvm-validation.test.js— passed, 79 tests.src, withACI_EDGE_SANDBOXES_AGENT_ARTIFACTS_DIRset to the repository'ssrc\target\debug\aci-edge-sandboxesdirectory:cargo test --locked -p mxc-sdk --no-default-features --features microvm --test nvx_e2e windows_x64::signed_bundle_image_cache_capacity -- --exact --ignored --nocapture --test-threads=1— passed on Windows x64 with WHP and the signed bundle. Both roots cross the actual 10 GiB boundary and exercise largest-first eviction, re-pull, lifecycle protection, and an existing over-limit cache. The test also checks oversized local-image registration directly with the signed agent.Earlier validation at head
f77aa913a2f49523171a011d435e7ef704d6e2cf:src:cargo test --locked -p mxc-sdk --no-default-features --features microvm --test nvx_e2e windows_x64::image_cache_fixture_space_check_fails_closed -- --exact --nocapture— passed, including available-space boundary and directory-query failure checks.& '.\scripts\ci\stage-nvx-validation-tests.ps1' -BinaryDirectory '.\src\target\release' -Features microvm— passed, including signed-bundle integrity and test discovery.ACI_EDGE_SANDBOXES_AGENT_ARTIFACTS_DIRset tosrc\target\release\aci-edge-sandboxes:& '.\src\target\release\nvx-e2e-tests.exe' --exact 'windows_x64::signed_bundle_image_cache_capacity' --ignored --nocapture --test-threads=1— passed on Windows x64 with WHP and the signed bundle.Earlier validation at head
99744539d6788599255548a836e206af86bef07b:src:cargo test -p mxc-sdk --lib --features microvm agent_setup_selects_host_cpu_profile_and_platform_snapshots_fit_its_defaults— passed.src:cargo build --release -p wxc --features microvm— passed.agent_setup,cargo test -p mxc-sdk --features microvm --test nvx_e2e signed_bundle_image_cache_capacity -- --ignored --nocapture --test-threads=1— failed as expected because the old image was not evicted.Not covered: an oversized registry-reference request through an MXC public
entry point. The maintainer accepted this gap for the draft. The complete
scheduled lane was not run locally; its host must provide at least 30 GiB free
on the test-executable volume, which has not been verified for the nightly pool.
✅ Checklist
feature-acceptedCargo.lock, thedependency-feed-checkcheck passes (see pull request builds)📋 Issue Type
Microsoft Reviewers: Open in CodeFlow