Support limits for offset pagination and define default
What does this MR do?
As part of the migration to keyset pagination, we want to place limits on the maximum offset that can be retrieved through the API for offset pagination. The current default should be set reasonably high, to not impact existing customers, but should also be configurable through the Plan
and PlanLimit
.
This MR introduces a new PlanLimit
column with a default of 50,000, which will be used to restrict offset-based API calls beyond that point, as long as keyset pagination exists for the object type being retrieved (currently only Project
). Since the Plan
are tied to a namespace, for requests that do not fall into a request scope of a Project
, Namespace
, or other object that can be tied back to a specific Plan
, use the limit for the default Plan
.
Related issue: #34565 (closed)
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done