-
Notifications
You must be signed in to change notification settings - Fork 977
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
feat: refactor credentials fetching #3183
Conversation
6639d4d
to
ed9355e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice changes, I think this simplifies the code a lot!
It looks like you're running into ordering issues: https://github.com/ory/kratos/actions/runs/4492557398/jobs/7902651309?pr=3183#step:15:12872 Every database handles "deafult" sorting differently. Since we don't really want to sort the dataset (as that is slow in RBR tables), my recommendation is to either sort the result set (with Go) around here: https://github.com/ory/kratos/pull/3183/files#diff-41d54e67508bfcb98af6522993d007de47a74ada2cf8426fc871c8a8a8babaeeR561 |
Codecov Report
@@ Coverage Diff @@
## master #3183 +/- ##
==========================================
+ Coverage 77.62% 77.65% +0.02%
==========================================
Files 317 317
Lines 20046 20089 +43
==========================================
+ Hits 15561 15600 +39
- Misses 3292 3295 +3
- Partials 1193 1194 +1
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally speaking i think this looks really good. One issue though is how we now list identities. We had several complains from e.g. Wikia about list performance before and we were able to resolve those with EagerPreload. This patch will regress on those improvements and reintroduce those issues. See: #1412
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice
This change revamps the way we fetch identity credentials. We no longer need most of the helper fields for gobuffalo/pop inside the
Identity
andCredentials
structures, and we collect all the credentials in one joined query rather than using pop'sEagerPreload
functionality.