-
Notifications
You must be signed in to change notification settings - Fork 115
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
As a user, I want to know which repositories some content is in #2865
Comments
as of today it is possible to list all repo_versions(and publications) that contain a certain content or list of content
|
oh neat, I didn't realize the repository version api existed. I was looking at /<repo_href>/repository-versions/ |
yeah our bad - we have no docs on this :/ |
with the existing implementation we could add a query param ?version=latest which would filter the latest repo version and show it instead of showing all of them. Distribution search can be based of the repo_version search. |
Adding a
|
I think our users would more or less appreciate all of these options, including: (a) Adding the The distributions endpoint (c) could be a little trickier due to some distributions have publications, and some don't, so for this to be implemented in pulpcore it would have to support both types. Totally do-able, just a bit more to it. I want (a) because it's really easy, but then it requires the PoC Related Fields, which is a non-trivial piece of work. I think we should avoid tying this need up in that, so I believe the ideal path is to implement (b) and (c) as separate tickets. This ticket could be for one of them, and we'd need another ticket for the other. For (b) it would be nice to have the ability to search against latest or not. For (c) it shouldn't take a "latest" option since the distribution already encapsulates that feature. Distributions can point to a repo which implies "latest" or a specific repo_version or publication, which implies "just this one". Given all ^, I'm happy to defer to @newswangerd for whichever one you want. A short aside on (a), maybe positioning it as |
At the pulpcore meeting, we want to pursue using this ticket for implementing (b) and @newswangerd will file another ticket for (c) and @newswangerd or galaxy_ng will implement both? |
I'll file another ticket for distributions. We can implement both |
The reason we have implemented (a) and not (b) because the content's presence and distribution comes from a repo version specifically.
And even if you're interested only in the latest repo version, there is no guarantee that by the time the user will decide to consume/use/copy/etc content from that repo 1) that repo will not have other versions created so the latest won't be latest you searched against anymore 2) the new latest might not have that content anymore; that's why it is probably safer to search through repo versions because they are immutable and content will be there until the repo version exists. |
@ipanova thanks for such an informative post. Given that is the recommendation to focus on developing #2828 ? I still think from a usability perspective users want to search from repos and distributions directly, but given the concerns you raise a clear path to doing that is not immediately clear to me. I guess one of the concerns is that if repo endpoints start returning serialized objects that aren't repos (for example) the endpoint is now polymorphic from an openAPI perspective. That being said it kind of would be anyway if we implement #2828 Just some rambling thoughts on this. More conversation is welcome. |
@ipanova Let me see if I can summarize your objections to this:
1, 2 and 3 are great points. Since the content can be distributed from any version in the repository it doesn't make sense to limit your search to just the latest on the repositories endpoint. I'm not 100% certain 3 matters as much. The best any REST API can do is communicate to the client what the state of the system is in right now. If I make a followup call to the system to request another piece of data there's no guarantee that the object still exists, that the object is the same as it was before, the the server is running, the authentication credentials are still valid, etc. The current endpoint for repository versions has this problem too. The repo versions are immutable, but they're also deletable. There's no guarantee the version exists if I make a followup call to grab my content from it. With all this in mind, lets revisit some use cases from for this:
As you pointed out, (b) doesn't make any sense for U1. The content can be distributed from any version of the repository, so knowing if it's in latest doesn't help you make that determination anymore, so it would be better to make a call to the repo versions api endpoint. U2 is a little more complicated. In the ansible world, clients can only download content from a distribution. If we just implement (a), to determine where my content is available, I would need to request the list of repository versions, and then figure out which repository versions are part of a distribution I have access to. Since distributions are just pointers to repository versions, it seems like it would still make sense to provide a Providing a I guess this is a long winded way of saying I really want us to implement (c). Limiting your search to just the latest version on a repo doesn't make as much sense, so (a) and (b) might not be necessary, but I would still love to have some content filtering capabilities on the repository endpoint. cc @bmbouter |
Is the question about content in a Distribution controversial at this point? |
Ah, maybe I misunderstood the comment. I just added #2952 to track the distribution filter. |
I don't think I will be able to attend in time our today's meeting, so let me leave here some of my thoughts.
In my previous 2 comments I was mostly expressing my concerns over (b) as the main API endpoint of reference for repo content search. (a) and (c) make sense to me.
I am still not sure I am sold to this. If I have a malicious content I plan to remove it.
I am not very much against providing EDIT: well, I do see value for the sake of convenience and generic informative call, to not scroll through the X number of pages of all repo_version results.
yep +1 on (c)
|
We would really like to have this feature. And we'd prefer to filter repositories (as opposed to repo versions) by content as we don't expose repo versions to our users. Our use of Pulp is that users simply create, publish, and distribute repos so they have no concept of repo versions. |
Is your feature request related to a problem? Please describe.
Content in pulp is distributed through repositories and distributions. If a client knows the name or HREF for some content, there's currently no way of know which repositories it's available in without looking in each repository.
Describe the solution you'd like
Add a
?content_in_latest=
filter to the distributions and repositories APIs that allow users to specify a content HREF and get a list of repositories or distributions that contain the selected content.Describe alternatives you've considered
Are there any existing ways to do this in pulp?
Additional context
This is needed for repository management in galaxy_ng
The text was updated successfully, but these errors were encountered: