test(e2e): pull container images on-demand for filtered test runs - #1041
Open
Nachiket-Roy wants to merge 1 commit into
Open
Nachiket-Roy wants to merge 1 commit into
Nachiket-Roy wants to merge 1 commit into
Conversation
The end-to-end test suite previously pulled all declared container images in BeforeAll regardless of test filters. When executing a filtered subset of tests (such as make test_nerdctl_Spt or ARM64 CI/CD jobs), this incurred substantial network latency, bandwidth usage, and pull flakiness. Transition to on-demand image pulling by verifying and pulling container images only when a spec is executed: - Implement ensureImage using singleflight to eliminate race conditions. - Implement imageExists via quiet listing queries (<tool> images -q) to detect pre-existing host images without version-sensitive stderr scraping. - Preserve pre-existing host images so only images downloaded during the run are removed on cleanup, and add URUNC_E2E_KEEP_IMAGES support. - Split cross-process file locking into containerd-k8s.io and docker domains to avoid unnecessary serialization. - Add Ginkgo Serial decorator to all tool suites and enforce fail-fast image checks before allocating pod or container resources. Fixes urunc-dev#1037 Signed-off-by: Nachiket Roy <nachiket.roy.2@gmail.com>
✅ Deploy Preview for urunc canceled.
|
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
The e2e test suite unconditionally pulled every container image declared across the entire test suite in
BeforeAll(even when filtering viamake test_nerdctl_Sptor running ARM64 CI/CD jobs). The test framework now:singleflightto eliminate TOCTOU racesRelated issues
How was this tested?
Build and Compilation
The entire codebase and e2e test harness compile cleanly without errors.
Full Unit Test Suite
All unit tests across
pkg/network,pkg/unikontainers,pkg/unikontainers/hypervisors,pkg/unikontainers/initrd,pkg/unikontainers/unikernels, andinternal/metricspassed with zero errors.Filtered Dry‑Run Verification
Output:
Only the 4 matching specs were targeted, and no unneeded images from the remaining 71 test cases were queued or pulled.
LLM usage
Gemini 3.8
Checklist
make lint).make test_ctr,make test_nerdctl,make test_docker,make test_crictl).