-
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
Refactor image tree for API usage #5093
Conversation
@baude PTAL |
Linter isn't happy yet. Will review now 👍
|
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.
Looking really good, thanks @saschagrunert!
Can you also extend the swagger docs for the image endpoint? -> https://github.com/containers/libpod/blob/master/pkg/api/server/register_images.go#L581
The syntax is a bit clumsy but copy-pasting from the surrounding endpoints could help.
Thanks! Please keep in mind that the varlink API does not work yet :) |
beb8528
to
05471cd
Compare
05471cd
to
0f5a902
Compare
Varlink API works now, ready for review. |
Still open. |
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.
497ae0c
to
3eda7ef
Compare
@saschagrunert, can you rebase? This will make local tests easier as we'd fetch |
3eda7ef
to
5342cad
Compare
Rebased on top of the latest master branch and addressed your review comments. |
5342cad
to
5faeb8b
Compare
Signed-off-by: Sascha Grunert <[email protected]>
5faeb8b
to
93358ef
Compare
Docs seem to be green now as well :) |
it LGTM but i want @mheon to peek at this one |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mheon, saschagrunert 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 |
@@ -0,0 +1,138 @@ | |||
package image |
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 we move this to somewhere in pkg/? It doesn't seem much like an API call, given it only returns a string.
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.
I suggest to wait for @mtrmac's new package. We may be able to integrate it there.
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.
By "wait" I mean we could merge it as is now and let Miloslav pick it up in his new package.
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.
Hm. It's just libpod/image, not libpod itself, so sure
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.
Definitely don’t wait for me, I’m still mostly in learning phase, and I can adjust for whatever happens here.
(Jumping into what I’m sure was a well-considered decision, I’d instinctively prefer to primarily have a well-typed API that returns the structure, and keep the text formatter in the CLI (allowing, at least in principle, a nice GUI to be built on top, for example). OTOH, I guess that exposing the complete tree structure over Varlink/whatever would be a lot of work and pain — and for no benefit at least now that the only consumer is the CLI.)
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.
That's my big hold-up as well - I'd love to return a data structure that represents the tree, with a .String()
that returns the output. I'm willing to defer that to followup work, though.
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.
(Honestly, though, I'd be fine keeping the tree local-only, and exposing only a literal output string over the API. There's precedence for this with things like podman top
)
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.
(Or was it podman stats
... I forget which)
LGTM |
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
Refers to #2791 (comment)