-
Notifications
You must be signed in to change notification settings - Fork 636
feat(gitlab): implemented keyset pagination for gitlab #8529 #8572
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: VASHISTH Chandramouli <[email protected]>
Is |
Thanks for bringing this up! I’ve updated the code to gate keyset by server version (≥16.5) and fallback to offset otherwise. Project members endpoints keep their existing offset behavior. This preserves compatibility with CE 11–16.4 while avoiding offset-cap failures on newer instances. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for your contribution.
Thanks for the review. I hit a typecheck error: Fix: Declared and reused a single apiVersion variable sourced from the client. |
Hi, you may run the following command to fix the golangci-lint error:
|
pr-type/bug-fix
,pr-type/feature-development
, etc.Summary
Fix GitLab Users collection hitting offset pagination limits by adding keyset pagination.
This PR updates the GitLab
CollectAccounts
subtask to avoidmax offset
errors when collecting large user sets:/api/v4/users
(
pagination=keyset&order_by=id&sort=asc&per_page=N&id_after=<last_id>
) and do not sendpage
.(
/projects/:id/members[/all]
) which typically remain under offset caps per project./members/all
vs/members/
for < v13.11).id
to advance the keyset cursor safely.gitlab_api_users
).Why: Some instances enforce strict offset caps (e.g., 50k), causing
offset pagination is restricted
errors when fetching Users. Keyset pagination removes the offset and enables full retrieval.Risk/Compatibility:
Does this close any open issues?
Closes 8529 ([Bug][GitLab] Pagination not working Again)
Screenshots
N/A
Other Information