-
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
make podman pod inspect output a json array #21514
Conversation
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.
LGTM
you're a PR machine at the moment :)
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Luap99, vrothberg 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 |
/lgtm |
Cockpit tests failed for commit ca8ba47bc1b39a488f74139cc151d938af3b863a. @martinpitt, @jelly, @mvollmer please check. |
Just like all the other inspect commands that accept multiple args we should just make podman pod inspect output a json array. This makes the code more consistent and removes the extra workaround which was needed before to support this. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
ca8ba47
to
35d1f12
Compare
Cockpit tests failed for commit 35d1f12. @martinpitt, @jelly, @mvollmer please check. |
Looks like this change breaks cockpit. |
If cockpit uses the podman pod inspect command then yes it likely breaks the json parser but because this is a intentional breaking change this is expected and good to merge as we agreed the cockpit tests are not a blocker for such changes and that they need to fix the test on their end. That however only makes sense when this PR is merged as otherwise they would break all other PRs tests. |
/unhold |
The "as we do not show them in the UI yet" is not true any more, the code above does just that. This avoids assuming that `podman inspect` returns a JSON object. containers/podman#21514 changes it to a list, so the test fails with "list indices must be integers or slices, not str" with that PR.
The "as we do not show them in the UI yet" is not true any more, the code above does just that. This avoids assuming that `podman inspect` returns a JSON object. containers/podman#21514 changes it to a list, so the test fails with "list indices must be integers or slices, not str" with that PR.
@Luap99 @vrothberg I sent cockpit-project/cockpit-podman#1549 to adjust cockpit's tests. It should land in the next 3 hours, then I'll ping here. |
The "as we do not show them in the UI yet" is not true any more, the code above does just that. This avoids assuming that `podman inspect` returns a JSON object. containers/podman#21514 changes it to a list, so the test fails with "list indices must be integers or slices, not str" with that PR.
@Luap99 @vrothberg The cockpit PR landed, so can you please retry? They should go green now. |
Retriggered the jobs. That was super fast, thanks a lot, @martinpitt ! |
please merge this |
/lgtm |
4c9bd24
into
containers:main
This also broke ansible-podman-collections, see containers/ansible-podman-collections#712 . |
Podman 5 changed the output of `podman pod info` (when run on a single pod) from being a dict to being a list of dicts: containers/podman#21514 this should handle both ways. Unfortunately not sure how to add a test for this as I can't see a unit test that mocks the output of the command, only the integration test that gets real live output, and I'm not sure how to get that test run with Podman 5. Signed-off-by: Adam Williamson <awilliam@redhat.com>
Fixes containers#712 Podman 5 changed the output of `podman pod info` (when run on a single pod) from being a dict to being a list of dicts: containers/podman#21514 this should handle both ways. Unfortunately not sure how to add a test for this as I can't see a unit test that mocks the output of the command, only the integration test that gets real live output, and I'm not sure how to get that test run with Podman 5. Signed-off-by: Adam Williamson <awilliam@redhat.com>
Fixes #712 Podman 5 changed the output of `podman pod info` (when run on a single pod) from being a dict to being a list of dicts: containers/podman#21514 this should handle both ways. Unfortunately not sure how to add a test for this as I can't see a unit test that mocks the output of the command, only the integration test that gets real live output, and I'm not sure how to get that test run with Podman 5. Signed-off-by: Adam Williamson <awilliam@redhat.com>
Fix breakig change introduced in Podman v5: containers/podman#21514 Related-to: containers#712 Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
Fix breakig change introduced in Podman v5: containers/podman#21514 Related-to: #712 Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
Fixing issue from: containers/podman#21514 Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
Fixing issue from: containers/podman#21514 Signed-off-by: Sagi Shnaidman <sshnaidm@redhat.com>
Just like all the other inspect commands that accept multiple args we should just make podman pod inspect output a json array. This makes the code more consistent and removes the extra workaround which was needed before to support this.
Does this PR introduce a user-facing change?