CLI: Add quiet support to pull and align with Docker - #41121
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Windows wslc CLIâs pull behavior to match docker pull, adding a quiet mode and standardizing the final output to always be the canonical image reference on success.
Changes:
- Added
--quiet/-qtowslc pullto suppress progress output (Docker parity). - Added client-side âUsing default tag: latestâ output for name-only references (suppressed in quiet mode).
- Implemented
GetCanonicalImageReference()and added unit + e2e coverage for canonicalization and quiet/name-only behavior.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/windows/WSLCTests.cpp | Adds unit tests for canonical image reference normalization. |
| test/windows/wslc/e2e/WSLCE2EPushPullTests.cpp | Adds e2e coverage for pull --quiet and name-only default-tag messaging. |
| test/windows/wslc/CommandLineTestCases.h | Extends parser command-line test cases to include pull --quiet / pull -q. |
| src/windows/wslc/tasks/ImageTasks.cpp | Implements quiet progress suppression, default-tag message, and canonical final-line printing in PullImage. |
| src/windows/wslc/commands/ImagePullCommand.cpp | Wires the Quiet argument into the pull command with pull-specific help text. |
| src/windows/common/wslutil.h | Declares GetCanonicalImageReference() helper. |
| src/windows/common/wslutil.cpp | Implements canonical reference formatting logic (Docker-like normalization). |
| localization/strings/en-US/Resources.resw | Adds localized strings for pull quiet help text and default-tag message. |
David Bennett (dkbennett)
marked this pull request as ready for review
July 20, 2026 21:46
Blue (OneBlue)
left a comment
Collaborator
There was a problem hiding this comment.
Change looks good, minor comments
Blue (OneBlue)
approved these changes
Jul 22, 2026
Blue (OneBlue)
left a comment
Collaborator
There was a problem hiding this comment.
Feel free to merge now and resolve the comments in a followup
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
Add a
--quiet/-qoption towslc pullwith output behavior that matchesdocker pullexactly. In quiet mode, layer/progress output is suppressed and only the final canonical image reference is printed. As part of matching Docker's client-side behavior,wslc pullnow also printsUsing default tag: latestfor name-only references and always prints the fully-qualified canonical reference as the final line.This is an entirely client-side change (no IDL/service changes); the behavior was verified line-by-line against Docker's
cli/command/image/pull.go.PR Checklist
Detailed Description of the Pull Request / Additional comments
wslc pullnow mirrors the Docker CLI'srunPullflow:--quiet/-qâ suppresses progress output by passing a null progress callback toImageService::Pull(the COMIProgressCallback*is already[in, unique]/nullable). Warnings are unaffected because the warning callback is built internally from theReporter. Help text is "Suppress verbose output", matching Docker.Using default tag: latestâ for a name-only reference (no tag or digest), the tag defaults tolatestand, unless quiet, the client reports this on stdout before contacting the registry (exactly as Docker does).docker.io/library/ubuntu:latest). Previouslywslc pulldid not print this line; this closes a Docker-parity gap.A new helper,
wsl::windows::common::wslutil::GetCanonicalImageReference, mirrors the client-side normalization ingithub.com/distribution/reference(ParseNormalizedNamedadds thedocker.iodefault domain andlibrary/prefix;TagNameOnlydefaults a name-only reference to:latest) and produces the reference string printed bydocker pull, preserving a tag and digest together when both are present.Example behavior (matches Docker):
wslc pull ubuntu:latest -qprintsdocker.io/library/ubuntu:latest(single line, no progress)wslc pull alpine:latestprints progress on stdout, thendocker.io/library/alpine:latestwslc pull ubuntuprintsUsing default tag: latestfirst, then progress + canonical referencewslc pull ubuntu:22.04@sha256:...printsdocker.io/library/ubuntu:22.04@sha256:...(both tag and digest preserved)Validation Steps Performed