fix: Throw an exception if the container has exited while checking for readiness #1451
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This pull request ensures that if a container has exited, readiness check are aborted with the newly introduced
ContainerException
. The exception message includes both stdout and stderr of the container to help diagnosing the issue.Why is it important?
As described in #1445, this change significantly improves the developer experience. Developers get immediate feedback when something goes wrong.
Related issues
Fixes #1445
How to test this PR
A simple way to test this PR is to run the Oracle21 tests on an Apple Silicon Mac. You'll get this error.
Another way is to update
JanusGraphContainerTest
with a bad configuration:This is a bit slow because the container tries to access the storage backend several times before giving up. Eventually the
ContainerException
is raised.