Skip to content

fix(local): report owned container removal failures - #110

Closed
bobbyroach wants to merge 1 commit into
mainfrom
fix/report-local-container-removal-failures
Closed

bobbyroach wants to merge 1 commit into
mainfrom
fix/report-local-container-removal-failures

Conversation

@bobbyroach

Copy link
Copy Markdown

Summary

Report failed Docker removal for local sandboxes that own a container, including reattached sandboxes.

Motivation

docker rm -f ... || true made a Docker daemon failure look like successful teardown, potentially leaving a container and its host port behind.

Solution

Ignore only Docker's No such container response for owned containers. Preserve best-effort removal for VM-only sandboxes and still attempt Compose teardown when container removal fails.

Test plan

  • Reproduced the masked failure before the fix with Docker pointed at a nonexistent local socket; after the fix, teardown raises in both live and reattached modes.
  • .venv/bin/pytest -q tst/unit/providers/sandbox_providers/local_sandbox_test.py tst/unit/task/teardown_test.py — 82 passed.
  • git diff --check passed.

@bobbyroach bobbyroach closed this Oct 8, 2026
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