-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
healthcheck, libpod: Read healthcheck event output from os pipe #13129
healthcheck, libpod: Read healthcheck event output from os pipe #13129
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: flouthoc The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
9c9b5f0
to
c31265f
Compare
changes LGTM but tests are unhappy |
c31265f
to
b00cc23
Compare
8073840
to
ed8a1c3
Compare
@@ -80,7 +80,6 @@ EOF | |||
Status | healthy | |||
FailingStreak | 0 | |||
Log[-1].ExitCode | 0 | |||
Log[-1].Output | |
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.
Had to retrofit the bad tests which expects no output from health-check. While this PR fixes that.
Not checking log output here since we are already doing that in e2e
just avoiding redundancy.
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.
Please also check the output here
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.
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.
@edsantiago Thanks added a new test for this. But i had to modify jq
output so it contains newline character rather than actual newline. Could you review bats
part please.
@containers/podman-maintainers PTAL |
It seems we are ignoring output from healthcheck session. Open a valid pipe to healthcheck session in order read its output. Use common pipe for both `stdout/stderr` since that was the previous behviour as well. Signed-off-by: Aditya R <[email protected]>
All the healthcheck return output now but systems tests is written to expect empty output which seems wrong. Modify jq output to contain newline character rather than actual newline Signed-off-by: Aditya R <[email protected]>
4ebcb6c
to
3cf64a8
Compare
LGTM if @edsantiago is happy with the test adjustments. |
LGTM! Since this fixes the almost-two-year-old no-output bug, could you please also remove the unnecessary workaround? index 6159a2807..c502ad669 100644
--- a/test/system/220-healthcheck.bats
+++ b/test/system/220-healthcheck.bats
@@ -15,9 +15,6 @@ function _check_health {
run_podman inspect --format "{{json .State.Healthcheck}}" healthcheck_c
parse_table "$tests" | while read field expect;do
- # (kludge to deal with parse_table and empty strings)
- if [ "$expect" = "''" ]; then expect=""; fi
-
actual=$(jq ".$field" <<<"$output")
is "$actual" "$expect" "$testname - .State.Healthcheck.$field"
done Thank you! Nice work! |
/lgtm |
Followup to containers#13129: remove a no-longer-necessary workaround for a healthcheck bug. Signed-off-by: Ed Santiago <[email protected]>
Followup to containers#13129: remove a no-longer-necessary workaround for a healthcheck bug. Signed-off-by: Ed Santiago <[email protected]>
Followup to containers#13129: remove a no-longer-necessary workaround for a healthcheck bug. Signed-off-by: Ed Santiago <[email protected]>
It seems we are ignoring output from health check session.
Open a valid pipe to health-check session in order read its output.
Use common pipe for both
stdout/stderr
since that was the previousbehavior as well.
Closes: #13083