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

Prevent custom reaper image from causing Ryuk warning #720

Conversation

matthewmcnew
Copy link
Contributor

  • A custom provided ReaperImage would trigger the "Ryuk has been disabled for the container" warning when starting the Reaper image itself because the image name is used to detect if the container is the reaper container.

What does this PR do?

  • This passes the selected ReaperImage as the ReaperImage when creating the Reaper ContainerRequest to ensure that it matches as the reaper image and prevents the incorrect warning.

Why is it important?

Configuring a custom ReaperImage currently leads to an inaccurate warning

	network, err := testcontainers.GenericNetwork(ctx, testcontainers.GenericNetworkRequest{
		NetworkRequest: testcontainers.NetworkRequest{
			Name:           networkName,
			CheckDuplicate: true,
			ReaperImage:    "some-other-reaper-image", 
		},
	})

=>

	**********************************************************************************************
	Ryuk has been disabled for the container. This can cause unexpected behavior in your environment.
	More on this: https://golang.testcontainers.org/features/garbage_collector/
	**********************************************************************************************

 - A custom provided ReaperImage would trigger the "Ryuk has been disabled for the container" warning when starting the Reaper image itself because the image name is used to detect if the container is the reaper container.
 - This passes the selected ReaperImage as the ReaperImage when creating the ContainerRequest to ensure that it matches as the reaper image.
@matthewmcnew matthewmcnew requested a review from a team as a code owner December 31, 2022 02:42
@netlify
Copy link

netlify bot commented Dec 31, 2022

Deploy Preview for testcontainers-go ready!

Name Link
🔨 Latest commit 26b47f3
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-go/deploys/63afa17bcf9df70009abe268
😎 Deploy Preview https://deploy-preview-720--testcontainers-go.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

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.

Hey @matthewmcnew thanks for this fix. Before merging it as is, could you please take a look at #647? It's still pending to be merged, and I think both PRs could be complementary

Other than that, this LGTM, pending the detection of possible conflicts with #647

Very much thank you for this!

@matthewmcnew
Copy link
Contributor Author

Hi @mdelapenya Thanks for the heads up! it looks like #647 accomplishes what this PR is intending to accomplish. Happy to close this one if that one is merged 😄 .

@mdelapenya
Copy link
Member

As #647 was merged, and because of #720 (comment), I'm closing this PR.

Thanks @matthewmcnew for your time here and reviwing #647 👏

@mdelapenya mdelapenya closed this Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants