Skip to content

Redesign database username handling #1191

@akrherz

Description

@akrherz

(It is always fun to dog-food your own software and realize how bad of a programmer one is)...

Presently, pyiem.database.get_dbconnstr does a lot of "magic" without any consideration of environment variables to control how the database user is guessed, when not provided. Well, when pyiem is called from external software, this isn't a huge deal as developers can pass a user= parameter. The issue is when pyiem itself calls the API internally, this has no knobs to control and only works if one of the hard-wired USERNAME_MAPPER hits. We can do better than this, maybe.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions