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

DM-45138: Move PostgreSQL URL manipulation into type #216

Merged
merged 1 commit into from
Jul 16, 2024
Merged

Conversation

rra
Copy link
Member

@rra rra commented Jul 16, 2024

Create a new EnvAsyncPostgresDsn type that modifies the URL based on environment variable settings set by tox-docker, avoiding the need for an explicit validator and making it easier to lift this code into Safir.

Due to a bug in the type system of Pydantic, this does not work in conjunction with the pattern to convert URLs into strings, so undo that change and keep the URL as a Pydantic MultiHostUrl object. This requires explicitly converting it to a string in a few places.

Create a new EnvAsyncPostgresDsn type that modifies the URL based
on environment variable settings set by tox-docker, avoiding the
need for an explicit validator and making it easier to lift this
code into Safir.

Due to a bug in the type system of Pydantic, this does not work in
conjunction with the pattern to convert URLs into strings, so undo
that change and keep the URL as a Pydantic MultiHostUrl object.
This requires explicitly converting it to a string in a few places.
@rra rra merged commit 11a35bc into main Jul 16, 2024
3 checks passed
@rra rra deleted the tickets/DM-45138 branch July 16, 2024 20:21
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.

1 participant