fix: Recreate Ryuk container if terminated#2084
Merged
mdelapenya merged 5 commits intotestcontainers:mainfrom Jan 12, 2024
Merged
fix: Recreate Ryuk container if terminated#2084mdelapenya merged 5 commits intotestcontainers:mainfrom
mdelapenya merged 5 commits intotestcontainers:mainfrom
Conversation
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
mdelapenya
reviewed
Jan 9, 2024
mdelapenya
reviewed
Jan 9, 2024
Member
mdelapenya
left a comment
There was a problem hiding this comment.
Added a few comments, once resolved, I think we are good to go, Thanks!
964b47b to
605ca7b
Compare
605ca7b to
d50621c
Compare
mdelapenya
reviewed
Jan 11, 2024
Contributor
Author
|
Great. Could you run the test suite one more time for me? I had to update the branch. Thanks! |
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.
What does this PR do?
Fixes ryuk recreation such that a new container is spun up if the previous container has terminated and been removed. This involves checking for ErrNotFound during the Ryuk state check, triggering the creation of a new ryuk container if this error is returned.
It is essential to reset
reaperOnce. Without resetting, no attempt to create a new reaper will be made.Why is it important?
Related issues
How to test this PR
Run test
Test_RecreateReaperIfTerminatedto validate changes.Or run the following test suite with env variable
SLEEP=11s. Without changes made in this PRTestCwould fail, but with them all tests pass.