Skip to content

Conversation

@arthanson
Copy link
Collaborator

@arthanson arthanson commented Oct 7, 2025

Fixes: #20496

Refactors and fixes REST paginator checking for MAX_PAGE_SIZE, making it the upper bound.

if MAX_PAGE_SIZE is set:

  • if no limit is set return min(MAX_PAGE_SIZE, PAGINATE_COUNT)
  • if limit set return min(limit, MAX_PAGE_SIZE)
  • if limit = 0 or None return MAX_PAGE_SIZE

if MAX_PAGE_SIZE is not set:

  • if no limit is set return PAGINATE_COUNT
  • if limit is set return limit
  • if limit = 0 return all data

Note: The UI view overrides this if you set the pagination limit dropdown - i.e. if you select in the UI 1000 items and MAX_PAGE_SIZE=100, then 1000 items will still be returned in the view, which I think is correct.

@arthanson arthanson marked this pull request as ready for review October 7, 2025 16:31
@arthanson arthanson requested review from a team and bctiemann and removed request for a team October 7, 2025 16:32
@arthanson arthanson changed the title DRAFT: 20496 make max_page_size upper bound 20496 make max_page_size upper bound Oct 7, 2025
@bctiemann bctiemann merged commit f8c0740 into main Oct 7, 2025
10 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MAX_PAGE_SIZE is not respected correctly on REST API calls

3 participants