-
Notifications
You must be signed in to change notification settings - Fork 669
Regression on calling len() on GitlabList objects since switching to keyset pagination by default #1114
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
Comments
#1110 introduced this code change to reflect the new pagination API of Gitlab : https://docs.gitlab.com/ce/api/README.html#keyset-based-pagination But maybe this should not be the new value by default ? |
Thanks for the report. I guess this is yet another testcase for the functional tests. Gitlab doesn't seem to include headers for keyset pagination |
Offset pagination doesn't work, if you have over 50.000 projects and it's recommended by GitLab. I will look at this upstream and revert the default for right now: https://gitlab.com/gitlab-org/gitlab/-/issues/220903 |
@Lucas-C Reverted. |
@Lucas-C Sadly GitLab doesn't want to continue offering the total items in keyset pagination. What do you think? @bufferoverflow |
I think there is a small typo here, as I don't quite understand :) I'm fine with this solution. Overall, I'd be very happy with any solution that is backward compatible, meaning being able to call |
I've added it already 😉 e71fe16#diff-4a8817e452ed84e4d3b53c2523dac89aR424 |
Wonderful, thanks ! |
This was fixed in #1773. The Feel free to reopen if it's still an issue after 3.0.0 :) |
Description of the problem, including code/CLI snippet
Pull request #1110 that has been released in v2.3.0 yesterday introduced a regression on a specific scenario:
when calling
len()
on the output ofGitlab().projects.list(as_list=False)
.Expected Behavior
Being able to call
len()
on the iterator returned byGitlab().projects.list(as_list=False)
Actual Behavior
Minimal reproduction code:
Output:
Workaround:
Specifications
The text was updated successfully, but these errors were encountered: