Skip to content

fix(prompt): stop ignoring SIGTERM while waiting for a confirmation - #14582

Open
glours wants to merge 1 commit into
docker:mainfrom
glours:fix-prompt-cancel-on-signal
Open

glours wants to merge 1 commit into
docker:mainfrom
glours:fix-prompt-cancel-on-signal

Conversation

@glours

@glours glours commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Jira: DDB-917

A command waiting at a confirmation prompt (rm, the volume-recreate prompt of up, publish, bridge convert) ignored SIGTERM until stdin closed: timeout 5 docker compose rm returned after 30s, while docker volume prune stops after 5s. In a terminal it also left the tty in raw mode.

The prompt now takes the command context and returns as soon as it is canceled. A Ctrl+C typed in raw mode is a cancellation too and exits 130, like SIGINT.

Breaking (Go API): compose.Prompt, bridge.Confirm and ConvertOptions.Confirm take a context.Context as their first parameter.

Adds e2e coverage for the rm and up volume-recreate prompts, through a new Scenario.SignaledOnOutput action.

A command blocked on a confirmation prompt ignored SIGTERM until stdin
closed, and in a terminal it left the tty in raw mode. Pass the context
to the prompt and return as soon as it is canceled. A Ctrl+C typed in
raw mode is now a cancellation too and exits 130, like SIGINT.

Breaking: compose.Prompt, bridge.Confirm and ConvertOptions.Confirm now
take a context.Context as their first parameter.

Add Scenario.SignaledOnOutput and e2e coverage for the rm and the
volume-recreate prompts.

Signed-off-by: Guillaume Lours <glours@users.noreply.github.com>
@glours
glours requested review from a team as code owners December 3, 2026 15:46
@glours
glours requested a review from ndeloof December 3, 2026 15:46
@glours glours changed the title fix(prompt): stop waiting for a confirmation once canceled fix(prompt): stop ignoring SIGTERM while waiting for a confirmation Dec 3, 2026

@docker-agent docker-agent 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.

Assessment: 🟢 APPROVE

@codecov

codecov Bot commented Dec 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.10526% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/prompt/prompt_mock.go 0.00% 2 Missing ⚠️
cmd/compose/options.go 66.66% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

This branch has not been deployed

No deployments
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