Move DB driver specification out of config and into code #1385
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
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 usemysql+mysqldb
which corresponds to themysqlclient
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.The text was updated successfully, but these errors were encountered: