Skip to content
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

fix: make pagination work for empty responses #1043

Merged
merged 3 commits into from
Jul 9, 2021
Merged

Conversation

alexander-fenster
Copy link
Contributor

I found that some APIs could return an empty list of resources but non-empty next page token. The existing logic would stop the auto pagination in this case but this is incorrect since there are more resources (as we still have the next page token).

Let's keep querying for the next page even if we got an empty resources list but we have a next page token.

@alexander-fenster alexander-fenster requested a review from a team as a code owner June 29, 2021 17:33
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jun 29, 2021
Copy link
Contributor

@summer-ji-eng summer-ji-eng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bcoe bcoe added the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 2, 2021
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jul 2, 2021
@alexander-fenster alexander-fenster added the automerge Merge the pull request once unit tests and other checks pass. label Jul 9, 2021
@gcf-merge-on-green gcf-merge-on-green bot merged commit cbe2d3f into master Jul 9, 2021
@gcf-merge-on-green gcf-merge-on-green bot deleted the pag branch July 9, 2021 23:48
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants