Skip to content

don't fail trying to remove container with no candidate#9256

Merged
glours merged 1 commit intodocker:v2from
ndeloof:rm_empty
Mar 9, 2022
Merged

don't fail trying to remove container with no candidate#9256
glours merged 1 commit intodocker:v2from
ndeloof:rm_empty

Conversation

@ndeloof
Copy link
Contributor

@ndeloof ndeloof commented Mar 9, 2022

What I did
mark "service not found" as ErrNotFound so we can filter this our trying to remove containers while none match. Then just dump a warning, but exit with 0.
includes e2e test to prevent such regression in the future.

Related issue
closes #9255

(not mandatory) A picture of a cute animal, if possible in relation with what you did

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
@ndeloof ndeloof requested a review from glours March 9, 2022 15:24
Copy link
Contributor

@glours glours left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@glours glours merged commit 4d163f3 into docker:v2 Mar 9, 2022
@ndeloof ndeloof deleted the rm_empty branch March 9, 2022 15:49
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.

Attempting to remove a not created container throws a no such service error (2.3.x regression)

2 participants