[CLI] Initial support for volume prune#40737
Draft
AmelBawa-msft wants to merge 4 commits into
Draft
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds initial wslc volume prune support across the CLI stack (command wiring → task execution → service call), with new end-to-end coverage and localized help/output strings.
Changes:
- Adds the
volume prunesubcommand and wires it intowslc volumehelp/dispatch. - Implements prune execution flow (argument parsing →
VolumeService::Prune→ user-facing output including reclaimed space). - Adds E2E tests for prune behavior (
--all, label filters, in-use volumes) and introduces localized strings for the command.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/windows/wslc/e2e/WSLCE2EVolumeTests.cpp | Updates volume help test to include the new prune subcommand. |
| test/windows/wslc/e2e/WSLCE2EVolumePruneTests.cpp | Adds E2E coverage for wslc volume prune scenarios and filter validation. |
| src/windows/wslc/tasks/VolumeTasks.h | Declares the new PruneVolumes task entrypoint. |
| src/windows/wslc/tasks/VolumeTasks.cpp | Implements CLI task logic for prune (filters, printing deleted volumes, reclaimed space). |
| src/windows/wslc/services/VolumeService.h | Adds VolumeService::Prune API returning a typed result model. |
| src/windows/wslc/services/VolumeService.cpp | Implements the prune service call into the session COM interface with warning callback. |
| src/windows/wslc/services/VolumeModel.h | Introduces PruneVolumesResult (names + reclaimed space). |
| src/windows/wslc/commands/VolumePruneCommand.cpp | Adds the new command implementation and argument set (--all, --filter, --session). |
| src/windows/wslc/commands/VolumeCommand.h | Declares VolumePruneCommand. |
| src/windows/wslc/commands/VolumeCommand.cpp | Registers the new prune subcommand under volume. |
| src/windows/wslc/arguments/ArgumentValidation.h | Adds ParseFilter declaration. |
| src/windows/wslc/arguments/ArgumentValidation.cpp | Factors filter parsing into ParseFilter and uses it for filter validation. |
| localization/strings/en-US/Resources.resw | Adds localized descriptions and output strings for volume prune. |
…melbawa/vol-prune
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
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed