Skip to content
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

fix: multiple filters #173

Merged
merged 1 commit into from
Oct 23, 2024
Merged

Conversation

stevenh
Copy link
Contributor

@stevenh stevenh commented Oct 22, 2024

Fix multiple filters which was only applying the removal of the last iterated set.

Add tests to validate that:

  • Multiple filters are correctly processed
  • Duplicate filters are correctly ignored
  • Immediate shutdown occurs if no clients

This increasing code coverage to 89.4%.

Use best effort in removal if resource changes are detected after a shutdown has been signalled to allow as much to be cleaned up as possible.

This includes a new setting ChangesRetryInterval exposed by the env variable RYUK_CHANGES_RETRY_INTERVAL and defaults to 1 second which is used to control the interval between retries if resource changes are detected.

@mdelapenya mdelapenya self-assigned this Oct 22, 2024
@mdelapenya mdelapenya added the bug An issue with the project label Oct 22, 2024
@stevenh stevenh self-assigned this Oct 22, 2024
@stevenh stevenh force-pushed the fix/multiple-filters branch 2 times, most recently from a014101 to fa3872d Compare October 22, 2024 11:54
@stevenh stevenh marked this pull request as ready for review October 22, 2024 11:57
@stevenh stevenh requested a review from a team as a code owner October 22, 2024 11:57
reaper.go Show resolved Hide resolved
mdelapenya
mdelapenya previously approved these changes Oct 22, 2024
Copy link
Member

@mdelapenya mdelapenya left a comment

Choose a reason for hiding this comment

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

LGTM, I added one comment just to check I'm understanding the error chain well.

mdelapenya
mdelapenya previously approved these changes Oct 22, 2024
config.go Show resolved Hide resolved
mdelapenya
mdelapenya previously approved these changes Oct 23, 2024
Copy link
Member

@mdelapenya mdelapenya left a comment

Choose a reason for hiding this comment

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

LGTM; just a suggestion in the docs

Thanks!

README.md Outdated Show resolved Hide resolved
Fix multiple filters which was only applying the removal of the last
iterated set.

Add tests to validate that:
* Multiple filters are correctly processed
* Duplicate filters are correctly ignored
* Immediate shutdown occurs if no clients

This increasing code coverage to 89.4%.

Use best effort in removal if resource changes are detected after
a shutdown has been signalled to allow as much to be cleaned up as
possible.

This includes a new setting ChangesRetryInterval exposed by the env
variable RYUK_CHANGES_RETRY_INTERVAL and defaults to 1 second which
is used to control the interval between retries if resource changes
are detected.
Copy link
Member

@mdelapenya mdelapenya left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@mdelapenya mdelapenya merged commit e08866d into testcontainers:main Oct 23, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue with the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants