fix(postgres): Support TLS and query params in pg_url#565
fix(postgres): Support TLS and query params in pg_url#565moleus wants to merge 2 commits intogetsentry:mainfrom
Conversation
Be aware that this support is still experimental and subject to change. I would not recommend using it in production yet. |
evanh
left a comment
There was a problem hiding this comment.
Could you also add a test for this? Otherwise it's a solid change.
|
Added tests. Unsure of the standard style, so I put them next to the source function. |
Are there any production ready alternatives in Self-hosted Sentry for task processing other than taskbroker? As far as I can see Celery is gradually removed from sentry source code and taskworkers are enabled by default - getsentry/sentry#99374 |
Oh, sorry, do you mean support of RDS in taskbroker? Then it totally makes sense 🙏 |
Yes, only the postgres drive is the experimental part. Taskbroker also has a sqlite storage adapter that is fully supported right now. |
I tried to use taskbroker with AWS RDS Postgres as a storage.
First, i got an error when tried to use it with
DB_URL=<host>?sslmode=require:I realised, that there is simple concatenation
let conn_str = url.to_owned() + "/" + database_name;.So
<host>?sslmode=requireand db_name becomes<host>?sslmode=require/postgresThen I set
TASKBROKER_PG_DATABASE_NAME=sentry?sslmode=requireand got error:This PR adds TLS feature for sqlx lib. And fixes conn opts construction - parse url with queries into options first and then add database field