-
Notifications
You must be signed in to change notification settings - Fork 429
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(db): Fix read replica strategy #3426
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Do we need to add a default setting value for the folks that have read replicas enabled? |
Uffizzi Preview |
The default is |
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.
I'm a little confused as to why the .value
was added in the first place. I vaguely remember thinking it was necessary based on something.
̶I̶t̶ ̶s̶h̶o̶u̶l̶d̶ ̶b̶e̶ ̶ |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3426 +/- ##
=======================================
Coverage 95.92% 95.92%
=======================================
Files 1090 1090
Lines 33949 33949
=======================================
Hits 32564 32564
Misses 1385 1385 ☔ View full report in Codecov by Sentry. |
The test suite was essentially monkey patching the settings module to whatever it wanted, so the logic was sound when the setting was monkeypatched to be |
(cherry picked from commit d63a289)
Thanks for submitting a PR! Please check the boxes below:
pre-commit
to check lintingdocs/
if required so people know about the feature!Changes
Fixes the logic to look for the actual enum instead of the value of the enum.
How did you test this code?
Updated the tests but also ran the API locally with
REPLICA_DATABASE_URLS
configured to point at a replicated database and confirmed that it worked as expected.