- Notifications
You must be signed in to change notification settings - Fork676
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
codecov-commenter commentedDec 22, 2021 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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
to971a617
CompareUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
971a617
to4690dc2
CompareLGTM 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 inc764bee
|
4a17937
toc308c30
Comparec308c30
to4947901
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 valuesare NOT returned: x.total_pages x.totalModify the code to allow no value to be set for these values. If thereis 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-headersCloses#1686
4947901
tocb824a4
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