evidence-dev / evidence

Business intelligence as code: build fast, interactive data visualizations in pure SQL and markdown
https://evidence.dev
MIT License
4.22k stars 200 forks source link

EVIDENCE_SOURCE__<source-name>__ssl__rejectUnauthorized is always resolved to true up during `build sources` #1511

Open ud3sh opened 8 months ago

ud3sh commented 8 months ago

Steps To Reproduce

See slack thread in troubleshooting https://evidencedev.slack.com/archives/C06DG07QQNR/p1705699804790669

This issue occurs on cloud - and @archiewood mentioned on the thread that he was able to reproduce it locally passing these envars

ud3sh commented 4 months ago

@hughess found that removing the ssl in the env var name EVIDENCE_SOURCE__sourcename__ssl__rejectUnauthorized="false" -> EVIDENCE_SOURCE__sourcename__rejectUnauthorized="false" causes ~the rejectUnauthorized flag to be picked up~ rejectUnauthorized=true during npm run sources

ud3sh commented 4 months ago

I think what’s happening is by default, we set rejectUnauthorized=false

However, when var EVIDENCE_SOURCEsourcenamessl__rejectUnauthorized is set, regardless off the value (true/false), we are setting rejectUnauthorized=true

That explains how Sean was able to make it work by "renaming" the variable.

It seems like false values in general might have issues => https://github.com/evidence-dev/evidence/pull/1993/files