-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Improve remove docker container function to take into account stopped containers #12979
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Test Results (amd64) - Integration, Bootstrap 5 files 5 suites 2h 23m 4s ⏱️ Results for commit 0e71d26. ♻️ This comment has been updated with latest results. |
LocalStack Community integration with Pro 2 files ±0 2 suites ±0 1h 45m 41s ⏱️ -4s Results for commit 0e71d26. ± Comparison against base commit 1d26825. This pull request removes 2 and adds 3 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great catch and thanks for jumping on this! Once there is a test for this, we should be good to go! 💯
localstack-core/localstack/utils/container_utils/container_client.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but I agree with Alex on the tests, would be nice to get one!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thank you so much for addressing the comments and even fixing a bug along the way!
I think it would be great to get a final review from @dfangl as owner of this module, but then we should be good to go! 💯
localstack-core/localstack/utils/container_utils/docker_cmd_client.py
Outdated
Show resolved
Hide resolved
localstack-core/localstack/utils/container_utils/docker_cmd_client.py
Outdated
Show resolved
Hide resolved
localstack-core/localstack/utils/container_utils/container_client.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Nice tests, and very good catch with the remove container function! Thanks for adding all those sweet new tests!
Motivation
Right now, this remove container method doesn't take into account stopped containers when you ask it to check for existence of it
Related PR for more context about why bother with this change -> https://github.com/localstack/localstack-pro/pull/5037
Changes
get_all_container_names
) I didn't touch the old method (get_running_container_names
) to keep compatibility and not break any code already using it.