Closed ArthurBook closed 2 months ago
Attention: Patch coverage is 0%
with 2 lines
in your changes missing coverage. Please review.
Please upload report for BASE (
main@c7d9b81
). Learn more about missing BASE report.
Files | Patch % | Lines |
---|---|---|
core/testcontainers/core/waiting_utils.py | 0.00% | 1 Missing and 1 partial :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
why is true is not the default, any background on this?
why is true is not the default, any background on this?
I think it would be a good default. Kept it False just to not change existing functionality without explicit opt-in.
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 false
behavior is more a bug than actual expected behavior. If I were to make the call, I would not only make true
the default, but also don't make it user configurable at all (can any of you come up with a use case were the false
behavior is useful?).
pr title = "fix: wait_for_logs can now fail early when the container stops"
next pr title = ${pr title/can/WILL/}
Hi!
Agree with above, for all our use cases, the expected behavior would be to raise RuntimeError if the container exited. I think its a good idea to drop the raise_on_exit
param and fix behavior to True.
Another option is to allow user to define the set of Container.status
that (don't) cause a fail. This would allow for a bit more configurability. WDYT?
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.