-
Notifications
You must be signed in to change notification settings - Fork 292
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: wait_for_logs can now fail early when the container stops #682
fix: wait_for_logs can now fail early when the container stops #682
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #682 +/- ##
=======================================
Coverage ? 78.07%
=======================================
Files ? 12
Lines ? 602
Branches ? 89
=======================================
Hits ? 470
Misses ? 106
Partials ? 26 ☔ View full report in Codecov by Sentry. |
solves lint fail
9ff855b
to
8bc2cc4
Compare
why is true is not the default, any background on this? |
I think it would be a good default. |
i would like to roll it out everywhere else, wonder what would be a good strategy for that, unless i am overthinking it, in which case we should just do it. |
TBH, I think the |
pr title = "fix: wait_for_logs can now fail early when the container stops" next pr title = ${pr title/can/WILL/} |
Hi! Another option is to allow user to define the set of |
🤖 I have created a release *beep* *boop* --- ## [4.8.1](testcontainers-v4.8.0...testcontainers-v4.8.1) (2024-08-18) ### Bug Fixes * **generic:** Update the FastAPI install on genric module doctest samples ([#686](#686)) ([5216b02](5216b02)) * **mssql:** use glob to find mssql-tools folder since it moves ([#685](#685)) ([4912725](4912725)), closes [#666](#666) * wait_for_logs can now fail early when the container stops ([#682](#682)) ([925329d](925329d)) ### Documentation * Add a more advance usecase documentation for ServerContainer ([#688](#688)) ([2cf5a9f](2cf5a9f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Addresses my suggestion made in issue 681.
This PR adds a flag that checks is the status is not
running
and raises aRuntimeError
to avoid waiting for logs after the container already has exited. The idea is to save wait time when there is a long startup time in case the container fails early.