-
Notifications
You must be signed in to change notification settings - Fork 28
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
Allow for Database options to be set via config #222
base: main
Are you sure you want to change the base?
Conversation
This is especially needed for Postgres 15 where by default users are no longer allowed to write to schema `public`. Being able to set options enables switching to another default schema (e.g. `codecov`)
Thank you for the submission. @scott-codecov will take a look at this sometime soon and we will get this rolling. |
@@ -217,6 +231,7 @@ | |||
"HOST": DATABASE_READ_HOST, | |||
"PORT": DATABASE_READ_PORT, | |||
"CONN_MAX_AGE": CONN_MAX_AGE, | |||
"OPTIONS": ast.literal_eval(DATABASE_READ_OPTIONS), |
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.
Could this be a json.loads
instead here instead?
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.
Sure - would then be a more restricted format, though.
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.
In what sense? Were you hoping to pass in Python literals that can't be encoded as JSON?
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.
Were you hoping to pass in Python literals that can't be encoded as JSON?
Not really. I think I can life with JSON just fine.
Purpose/Motivation
This is especially needed for Postgres 15 where by default users are no longer allowed to write to schema
public
. Being able to set options enables switching to another default schema (e.g.codecov
)Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.