Add unpause option for paused containers - #589
Zhibo Lin (LE0-Lin) wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an Unpause action for paused containers and prevents the extension from attempting to Start paused containers (which Docker rejects with HTTP 409), by wiring an unpauseContainers command through the shared container client and surfacing it in the Containers view.
Changes:
- Add
unpauseContainerssupport to@microsoft/vscode-container-client(Docker-compatible clients), with explicitCommandNotSupportedErrorbehavior for wslc. - Add a new
vscode-containers.containers.unpausecommand and show it only for paused containers; remove paused containers from the Start action. - Add unit/integration coverage for unpause, including an E2E pause→unpause flow (skipped for wslc).
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/vscode-container-client/src/test/ContainersClientE2E.test.ts | Adds an integration test covering pause→unpause behavior (skipping wslc). |
| packages/vscode-container-client/src/test/clients/WslcClient/WslcClient.test.ts | Verifies wslc rejects unpauseContainers with CommandNotSupportedError. |
| packages/vscode-container-client/src/test/clients/WslcClient/WslcCanary.test.ts | Updates canary coverage to include container unpause as unsupported for wslc. |
| packages/vscode-container-client/src/test/clients/DockerClient/DockerClient.test.ts | Adds unit test ensuring docker container unpause args and parsing are correct. |
| packages/vscode-container-client/src/contracts/ContainerClient.ts | Extends the public containers client contract with unpauseContainers. |
| packages/vscode-container-client/src/clients/WslcClient/WslcClient.ts | Explicitly rejects unpauseContainers for wslc to avoid inheriting unsupported CLI behavior. |
| packages/vscode-container-client/src/clients/DockerClientBase/DockerClientBase.ts | Implements unpauseContainers command construction and output parsing in the base Docker-like client. |
| extensions/vscode-containers/src/commands/registerCommands.ts | Registers the new vscode-containers.containers.unpause command. |
| extensions/vscode-containers/src/commands/containers/unpauseContainer.ts | Adds the new command implementation for unpausing selected paused containers. |
| extensions/vscode-containers/src/commands/containers/startContainer.ts | Removes paused containers from the Start command selection filter. |
| extensions/vscode-containers/package.nls.json | Adds localized label for the Unpause command. |
| extensions/vscode-containers/package.json | Contributes the Unpause command and updates context-menu when clauses for Start vs Unpause. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
5d2ee63 to
03c6a25
Compare
|
Hi Brandon Waterloo [MSFT] (@bwateratmsft) — I’ve rebased this PR onto the current
The new fork workflow is awaiting maintainer approval. When you have a chance, could you approve it and take another look at the PR? Thanks! |
Fixes #128
This adds an Unpause action that is shown only for paused containers. Paused containers are also removed from the Start action so the extension no longer sends a start command that Docker rejects with a 409.
The shared container client now supports
container unpausefor Docker-compatible runtimes. Wslc explicitly reports the command as unsupported because it has no pause/unpause subcommands.Tests:
pnpm --filter @microsoft/vscode-container-client test(243 passing)pnpm --filter vscode-containers test(158 passing)running -> paused -> unpaused -> running(1 passing)pnpm --filter @microsoft/vscode-container-client lintpnpm --filter vscode-containers lintpnpm build