Use alpine instead of debian for registry push/pull test payloads - #41338
Draft
ggarzia-MSFT wants to merge 1 commit into
Draft
Use alpine instead of debian for registry push/pull test payloads#41338ggarzia-MSFT wants to merge 1 commit into
ggarzia-MSFT wants to merge 1 commit into
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates WSLC end-to-end tests that use a “push to local registry” flow purely as an opaque transfer payload, switching the payload image from debian:latest to smaller alpine:latest to reduce test suite runtime without changing product code paths.
Changes:
- Switch registry push/pull payload image in
WSLCE2EPushPullTestsandWSLCE2ERegistryTestsfromDebianTestImage()/debian:latesttoAlpineTestImage(). - Update
WSLCE2E_Image_Build_Pull_Successto ensureAlpineTestImage()is loaded and use it for the registry-tagged base image.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/windows/wslc/e2e/WSLCE2ERegistryTests.cpp | Uses AlpineTestImage() as the registry push/pull payload in the auth-flow test and removes hardcoded debian:latest literals. |
| test/windows/wslc/e2e/WSLCE2EPushPullTests.cpp | Uses AlpineTestImage() as the payload for push/pull and quiet-pull tests against a local registry. |
| test/windows/wslc/e2e/WSLCE2EImageBuildTests.cpp | Loads and tags AlpineTestImage() for the local registry backing the --pull re-resolve test. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Summary of the Pull Request
Four WSLC E2E tests push an image to a local registry purely as transfer payload. They used
debian:latest(~118 MB) where a much smaller image exercises the identical code path. This switches them toalpine:latest(~8.3 MB).Measured effect on the full WSLC suite: 22.25 min → 21.11 min, with identical pass/fail results.
WSLCE2E_Image_PushPullWSLCE2EPushPullTests.cppWSLCE2E_Image_Pull_QuietOptionWSLCE2EPushPullTests.cppWSLCE2E_Registry_LoginLogout_PushPull_AuthFlowWSLCE2ERegistryTests.cppWSLCE2E_Image_Build_Pull_SuccessWSLCE2EImageBuildTests.cppTest-only change; no product code is touched.
PR Checklist
Detailed Description of the Pull Request / Additional comments
Why
Measured against a local registry, recreating the registry container per iteration so blob deduplication does not mask the real cost:
Four cold pushes × (5.73 − 0.58) ≈ ~21s.
All of the saving is on the push side. Pulls are already nearly free because the tests delete only the registry-tagged copy — the source image's blobs remain local, so the pull is just a manifest fetch.
Why alpine is safe here
None of the four tests launch a container from the pushed image, so the payload is opaque and the distro is irrelevant. The only one that executes anything (
Build_Pull_Success) runsCMD ["echo", "pull-ok"], which BusyBox provides.There is existing precedent:
WSLCE2ETlsRegistryTests.cpp:206already usesAlpineTestImage()for this exact tag→push pattern. The debian usage in these four tests traces back to the original WSLC commit (358ab87d) and looks like pattern propagation rather than a deliberate requirement.Notes
L"debian:latest"literals in the registry auth flow are replaced with thetestImage.NameAndTag()helper, matching the surrounding style.WSLCE2EImageBuildTestsonly loaded debian inTEST_CLASS_SETUP(still required by the other ~46 build tests), so the modified test adds its ownEnsureImageIsLoaded(AlpineTestImage()).WSLCTests.cpp'sPullImageAdvancedis deliberately left on debian — it retains intentional large-payload round-trip coverage.Validation Steps Performed
Full WSLC suite (
test.bat /select:@TestCategory='WSLC') run before and after, from the same base commit, against the same product build, on the same machine:Total=1322, Passed=1320, Failed=0, Skipped=2Total=1322, Passed=1320, Failed=0, Skipped=2All four modified tests pass, verified individually in the log.
Caveat on the magnitude: the isolated push measurements above only account for ~21s of the observed 68.8s. With n=1 per configuration on a ~22 minute workload, the remainder cannot be separated from run-to-run variance, so ~21s is the defensible figure and the 68.8s should not be read as reproducible.