Skip to content

Reduce paging inconsistency #34561

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ChristopherHX
Copy link
Contributor

@ChristopherHX ChristopherHX commented May 28, 2025

This is an paging inconsistency api review, please comment your opinion about the added code comments

  • ctx.SetLinkHeader(int(totalNumOfBranches), listOptions.PageSize) missing for several api endpoints should I add them everywhere?

  • do we want to accept per_page in api?

    • better compatibility with existing keda github_runner
    • Otherwise I am 100% required to create a new provider, since it does not use paging
    • well this would add 20 entries, otherwise someone needs to set maximum to 100 for full GH Compat
  • GetListOptions replaced almost all custom paging parsing of the rest api

  • Should callers that expect page=0 to bypass paging be updated to use Listall constant?

* disallow bypassing configured limits in api
* allow per_page without documenting it
* allow limit for the only endpoint only allowing per_page

This is an paging inconsistency api review, please comment your opinion about the added code comments

* 	ctx.SetLinkHeader(int(totalNumOfBranches), listOptions.PageSize) missing for several api endpoints should I add them everywhere?

* do we want to accept per_page in api?
  * better compatibility with existing keda github_runner
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 28, 2025
@github-actions github-actions bot added modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code labels May 28, 2025
@ChristopherHX ChristopherHX added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label May 28, 2025
@ChristopherHX ChristopherHX added the pr/breaking Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it! label Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code pr/breaking Merging this PR means builds will break. Needs a description what exactly breaks, and how to fix it! type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants