-
Notifications
You must be signed in to change notification settings - Fork 202
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
libimage: Return the full registry domain when searching #802
libimage: Return the full registry domain when searching #802
Conversation
Searching for images in registry.fedoraproject.org returns fedoraproject.org as registry in the search results. When relying on the Index to group results from different registries this is an issue. Signed-off-by: Jelle van der Waa <[email protected]>
After some more thought, I am wondering if the string splitting is still required? If this is intentionally done for docker.io, when a user specified index.docker.io as registry then this creates a new issue by returning an invalid index if a user specifies index.docker.io:
I'm happy to fix that in this PR, I'm just not 100% sure if that was the intention of the Additionally if this is intended for |
Thanks for opening the PR! Let's first check whether it's actually a problem. I am honestly not sure whether it is. The behavior this PR attempts to change is documented in the man pages (see Trying to approach it with a fresh mind, I agree that the "INDEX" which is documented to be the registry is returning the registry as is without stripping off some parts. I'd guess that if there are two registries on the same domain (a.registry.com and b.registry.com) that we'd end up showing it as one. The search code is really old and has been moved over to |
Ah, that's something I didn't have in mind, good catch as that would make it inconsistent. Thinking more about it, in my application (cockpit-podman) we could show our filter options with the same logic as it is applied here, showing registry.fedoraproject.org as fedoraproject.org. A user is not likely to care much about the full qualified domain.
As the Name field still contains the full registry url this might not be an issue. So I'm kind of leaning towards keeping it as is, as I don't like inconsistency between the podman search output and REST output. |
I agree that podman and the REST API should behave the same way. But we can still change it :^) Let's wait for @mtrmac's thoughts. I am very open to change the output as you suggested. |
I’m missing something — which part says that
I don’t know anything about the history; IIRC this is the first time I have seen that. I can trace it back to containers/podman@0d7e6fa , but there isn’t a PR, and I can’t find any record of an earlier conversation. Either way I am very skeptical about the Ideally it would be nice to run an experiment to confirm that trying any of the three-label hostnames would always fail (I haven’t tried), and then we could discount the code path and replace that check just by Yes, the other user of |
To be clear: In general I support the PR, and we should probably drop the |
The examples at the bottom show/indicate this behavior but it is not explicitly mentioned in the text AFAICS. @rhatdan @baude what's your take? It seems we're at a good place to change the |
I would be fine with dropping it, I would also like to drop the STARS OFFICIAL AUTOMATED NAME DISCRIPTION SHOULD be default. |
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, thank you!
@mtrmac PTAL
We can do the remainder in Podman.
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jelly, 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 |
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
@mtrmac: changing LGTM is restricted to collaborators In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Change the default format of `podman search` to only display the name and the description of each image. The index is redundant to the name and consumes a lot of space, and other descriptors (i.e., stars, official, automated) are specific to Docker Hub and also consume a lot space. Users can still use `--format` for displaying the descriptors they want to. Add a `--compatible` flag to offer an easy way to get them back. Also update the man page to account for the behavior and get some fresh data in the examples. Motivated by a recent conversation in libimage: containers/common#802 (comment) Signed-off-by: Valentin Rothberg <[email protected]>
/lgtm |
Searching for images in registry.fedoraproject.org returns
fedoraproject.org as registry in the search results. When relying on the
Index to group results from different registries this is an issue.
Signed-off-by: Jelle van der Waa [email protected]