-
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
Edited compat handling code for containers/json status and added python tests #10610
Conversation
a21fcc3
to
2e61416
Compare
Does this actually fix #10457 - I don't see any HC-related changes, just filter ones? |
@mheon I am pretty sure the issue is originating with the lack of handling for both status and health filters in the compat code upon inspect. I am planning on taking another look in the morning specifically at the Health filter to see if that is also just not handled. |
@cdoern I just noticed, could please include the PR description in the commit message. Also the |
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.
will do, sorry for the formatting issues |
6150de2
to
5057b12
Compare
9f8d37c
to
b54f151
Compare
@edsantiago can you take a peak at the failing test here? It's failing on a bad release version and I don't see any changes here that should have triggered that. |
This test should never run. I have to assume that someone manually pressed the 'Trigger' button. Whoever did that, live and learn, don't do it again. You can ignore the test result. It does not gate merging. |
that was me sorry, one test failed due to a flake and cancelled all of the others so I must've accidentally restarted that one. |
No worries! To restart a failed test, just press the 'Re-run' link in the left-hand panel. You do not need to restart any others: once the flaked test succeeds, the others will eventually run even though the @#$% UI says "Canceled". It's completely anti-intuitive, just one of those things we have to get used to. |
LGTM |
state.Health.Status = inspect.State.Healthcheck.Status | ||
state.Health.FailingStreak = inspect.State.Healthcheck.FailingStreak | ||
|
||
//item := define.HealthCheckLog{} |
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.
Can you trim this bit?
|
||
//item := define.HealthCheckLog{} | ||
|
||
var res *types.HealthcheckResult = &types.HealthcheckResult{} |
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.
This looks a little dubious - why is it being created only once? I think every time the for loop below runs, you're overwriting the contents, and appending the same entry to the array again?
I would move this inside the loop for safety
log := inspect.State.Healthcheck.Log | ||
|
||
for _, item := range log { | ||
var res *types.HealthcheckResult = &types.HealthcheckResult{} |
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.
Can this be stated as
res:=&types.HealthcheckResult{}
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.
yep, pushing that change now.
Added parsing and handling for the healthCheck status within containers.go. Also modified tests fixes containers#10457 Signed-off-by: cdoern <[email protected]>
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cdoern, rhatdan 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 |
Signed-off-by: cdoern [email protected]
Health Check is not handled in the compat LibpodToContainerJSON function within containers.go. Added parsing and handling for this status check and also edited some of the list container filter code.
fixes #10457