Skip to content

fix(docker): RunOneShot removes its container on cancel (D-0712, D-0724) - #904

Merged
acamarata merged 2 commits into
mainfrom
fix/debt12-D-0712
Oct 20, 2026
Merged

acamarata merged 2 commits into
mainfrom
fix/debt12-D-0712

Conversation

@acamarata

Copy link
Copy Markdown
Collaborator

Closes debt rows D-0712 and D-0724.

RunOneShot only killed the docker client on ctx cancel, so the pg_dump/pg_restore container kept running against the database. Every run now carries a container name (caller-set or generated) and a cancelled run force-removes it (own process group, 30 s bound).

Tests: fake docker that blocks on run; asserts rm -f for generated and caller-set names, none on success. Mutant (drop the removal) fails the test.

…ancelled (D-0712, D-0724)

Each one-shot now has a container name (the caller's or a generated one).
When the context ends by signal or deadline, the named container is removed
with docker rm -f in its own process group, so db export, backup, restore
and pg_restore stop writing to the target after nself reports failure.
@acamarata
acamarata merged commit 09abc4b into main Oct 20, 2026
33 of 36 checks passed
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.

1 participant