-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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: deprecate autoincrement primary key in hydra_client #2784
feat: deprecate autoincrement primary key in hydra_client #2784
Conversation
This is the first step towards resolving ory#2781. The issue will be resolved when we remove the deprecated column.
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.
Looking good :)
Are the test passing for you locally? |
If you need help with the DB tests LMK |
The tests are passing most of the time, but I randomly get this[1] error with ~5% probability. Is this test randomly failing a known issue? [1]: |
I've just added this1 test to make sure that the migrations result in a table with the correct columns. Should I add more tests, e.g. to make sure that the backfilled UUIDs are valid UUIDv4? |
Codecov Report
@@ Coverage Diff @@
## v2.x #2784 +/- ##
=======================================
Coverage ? 52.87%
=======================================
Files ? 236
Lines ? 14185
Branches ? 0
=======================================
Hits ? 7500
Misses ? 6053
Partials ? 632 Continue to review full report at Codecov.
|
I think that would make sense! It would also be good to ensure that new client creations use the new UUID key format. You could test this by just creating a client and also fetching it.
Yes, this is a known issue /cc @Benehiko @flavioleggio |
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.
LGTM :)
@grantzvolsky I changed base to v2.x which we will use to have all these migration changes so that we can still do releases in case of bug fixes and maintenances :) |
This patch deprecates the hydra_client.pk autoincrement primary key in favour of a new UUID primary key column. The values of the new column are generated in application code instead of being generated in the database.
This is the first step towards resolving #2781. The issue will be resolved when we remove the deprecated column.
CAUTION: The patch includes a database migration that must be applied offline while simultaneously updating all hydra instances to the latest version.
Related issue(s)
#2781
@aeneasr
Checklist
contributing code guidelines.
vulnerability. If this pull request addresses a security. vulnerability, I
confirm that I got green light (please contact
security@ory.sh) from the maintainers to push
the changes.
works.
Further Comments