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

[Bug]: Postgres SSL options are not correctly read from Environment Variables #2524

Open
archiewood opened this issue Sep 11, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@archiewood
Copy link
Member

archiewood commented Sep 11, 2024

Describe the bug

When deploying an app with a postgres connection with no ssl certificates, the sources process fails.

Reported on Slack

Steps to Reproduce

connection.yaml
image

.env
image

I also tested with sslmode=require and without rejectUnauthorized line.

Logs

[ ! ] Error connecting to datasource [sourcename]: self-signed certificate in certificate chain

Workaround

To get around this in the meantime, and get your dev project to pass the build, commenting out the two ssl vars that you provide to Evidence Cloud should do (as the values in your connection.yaml values for these will kick in instead).

i.e copy your vars as usual, but prepend these two with a # , or remove them entirely

# EVIDENCE_SOURCE__postgres__ssl__sslmode="..."
# EVIDENCE_SOURCE__postgres__ssl__rejectUnauthorized="..."
@archiewood archiewood added bug Something isn't working to-review Evidence team to review and removed to-review Evidence team to review labels Sep 11, 2024
@ud3sh
Copy link
Member

ud3sh commented Sep 11, 2024

I don't know if this is still the case anymore but I recall once being able to write a test while that showed boolean env vars set to "false" were being picked up as true.

See https://github.com/evidence-dev/evidence/pull/1993/files

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants