-
Notifications
You must be signed in to change notification settings - Fork 123
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
Advanced copy API needs PRN support #3853
Comments
@dralley @ggainey On the copy task we do filter for the domain, but I assume we want a nice error message if there any content is not part of domain. I'm also assuming doing an extra count query is our cheaper option:
Wdyt? |
Nice error messages are a bonus but not necessarily a requirement - nobody is complaining about the current state of things after all, and that would be an issue with the current code too yeah? Of course, it would be nice :) There's a few different ways you could structure it and I'm not sure which is cheapest. e.g. options might be
or
Sidenote: how much are we just "assuming" that these are too expensive to do in the viewset? |
True. The current code does identify the wrong domain href, but only the first, so it's not really too different in terms of usefulness for the user. But on the task context we can afford the better message for failures.
I'm 100% assuming. Do you have some estimates for safe numbers we could test? I can sync up a big repo on-demand and do a request with lots of content. |
I have a (very vague) memory of running into timeout issues in the view when testing with a Large Number of HREFs - but it would have been literally years ago, I may be misremembering. The katello usecase does result in some Very Large lists - but it's def worth getting some actual results. Being able to make the decision with a single call makes a huge difference - in my head, it was going to cost one db-access per PRN, which would be Bad. Limiting the fields-being-returned from the queries suggested by @dralley will help some as well, both performance but especially memory. |
Katello implemented "chunked copying" with our use of the advanced copy API, and that is capped at 10,000 hrefs. We only use the advanced copy API with dependency solving. Otherwise we use the normal add and remove content APIs. |
* Add cross_domain validation for PRNs on copy API serializer. The new validation doesn't capture the first href/prn that failed anymore, as it relies on querying distinct domains in the bulk of references. Fixes: pulp#3853
* Add cross_domain validation for PRNs on copy API serializer. The new validation doesn't capture the first href/prn that failed anymore, as it relies on querying distinct domains in the bulk of references. Fixes: pulp#3853
* Add cross_domain validation for PRNs on copy API serializer. The new validation doesn't capture the first href/prn that failed anymore, as it relies on querying distinct domains in the bulk of references. Fixes: pulp#3853
* Add cross_domain validation for PRNs on copy API serializer. The new validation doesn't capture the first href/prn that failed anymore, as it relies on querying distinct domains in the bulk of references. Fixes: pulp#3853
* Add cross_domain validation for PRNs on copy API serializer. The new validation doesn't capture the first href/prn that failed anymore, as it relies on querying distinct domains in the bulk of references. Fixes: pulp#3853
* Add cross_domain validation for PRNs on copy API serializer. The new validation doesn't capture the first href/prn that failed anymore, as it relies on querying distinct domains in the bulk of references. Fixes: pulp#3853
* Add cross_domain validation for PRNs on copy API serializer. The new validation doesn't capture the first href/prn that failed anymore, as it relies on querying distinct domains in the bulk of references. Fixes: pulp#3853
* Add cross_domain validation for PRNs on copy API serializer. The new validation doesn't capture the first href/prn that failed anymore, as it relies on querying distinct domains in the bulk of references. Fixes: pulp#3853
* Add cross_domain validation for PRNs on copy API serializer. The new validation doesn't capture the first href/prn that failed anymore, as it relies on querying distinct domains in the bulk of references. Fixes: pulp#3853
* Add cross_domain validation for PRNs on copy API serializer. The new validation doesn't capture the first href/prn that failed anymore, as it relies on querying distinct domains in the bulk of references. Fixes: pulp#3853 fixup: review changes fixup: review changes on class type validation
* Add cross_domain validation for PRNs on copy API serializer. The new validation doesn't capture the first href/prn that failed anymore, as it relies on querying distinct domains in the bulk of references. Fixes: #3853 fixup: review changes fixup: review changes on class type validation
As part of the effort to move Pulp APIs over to "PRNs" for various reasons (see pulp/pulpcore#5766), we need to update the advanced copy API, which unlike the other APIs didn't inherit support from pulpcore because it's custom.
The two places that definitely need updates are:
https://github.com/pulp/pulp_rpm/blob/main/pulp_rpm/app/viewsets/repository.py#L764C1-L765C55
https://github.com/pulp/pulp_rpm/blob/main/pulp_rpm/app/serializers/repository.py#L582-L583
The text was updated successfully, but these errors were encountered: