Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

AndreasBergmeier6176
Copy link
Contributor

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.

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`)
@trent-codecov
Copy link
Contributor

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),
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants