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(common): pagination must support empty pages #11937

Merged
merged 2 commits into from
Jun 22, 2023

Conversation

coryan
Copy link
Contributor

@coryan coryan commented Jun 21, 2023

Some services return empty pages with a non-empty pagination token. Our code would stop such iterations immediately. The correct behavior is to retrieve the next page until some non-empty range is returned.

Fixes #11936


This change is Reviewable

Verified

This commit was signed with the committer’s verified signature.
coryan Carlos O'Ryan
Some services return empty pages with a non-empty pagination token. Our
code would stop such iterations immediately. The correct behavior is to
retrieve the next page until some non-empty range is returned.
@codecov
Copy link

codecov bot commented Jun 21, 2023

Codecov Report

Patch coverage: 90.90% and project coverage change: -0.01 ⚠️

Comparison is base (ceacd6b) 93.67% compared to head (b5ab140) 93.66%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11937      +/-   ##
==========================================
- Coverage   93.67%   93.66%   -0.01%     
==========================================
  Files        1838     1838              
  Lines      166694   166745      +51     
==========================================
+ Hits       156143   156185      +42     
- Misses      10551    10560       +9     
Impacted Files Coverage Δ
google/cloud/internal/pagination_range_test.cc 94.60% <90.56%> (-1.14%) ⬇️
google/cloud/internal/pagination_range.h 100.00% <100.00%> (ø)

... and 7 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@coryan coryan marked this pull request as ready for review June 21, 2023 23:22
@coryan coryan requested a review from a team as a code owner June 21, 2023 23:22

Verified

This commit was signed with the committer’s verified signature.
coryan Carlos O'Ryan
@coryan coryan enabled auto-merge (squash) June 22, 2023 00:49
@coryan coryan merged commit 284eadb into googleapis:main Jun 22, 2023
@coryan coryan deleted the fix-common-support-empty-pages branch June 22, 2023 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pagination APIs can stop too early
2 participants