Skip to content

[CLI] Initial support for volume prune#40737

Draft
AmelBawa-msft wants to merge 4 commits into
masterfrom
user/amelbawa/vol-prune
Draft

[CLI] Initial support for volume prune#40737
AmelBawa-msft wants to merge 4 commits into
masterfrom
user/amelbawa/vol-prune

Conversation

@AmelBawa-msft

Copy link
Copy Markdown
Contributor

Summary of the Pull Request

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

Validation Steps Performed

Copilot AI review requested due to automatic review settings June 7, 2026 06:44

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

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 prune subcommand and wires it into wslc volume help/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.

Comment thread src/windows/wslc/services/VolumeService.cpp
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