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: use keyset pagination list identities #3565

Merged
merged 3 commits into from
Oct 11, 2023

Conversation

alnr
Copy link
Contributor

@alnr alnr commented Oct 9, 2023

https://github.com/ory-corp/cloud/issues/5412

I'd consider this a MVP/stop-gap solution to the immediate problem. The code in ListIdentities needs an overhaul. Since removal of the query builder in #3526, the code is constructed via printf and hard to read 😞.

Also, the assortment of pagination packages in ory/x are wholly confusing 😢

Needs ory/x#729

@alnr alnr force-pushed the keysetpagination-list-identities branch 2 times, most recently from c689d3c to fe52c87 Compare October 9, 2023 15:29
@codecov
Copy link

codecov bot commented Oct 9, 2023

Codecov Report

Merging #3565 (32b6492) into master (9eff0f3) will increase coverage by 0.01%.
Report is 4 commits behind head on master.
The diff coverage is 85.26%.

❗ Current head 32b6492 differs from pull request most recent head f265aad. Consider uploading reports for the commit f265aad to get more accurate results

@@            Coverage Diff             @@
##           master    #3565      +/-   ##
==========================================
+ Coverage   78.10%   78.12%   +0.01%     
==========================================
  Files         341      341              
  Lines       22820    22882      +62     
==========================================
+ Hits        17824    17876      +52     
- Misses       3654     3661       +7     
- Partials     1342     1345       +3     
Files Coverage Δ
driver/registry.go 34.21% <100.00%> (ø)
driver/registry_default.go 84.59% <100.00%> (ø)
identity/identity.go 88.18% <100.00%> (+0.21%) ⬆️
identity/manager.go 74.42% <ø> (-0.69%) ⬇️
identity/test/pool.go 99.56% <100.00%> (+<0.01%) ⬆️
selfservice/flow/login/hook.go 87.82% <100.00%> (ø)
x/http_secure_redirect.go 87.36% <100.00%> (ø)
persistence/sql/persister.go 72.81% <91.66%> (ø)
selfservice/flow/registration/hook.go 72.84% <75.00%> (ø)
x/pagination.go 76.00% <71.42%> (-24.00%) ⬇️
... and 2 more

... and 2 files with indirect coverage changes

@alnr alnr marked this pull request as ready for review October 9, 2023 17:02
@alnr alnr self-assigned this Oct 9, 2023
identity/handler_test.go Outdated Show resolved Hide resolved
identity/test/pool.go Outdated Show resolved Hide resolved
internal/driver.go Show resolved Hide resolved
x/pagination.go Show resolved Hide resolved
identity/identity.go Show resolved Hide resolved
Copy link
Member

@aeneasr aeneasr left a comment

Choose a reason for hiding this comment

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

Two things regarding tests

identity/handler_test.go Outdated Show resolved Hide resolved
identity/test/pool.go Show resolved Hide resolved
Copy link
Member

@zepatrik zepatrik left a comment

Choose a reason for hiding this comment

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

Nice, just some minor details apart from what the others already pointed out 👍

go.mod Outdated Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
identity/identity.go Show resolved Hide resolved
persistence/sql/identity/persister_identity.go Outdated Show resolved Hide resolved
persistence/sql/identity/persister_identity.go Outdated Show resolved Hide resolved
x/pagination.go Show resolved Hide resolved
@alnr alnr force-pushed the keysetpagination-list-identities branch 2 times, most recently from 7931e33 to 225a3c0 Compare October 10, 2023 11:22
@alnr alnr force-pushed the keysetpagination-list-identities branch from 225a3c0 to f265aad Compare October 11, 2023 09:42
@alnr alnr enabled auto-merge (rebase) October 11, 2023 11:11
@alnr alnr merged commit e16fed1 into master Oct 11, 2023
28 checks passed
@alnr alnr deleted the keysetpagination-list-identities branch October 11, 2023 12:16
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.

4 participants