Skip to content

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

Open
@melange396

Description

@melange396

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    api changeaffect the API and its responsescode healthreadability, maintainability, best practices, etcdependenciesPull requests that update a dependency filedevopsbuilding, running, deploying, environment stuff, handy utils, repository-related, engineer QoL, etcmysqlmysql database related

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions