Skip to content

Rename image delete to remove and add aliases#14521

Merged
AmelBawa-msft merged 2 commits intofeature/wsl-for-appsfrom
user/amelbawa/image-delete-3
Mar 25, 2026
Merged

Rename image delete to remove and add aliases#14521
AmelBawa-msft merged 2 commits intofeature/wsl-for-appsfrom
user/amelbawa/image-delete-3

Conversation

@AmelBawa-msft
Copy link
Copy Markdown
Contributor

@AmelBawa-msft AmelBawa-msft commented Mar 24, 2026

Summary of the Pull Request

wslc rmi <image>
wslc image rm <image>
wslc image remove <image>
wslc image delete <image>

I also updated wslc container to support delete in addition to the remove for consistency

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

@AmelBawa-msft AmelBawa-msft requested a review from a team as a code owner March 24, 2026 21:18
Copilot AI review requested due to automatic review settings March 24, 2026 21:18
Comment thread src/windows/wslc/commands/ContainerCommand.h
Comment thread src/windows/wslc/commands/ImageCommand.h
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 the WSLC CLI to prefer image remove over image delete, while preserving backward compatibility via aliases and adding a new top-level rmi entry point.

Changes:

  • Renames the primary image deletion command from image delete to image remove, keeping delete/rm as aliases.
  • Adds a new root-scoped rmi command for removing images.
  • Updates E2E help-output expectations to reflect the new command naming and alias display.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/windows/wslc/e2e/WSLCE2EImageDeleteTests.cpp Updates expected help text/usage to image remove and includes alias section.
test/windows/wslc/e2e/WSLCE2EGlobalTests.cpp Updates root help output expectations to include rmi.
src/windows/wslc/commands/RootCommand.cpp Registers ImageRemoveCommand as a root-scoped rmi command.
src/windows/wslc/commands/ImageRemoveCommand.cpp Renames command class implementation strings from delete→remove.
src/windows/wslc/commands/ImageCommand.h Introduces ImageRemoveCommand (canonical remove, aliases delete/rm, root name rmi).
src/windows/wslc/commands/ImageCommand.cpp Switches image subcommand registration from delete→remove.
src/windows/wslc/commands/ContainerCommand.h Adds delete as an alias for ContainerRemoveCommand.

Comment thread src/windows/wslc/commands/ContainerCommand.h
Comment thread src/windows/wslc/commands/RootCommand.cpp
Copy link
Copy Markdown
Collaborator

@OneBlue OneBlue left a comment

Choose a reason for hiding this comment

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

LGTM. I recommend adding test coverage to validate that the aliases are wired (we could just check the help message for those specific commands here)

@AmelBawa-msft
Copy link
Copy Markdown
Contributor Author

LGTM. I recommend adding test coverage to validate that the aliases are wired (we could just check the help message for those specific commands here)

Good call, I think the test in this PR will fail after the new aliases show up. I will update them in the PR before completing it:

@AmelBawa-msft AmelBawa-msft merged commit b6c0814 into feature/wsl-for-apps Mar 25, 2026
11 checks passed
@AmelBawa-msft AmelBawa-msft deleted the user/amelbawa/image-delete-3 branch March 25, 2026 06:02
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.

3 participants