Open
Conversation
825ac17 to
4418a23
Compare
|
Hi. Why CI is not executed here ? |
4418a23 to
9c878a2
Compare
Author
|
@legalsylvain i think it is because someone should approve this change first. i’ve just pushed some new changes to improve the code even more. |
|
hi docker-py contributors. (@thaJeztah, @milas) Could you take a look on that PR ? Thanks a lot ! |
Member
|
Looks like CI didn't trigger; let me try a quick close/reopen |
|
@huguesdk : could you take a look on red CI ? |
9c878a2 to
b503672
Compare
use the same logic as the cli to wait for the exit of a container when running one: ensure that a container run with auto_remove set to True has been removed when the function returns. this prevents a race condition when trying to run another container with the same name directly afterwards. signed-off-by: hugues de keyzer <docker@hugues.info>
b503672 to
6fc2b9a
Compare
Author
|
@legalsylvain i adjusted the tests to make them pass. @thaJeztah do you think i should add tests for the new code? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
use the same logic as the cli (see here and here) to wait for the exit of a container when running one: ensure that a container run with
auto_removeset toTruehas been removed when the function returns.this prevents a race condition when trying to run another container with the same name directly afterwards.
the race condition can be reproduced like this:
after some time, this error happens: