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
✅ Deploy Preview for urunc ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
cmainas
reviewed
Sep 18, 2026
cmainas
left a comment
Contributor
There was a problem hiding this comment.
Hello @Nachiket-Roy ,
there are multiple issues with this proposal:
- The
ToolTypereplicates theNamemethod. - The issue did not mention to retain images
- I can not really understand the purpose of the lock
- There is no reason to check if an image exists, An existing image will not get pulled again.
This implementation is unnecessary overcomplicated.
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 pulling container images only when a test spec is executed: - Implement ensureTestImages to lazily pull container images and sidecars before container or pod creation. - Track pulled images in-memory to prevent duplicate pulls within the run. - Clean up only the images pulled during the test run in DeferCleanup. Fixes urunc-dev#1037 Signed-off-by: Nachiket Roy <nachiket.roy.2@gmail.com>
Nachiket-Roy
force-pushed
the
fix/test-image
branch
from
September 18, 2026 11:06
8ccfc28 to
c4fa34e
Compare
Contributor
Author
|
Thanks for the review. I have resolved them and simplified the PR
Reverted
sure removed it
Added to be concurrent safe but that is already handled so droped
Dropped please take a look again. |
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 end-to-end test suite previously pulled all declared container images in
BeforeAllregardless of test filters. When executing a filtered subset of tests (such asmake test_nerdctl_Sptor specific CI/CD jobs), this incurred unnecessary network overhead, bandwidth usage, and pull flakiness.The test framework now:
DeferCleanuponly removes images that were actually downloaded during the test run.tool.Name()("ctr","crictl","docker","nerdctl") without introducing extra types or interface methods.Related 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).