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

Add support for abortOnContainerExit to HTTP wait strategy #693

Conversation

NuShoSinkuPomogliTebeTvoiSankcii
Copy link
Contributor

Hello!

It's common case for me that http strategy will check whole time before startup timeout passed even if container already exited (stopped).
So to stop the healthcheck I added check for container status. If it exited, then I stop strategy check.
Also it convinient for this case to see last nth logs in console. I know that I can restart it with DEBUG mode, but in CI environment it can take many time to restart job with new envs.

Copy link

netlify bot commented Dec 15, 2023

Deploy Preview for testcontainers-node ready!

Name Link
🔨 Latest commit cb56eda
🔍 Latest deploy log https://app.netlify.com/sites/testcontainers-node/deploys/65c1130b2173b10007c608d8
😎 Deploy Preview https://deploy-preview-693--testcontainers-node.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 configuration.

@NuShoSinkuPomogliTebeTvoiSankcii
Copy link
Contributor Author

@cristianrgreco Hello! Can you review my PR please?

@cristianrgreco
Copy link
Collaborator

cristianrgreco commented Dec 18, 2023

Hi @NuShoSinkuPomogliTebeTvoiSankcii, thanks for the contribution! I'll review this in the next few days, things are a bit busy around this time of the year 🙂

@NuShoSinkuPomogliTebeTvoiSankcii
Copy link
Contributor Author

@cristianrgreco Hello! Kindly reminder about review :)

@cristianrgreco
Copy link
Collaborator

Hey @NuShoSinkuPomogliTebeTvoiSankcii, sorry for the delay, I like the idea/suggested implementation. I left one comment above about tests

@NuShoSinkuPomogliTebeTvoiSankcii
Copy link
Contributor Author

@cristianrgreco thanks for review! Refactored logic and added tests.

@NuShoSinkuPomogliTebeTvoiSankcii
Copy link
Contributor Author

@cristianrgreco Hello! Can you please review my changes?

@cristianrgreco
Copy link
Collaborator

@NuShoSinkuPomogliTebeTvoiSankcii Apologies for the delay, I will get this reviewed by the weekend, thanks for making the changes!

@cristianrgreco
Copy link
Collaborator

cristianrgreco commented Feb 2, 2024

Could you please add this new feature to the docs? https://github.com/testcontainers/testcontainers-node/blob/546d8730fe4fa8a44a35dee6f4c5f99642f3c817/docs/features/wait-strategies.md#http

Overall LGTM! just a few minor nitpicks. Thanks again for the contribution. I'm aware this PR has been open a while (my bad) so LMK if you'd like me to make the changes 🙂

@cristianrgreco cristianrgreco added enhancement New feature or request minor Backward compatible functionality labels Feb 2, 2024
@NuShoSinkuPomogliTebeTvoiSankcii
Copy link
Contributor Author

@cristianrgreco Hello! Made refactoring, added docs. Just one question about export from index.

@NuShoSinkuPomogliTebeTvoiSankcii
Copy link
Contributor Author

It will be nice if you can release it after merge.

@cristianrgreco cristianrgreco changed the title Check container not exited in http strategy Add support for abortOnContainerExit to HTTP wait strategy Feb 5, 2024
@cristianrgreco cristianrgreco merged commit 0aeaa42 into testcontainers:main Feb 5, 2024
100 checks passed
@cristianrgreco
Copy link
Collaborator

@NuShoSinkuPomogliTebeTvoiSankcii I will merge a couple more PRs and then release. Will be a couple hours at the most. Thanks again for your contribution!

@cristianrgreco
Copy link
Collaborator

Released in 10.7.1 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request minor Backward compatible functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants