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

Move DB driver specification out of config and into code #1385

Open
melange396 opened this issue Feb 8, 2024 · 0 comments
Open

Move DB driver specification out of config and into code #1385

melange396 opened this issue Feb 8, 2024 · 0 comments
Assignees
Labels
api change affect the API and its responses code health readability, maintainability, best practices, etc dependencies Pull requests that update a dependency file devops building, running, deploying, environment stuff, handy utils, repository-related, engineer QoL, etc mysql mysql database related

Comments

@melange396
Copy link
Collaborator

In our API server, the database driver/adapter for SQLAlchemy is specified as part of a URI. Specifically, it is in the "scheme" segment of the URI (what i typically think of as the "protocol", the part before the ://). Currently we use mysql+mysqldb which corresponds to the mysqlclient dialect.

In the server code, it is read from the environment here. It is specified in CI and in the development Makefile, but in prod, this comes from the "vault" in delphi-ansible-web. We should not leave this up to a configuration parameter which can be hidden inside an encrypted and somewhat inaccessible location, but instead do it one place in the code for consistency and transparency.

@melange396 melange396 added dependencies Pull requests that update a dependency file api change affect the API and its responses code health readability, maintainability, best practices, etc devops building, running, deploying, environment stuff, handy utils, repository-related, engineer QoL, etc mysql mysql database related labels Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api change affect the API and its responses code health readability, maintainability, best practices, etc dependencies Pull requests that update a dependency file devops building, running, deploying, environment stuff, handy utils, repository-related, engineer QoL, etc mysql mysql database related
Projects
None yet
Development

No branches or pull requests

2 participants