-
Notifications
You must be signed in to change notification settings - Fork 31
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
test(itest): improve container startup health detection #1534
test(itest): improve container startup health detection #1534
Conversation
Test image available:
|
Seems like after one of the recent commits this actually breaks the CI runner entirely, it always seems to time out... unfortunately, not much in the way of logging. |
I wonder if maybe the CI runner's |
Ohh yeh just realized I just started the 7th attempt....What is version of |
Actually, I am experiencing the same issue locally too. Been stuck at |
Maybe the regular expression here is invalid because the input is the while row including the container name, uptime and brackets? $ podman ps --format '{{.Names}} {{.Status}}' | grep jfr-datasource | grep -E -i 'health'
jfr-datasource-itest Up About a minute (healthy)
$ podman ps --format '{{.Names}} {{.Status}}' | grep jfr-datasource | grep -E -i '^health'
$ echo $?
1 |
Test image available:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
(cherry picked from commit 9401ad1)
Welcome to Cryostat! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
git commit --amend --signoff
Fixes: #1533
Description of the change:
This adds Podman health probes to the containers started for integration testing, and changes the
wait-for-X
executions to query podman's view of container health as a startup check.Motivation for the change:
Rather than running a
timeout
command that forks subprocess shells executingcurl
to try to check the container availability externally, this ends up using a process run within the container to check for the service availability, which is reported to podman. From outside the containers we ask podman what the status is. This is less prone to getting into a bad state withcurl
trying to open a connection to the services in the containers when they are not yet ready to accept connections and causingcurl
to time out and therefore fail the startup check and the integration test run. This should make itest startup much more reliable.How to manually test:
bash repeated-integration-tests.bash N SomeTestsIT
, whereN
is some large number andSomeTestsIT
are a subset of tests run simply to ensure basic startup succeeded.bash repeated-integration-tests.bash 10 HealthIT
for example.