Add unpause option for paused containers - #589
Open
Zhibo Lin (LE0-Lin) wants to merge 2 commits into
Open
Conversation
Contributor
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.
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.
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