| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
🟢 No issues found — LGTM! View logs.
Sorry, something went wrong.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Sorry, something went wrong.
A container is orphaned when it is a one-off (compose run) that FINISHED its task, or when it carries the project labels but its service is not defined by the compose model — the typical leftover after the compose file was edited. A still-RUNNING one-off is somebody's live session: 'up --remove-orphans' cleans up leftovers and must never kill it. 'down --remove-orphans' is the explicit stop-the-application action, so it DOES take running one-offs down — through the per-service removal loop, not the orphan branch. That asymmetry was implemented but stated nowhere: isOrphaned's comment only mentioned the model-absent half, down.go removed running one-offs as an unexplained side effect of including one-offs in the listing, and the observed-state collection silently dropped running one-offs with no hint it was deliberate. No behavior change — the semantics are now written at all three sites and pinned by tests: the predicate matrix, the observed-state classification (a running one-off is neither a service replica nor an orphan), and down's single stop+remove path for a running one-off of a declared service. Closes item C.4 of docker#14074. Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What I did
Epic #14074, item C.4. The orphan-container asymmetry between up and down is intentional but was stated nowhere — this PR writes it down and pins it with tests, with no behavior change:
Tests pin the predicate matrix, the observed-state classification (a running one-off is neither a service replica nor an orphan) and down's single stop+remove path for a running one-off of a declared service.
Related issue
Item C.4 of #14074
🤖 Generated with Claude Code