Skip to content

Use alpine instead of debian for registry push/pull test payloads - #41338

Draft
ggarzia-MSFT wants to merge 1 commit into
masterfrom
user/ggarzia/alpine-registry-test-payloads
Draft

Use alpine instead of debian for registry push/pull test payloads#41338
ggarzia-MSFT wants to merge 1 commit into
masterfrom
user/ggarzia/alpine-registry-test-payloads

Conversation

@ggarzia-MSFT

Copy link
Copy Markdown
Contributor

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 to alpine:latest (~8.3 MB).

Measured effect on the full WSLC suite: 22.25 min → 21.11 min, with identical pass/fail results.

Test File
WSLCE2E_Image_PushPull WSLCE2EPushPullTests.cpp
WSLCE2E_Image_Pull_QuietOption WSLCE2EPushPullTests.cpp
WSLCE2E_Registry_LoginLogout_PushPull_AuthFlow WSLCE2ERegistryTests.cpp
WSLCE2E_Image_Build_Pull_Success WSLCE2EImageBuildTests.cpp

Test-only change; no product code is touched.

PR Checklist

  • Closes: Link to issue #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated if needed and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated if needed
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

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:

Operation debian alpine
Cold push 5.73s (5.76 / 5.71 / 5.70) 0.58s
Pull ~0.15s ~0.15s

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) runs CMD ["echo", "pull-ok"], which BusyBox provides.

There is existing precedent: WSLCE2ETlsRegistryTests.cpp:206 already uses AlpineTestImage() 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

  • Two hardcoded L"debian:latest" literals in the registry auth flow are replaced with the testImage.NameAndTag() helper, matching the surrounding style.
  • WSLCE2EImageBuildTests only loaded debian in TEST_CLASS_SETUP (still required by the other ~46 build tests), so the modified test adds its own EnsureImageIsLoaded(AlpineTestImage()).
  • WSLCTests.cpp's PullImageAdvanced is 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:

Run Payload Wall clock Result
Before (master) debian ~118 MB 22.25 min (1335.1s) Total=1322, Passed=1320, Failed=0, Skipped=2
After (this branch) alpine ~8.3 MB 21.11 min (1266.3s) Total=1322, Passed=1320, Failed=0, Skipped=2
Delta −68.8s (−5.2%) identical

All 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.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 12, 2026 23:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 WSLCE2EPushPullTests and WSLCE2ERegistryTests from DebianTestImage() / debian:latest to AlpineTestImage().
  • Update WSLCE2E_Image_Build_Pull_Success to ensure AlpineTestImage() 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants