fix: workaround for moby/moby#50133 when reusing container#3197
fix: workaround for moby/moby#50133 when reusing container#3197mdelapenya merged 1 commit intotestcontainers:mainfrom
Conversation
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
471d296 to
fc48a6e
Compare
|
Hi @mdelapenya, Could you please trigger CI build for this PR sooner to check if this PR helps CI? Thank you. |
mdelapenya
left a comment
There was a problem hiding this comment.
LGTM! Just added a comment to improve the comment for the workaround, but approving it anyway to make sure we are going to merge this soon.
Thanks!
docker.go
Outdated
| lifecycleHooks: []ContainerLifecycleHooks{combineContainerHooks(defaultHooks, req.LifecycleHooks)}, | ||
| } | ||
|
|
||
| // Workaround for https://github.com/moby/moby/issues/50133 |
There was a problem hiding this comment.
suggestion: could you explain in the comment the need for the refresh of the state? I think that, even when the moby bug is related, the execution of our code could take millis that could impact it, even with the bug eventually resolved, so we'd like to have it explained there for future reference. I could imagine that the moby bug is resolved and we go back to this code and remove it just because of the comment. Please correct me if I'm wrong 🙏
There was a problem hiding this comment.
explain in the comment the need for the refresh of the state
Added details about workaround. Please review this PR one more time.
the moby bug is resolved and we go back to this code and remove it
I doubt it will be easy, because it will add requirement on Docker Engine version for Testcontainers for Go. Such requirement can be hard to meet (Docker Engine is pretty heavy tool for installation and not every user of Testcontainers for Go will be able to get required version of Docker Engine, especially if it is part of CI).
fc48a6e to
76476ef
Compare
…tainers.GenericContainer. Signed-off-by: Marat Abrarov <abrarov@gmail.com>
76476ef to
bf5b134
Compare
* main: fix: workaround for moby/moby#50133 when reusing container in testcontainers.GenericContainer. (testcontainers#3197) feat(kafka,redpanda): support for waiting for mapped ports without external checks (testcontainers#3165)
Changes
fix: workaround for moby/moby#50133 when reusing container in
testcontainers.GenericContainer.What does this PR do?
This PR implements workaround for moby/moby#50133 which fixes #3177.
Why is it important?
These changes should make PR builds more stable in this repository.
Related issues
How to test this PR
go test -count 1 -v -run TestGenericContainer_stop_start_withReuseFollow-ups
Possible fix for moby/moby#50133 can be found in mabrarov/moby@master...mabrarov:moby:50133-container_stop_state_sync.