Skip to content

Keyset pagination on primary key

Andreas Brandl requested to merge ab/keyset-pagination-on-id into master

What does this MR do?

This MR adds keyset pagination for the API REST endpoint for projects. It is only available when ordering by id and uses id_after, id_before filters to provide a link to the next page.

The goal of this change is just to provide the corresponding pagination header with a link to the next page. The used filters id_after, id_before are already available.

This had been reverted before (see #37919 (closed)). The original MR was !19623 (merged).

This MR extends the original MR by a few tweaks:

  • HTTP/405 in case keyset pagination is unavailable
  • Maximum page size is 100 now and aligns with offset pagination
  • Feature flag is enabled by default
  • Changelog fix
  • Rebased onto the refactoring in !21130 (merged).

Related MRs/Issues are:

Builds upon the refactoring in !21130 (merged)

Screenshots

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by 🤖 GitLab Bot 🤖

Merge request reports