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

List token based pagination #1041

Merged
merged 35 commits into from
Oct 5, 2022
Merged

List token based pagination #1041

merged 35 commits into from
Oct 5, 2022

Conversation

markphelps
Copy link
Collaborator

@markphelps markphelps commented Sep 22, 2022

Adds the ability to use token-based pagination instead of limit/offset pagination. Fixes: #936

Changes

  • Adds page_token field to all list request types
  • Deprecates offset field
  • Adds total_count and next_page_token fields to all list response types to aide in pagination with page token
  • Prefers page_token over offset when making list* requests
  • Adds zap.Logger to the Store type for future logging in the storage layer if necessary
  • Changes exporter to use token-based pagination

TODO (Pre-Deploy)

  • Update and publish new RPC clients with changes (Go/Ruby)
  • Update API docs
  • Add docs about pagination on the main docs site

* main:
  Update Changelog
  Bump sass from 1.54.9 to 1.55.0 in /ui (#1040)
  Bump @playwright/test from 1.25.2 to 1.26.0 in /ui (#1039)
  Bump eslint from 8.23.0 to 8.23.1 in /ui (#1037)
  Bump eslint-plugin-vue from 9.4.0 to 9.5.1 in /ui (#1034)
  Bump @babel/preset-env from 7.19.0 to 7.19.1 in /ui (#1033)
  Bump @babel/core from 7.19.0 to 7.19.1 in /ui (#1032)
  Fix clone icons (#1038)
  Bump buefy from 0.9.21 to 0.9.22 in /ui (#1022)
  Mv config internal (#1036)
  Filtered GitHub webhooks (#1018)
* main:
  Bump golangci-lint to 1.49 (#1042)
@codecov-commenter
Copy link

codecov-commenter commented Sep 23, 2022

Codecov Report

Merging #1041 (936da0a) into main (9296bda) will decrease coverage by 0.56%.
The diff coverage is 76.47%.

@@            Coverage Diff             @@
##             main    #1041      +/-   ##
==========================================
- Coverage   81.40%   80.83%   -0.57%     
==========================================
  Files          17       17              
  Lines        1828     1915      +87     
==========================================
+ Hits         1488     1548      +60     
- Misses        265      283      +18     
- Partials       75       84       +9     
Impacted Files Coverage Δ
server/flag.go 75.00% <66.66%> (-7.36%) ⬇️
server/rule.go 73.07% <68.00%> (-5.50%) ⬇️
server/segment.go 75.00% <68.00%> (-7.00%) ⬇️
internal/ext/exporter.go 86.11% <100.00%> (+1.26%) ⬆️
rpc/flipt/validation.go 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@markphelps markphelps changed the title WIP: List pagination List token based pagination Oct 3, 2022
@markphelps markphelps marked this pull request as ready for review October 3, 2022 20:39
Copy link
Member

@GeorgeMac GeorgeMac left a comment

Choose a reason for hiding this comment

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

This looks great. Just a handful of take it or leave it json suggestions.

storage/sql/common/flag.go Outdated Show resolved Hide resolved
storage/sql/common/flag.go Outdated Show resolved Hide resolved
storage/sql/common/rule.go Outdated Show resolved Hide resolved
storage/sql/common/rule.go Outdated Show resolved Hide resolved
storage/sql/common/segment.go Outdated Show resolved Hide resolved
storage/sql/common/segment.go Outdated Show resolved Hide resolved
@markphelps markphelps enabled auto-merge (squash) October 5, 2022 18:08
@markphelps markphelps merged commit 301ee60 into main Oct 5, 2022
@markphelps markphelps deleted the list-pagination branch October 5, 2022 18:13
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.

Update to use token based pagination for forward compatability
3 participants