You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.
This has been discussed upstream and more recently here, and looks like this won't be addressed any time soon. Since MagicStack/asyncpg#419 AsyncPg supports these types of connection string.
The way I got around this now is defining my own PostgresSettings class, removing the pydantic validation all together. This is fine but I'm wondering if it could make sense to add an extra env var like TIFEATURES_CLOUDSQL which we could set to True, and then that would bypass the pydantic validation?
Thanks!
The text was updated successfully, but these errors were encountered:
This is fine but I'm wondering if it could make sense to add an extra env var like TIFEATURES_CLOUDSQL which we could set to True, and then that would bypass the pydantic validation?
I kinda don't really like adding something specific for Cloud provider use case, and would prefer if we can push the fix upstream or do like you do: customize your own application!
Uh oh!
There was an error while loading. Please reload this page.
When using GCP database instances with Cloud Run functions, the connection string of the database includes unix sockets, i.e.:
Passing this as
DATABASE_URL
returns a validation error coming from Pydantic.PostgresDsn -tifeatures/tifeatures/settings.py
Line 71 in 257246a
This has been discussed upstream and more recently here, and looks like this won't be addressed any time soon. Since MagicStack/asyncpg#419 AsyncPg supports these types of connection string.
The way I got around this now is defining my own
PostgresSettings
class, removing the pydantic validation all together. This is fine but I'm wondering if it could make sense to add an extra env var likeTIFEATURES_CLOUDSQL
which we could set to True, and then that would bypass the pydantic validation?Thanks!
The text was updated successfully, but these errors were encountered: