Skip to content

Add unpause option for paused containers - #589

Open
Zhibo Lin (LE0-Lin) wants to merge 2 commits into
microsoft:mainfrom
LE0-Lin:fix/container-unpause-command
Open

Add unpause option for paused containers#589
Zhibo Lin (LE0-Lin) wants to merge 2 commits into
microsoft:mainfrom
LE0-Lin:fix/container-unpause-command

Conversation

@LE0-Lin

Copy link
Copy Markdown

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 unpause for 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)
  • Docker integration test for running -> paused -> unpaused -> running (1 passing)
  • pnpm --filter @microsoft/vscode-container-client lint
  • pnpm --filter vscode-containers lint
  • pnpm build

@LE0-Lin
Zhibo Lin (LE0-Lin) requested a review from a team as a code owner August 20, 2026 13:55
Copilot AI lite review requested due to automatic review settings August 20, 2026 13:55

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 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 unpauseContainers support to @microsoft/vscode-container-client (Docker-compatible clients), with explicit CommandNotSupportedError behavior for wslc.
  • Add a new vscode-containers.containers.unpause command 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.

Comment thread extensions/vscode-containers/src/commands/containers/unpauseContainer.ts Outdated
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.

Add "unpause" option to paused containers

2 participants