refactor info#5507
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: baude The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
This PR will not build nor pass any tests. |
|
@mheon I know we have talked about this for a while ... the current state of info will soon block finalization of the apiv2. I'm only looking for general confirmation here of what you think. An actual review can come once I finish this PR. If you don't like the approach, it makes no sense to go further. |
vrothberg
left a comment
There was a problem hiding this comment.
General approach LGTM!
I wonder if it would make sense to create a pkg/info for it which would provide the types and the code (bonus points for unit tests). @mheon suggested doing that for the auto-update PR and I found it a nice way to debloat ./libpod.
|
I'm OK with leaving it in Libpod; it seems like a reasonable API endpoint for us. Overall approach LGTM here. |
7ebd433 to
1f51f4b
Compare
|
I'm not really keen on the idea of breaking backward compatibility, but I missed the discussion yesterday. If it's absolutely necessary, here is a patch to get system tests passing. I believe there is still a real problem with the $ ./bin/podman info --format '{{.host.arch}}'
Error: template: image:1:7: executing "image" at <.host.arch>: can't evaluate field host in type main.infoWithExtra```
$ /usr/bin/podman info --format '{{.host.arch}}'
amd64Fails for anything (AFAICT) inside |
cf882b5 to
bd4b634
Compare
the current implementation of info, while typed, is very loosely done so. we need stronger types for our apiv2 implmentation and bindings. Signed-off-by: Brent Baude <bbaude@redhat.com>
|
/lgtm |
|
/hold cancel |
the current implementation of info, while typed, is very loosely done so. we need stronger types for our apiv2 implmentation and bindings.
Signed-off-by: Brent Baude bbaude@redhat.com