daviddavis wrote:
A few questions. Should the pagination style be configurable? I'd say no for now (but we can address when a stakeholder needs it to be).
It would be challenging for Pulp to prevent this configuration in the sense that DRF looks for its settings in the django file and we couldn't stop users from customizing it. We could manually override this on every model, or through the ancestor classes and then the default wouldn't apply, but I'm not in favor of that.
I see it as a good thing that users can configure this because it reinforces the idea that "Pulp is just plain DRF". I think we need to communicate to users that changing these would break the published bindings and they could rebuild them locally.
Should limit and offset be required and if not what should the default values be? For default values of course 0 makes sense for offset. For limit, I think we should go as small as possible because some resources might be quite large. Also, API users probably want smaller sizes while integrated apps (galaxy, katello, etc) prefer larger and since it's easier for machines to specify a limit. I think a smaller limit makes sense, I'd say 20 or 50.
I agree. At least one integrator wanted a default page size limit so I'm +1 on that. https://www.redhat.com/archives/pulp-dev/2019-August/msg00030.html
I think offset=0 by default so we can probably not specify that one. We currently have a page size of 100 here
Do we want to change the page size?
Switch Pagination default to LimitOffset Style
The previous pagination was Page ID style and used a custom class from Pulp to do so. This switches the default pagination class to a limit offset style by default instead.
https://pulp.plan.io/issues/5324 closes #5324