-
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
podman inspect add State.Health field for docker compat #11654
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99 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 |
2432478
to
71a0814
Compare
ca7b6fa
to
c5de0c8
Compare
LGTM |
I'm a little iffy about this. HCs are potentially a lot of output, printing them twice seems excessive. |
What do you suggest instead, renaming the field to match docker will break existing podman users. |
APIv2 should already be working, because it directly used the Docker structs, so we don't need to worry about that side of things. Just spitballing here, but we could detect if we have a terminal attached (and thus have a user looking at the output), and not add the Docker-compat field? Any use of Alternatively, we could make this a breaking change for 4.0. |
@mheon the compatible handler does have code to resolve the naming and type differences. See podman/pkg/api/handlers/compat/containers.go Line 411 in cc6a85b
|
I'd vote breaking change for v4.0 |
and a few red tests |
c5de0c8
to
081fe6a
Compare
I went with a different approach, I really do not want to break podman users. |
LGTM |
Since this is Podman 4.0, why not reverse this selection, so HealthCheck will still work with Format, but our output matches Docker. |
It would be better if the output matches Docker. |
LGTM |
LGTM on my end |
081fe6a
to
63334d1
Compare
I swapped the fields as @rhatdan suggested. We now match docker by default but users can still use |
214592c
to
0626e7a
Compare
podman inspect shows the healthcheck status in `.State.Healthcheck`, docker uses `.State.Health`. To make sure docker scripts work we should add the `Health` key. Because we do not want to display both keys by default we only use the new `Health` key. This is a breaking change for podman users but matches what docker does. To provide some form of compatibility users can still use `--format {{.State.Healthcheck}}`. IT is just not shown by default. Fixes containers#11645 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
0626e7a
to
1199733
Compare
/lgtm |
podman inspect shows the healthcheck status in
.State.Healthcheck
,docker uses
.State.Health
. To make sure docker scripts work weshould add the
Health
key. Because we do not want to display both keysby default we only use the new
Health
key. This is a breaking changefor podman users but matches what docker does. To provide some form of
compatibility users can still use
--format {{.State.Healthcheck}}
. Itis just not shown by default.
Fixes #11645