-
Notifications
You must be signed in to change notification settings - Fork 669
fix: handle situation where gitlab.com does not return values #1773
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1773 +/- ##
=======================================
Coverage 91.96% 91.97%
=======================================
Files 76 76
Lines 4754 4758 +4
=======================================
+ Hits 4372 4376 +4
Misses 382 382
Flags with carried forward coverage won't be shown. Click here to find out more.
|
ca2e8e0
to
971a617
Compare
971a617
to
4690dc2
Compare
LGTM I'd just like to reproduce #1686 in some tests first with an xfail (e.g. I'll see if I can get responses to match the presence/absence of those headers). Are you ok to wait and rebase @JohnVillalovos (unless you want to take a look at it yourself but you already have a few PRs :D) |
Works for me. Thanks! |
I have #1788 ready for this and I also saw I was being overly pedantic as we're already doing the same with one-liners 😅 : python-gitlab/gitlab/client.py Lines 945 to 959 in c764bee
|
4a17937
to
c308c30
Compare
c308c30
to
4947901
Compare
Thanks. I reviewed and merged #1788. Then rebased this PR. Was surprised that if an |
If a query returns more than 10,000 records than the following values are NOT returned: x.total_pages x.total Modify the code to allow no value to be set for these values. If there is not a value returned the functions will now return None. Update unit test so no longer `xfail` https://docs.gitlab.com/ee/user/gitlab_com/index.html#pagination-response-headers Closes #1686
4947901
to
cb824a4
Compare
I figured that out and added |
If a query returns more than 10,000 records than the following values
are NOT returned:
x.total_pages
x.total
Modify the code to allow no value to be set for these values. If there
is not a value returned the functions will now return None.
https://docs.gitlab.com/ee/user/gitlab_com/index.html#pagination-response-headers
Closes #1686