- Notifications
You must be signed in to change notification settings - Fork923
chore: include merged claims into the database#15570
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Merging happens before IDP sync. Storing this will makesome SQL queries much simplier
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.
Should this not also require updated tests also incoderd/idpsync
?
Emyrk commentedNov 18, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
The real tests are in this PR:#15525 There is only a debug endpoint that returns this information today, and I did not want to add tests for a debug endpoint. So it requires more effort than it's worth imo to fully test this feature outside of the PRs I have in flight. Writing the queries to use this data, I realized merging the fields simplifies a lot and makes claims more correct. |
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.
Stamp 👍 in combination with test improoooovements in#15525
4fedc7c
intomainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Merging happens before IDP sync. Storing this will make some SQL queries much simplier.
Currently the SQL queries look like this:
coder/coderd/database/queries/user_links.sql
Lines 65 to 97 in664e734
Query is duplicated over both fields with a union. This query is also incorrect, as merged claims do not properly merge arrays of duplicated fields.