[Pulp-dev] Pagination in Pulp
dawalker at redhat.com
Tue Jun 26 13:57:28 UTC 2018
+1 I agree that we should enable custom page size pagination.
While my initial preference is cursor pagination, given the two use cases
described, we should go with the DRF default of page number pagination.
Associate Software Engineer
On Tue, Jun 26, 2018 at 9:48 AM, Dennis Kliban <dkliban at redhat.com> wrote:
> The user should be able to specify a page size at request time. The user
> should also be able to specify which page they are requesting.
> On Tue, Jun 26, 2018 at 9:31 AM, David Davis <daviddavis at redhat.com>
>> I was looking at the pagination code this morning and there were two
>> things I wanted to discuss.
>> First, there’s no way to override the number of results per request.
>> Instead, page size has to be configured for the whole app. Allowing users
>> to override page size is trivial so I wonder if we should enable it.
>> The second topic is a bit more complex. We currently use cursor based
>> pagination where pages must be fetched sequentially as opposed to the
>> default DRF pagination method of using page numbers. Cursors work great for
>> large data sets as you don’t have to figure out things like the number of
>> The first problem is that in Pulp we parallelize web requests for things
>> like fetching metadata. See our Ansible plugin as an example. If we want
>> to support things like syncing content from one Pulp server to another, we
>> probably have to use offset/page-based pagination for certain endpoints.
>> Another consideration is Katello. In Katello’s UI they show the number of
>> pages and allow users to jump to arbitrary pages or the last page. If we
>> want Katello to stop indexing Pulp data and instead query Pulp directly,
>> we’ll need to allow them to use page numbers somehow.
>>  https://gist.github.com/daviddavis/56a0b86629cd675d57aac61583c01944
>>  https://github.com/pulp/pulp_ansible/blob/master/pulp_an
>> Pulp-dev mailing list
>> Pulp-dev at redhat.com
> Pulp-dev mailing list
> Pulp-dev at redhat.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pulp-dev