fix: env overrides when config.json is missing and add regression test#271
fix: env overrides when config.json is missing and add regression test#271tbeaudouin05 wants to merge 2 commits intosipeed:mainfrom
Conversation
|
Good catch on the LoadConfig logic! It seems like we're both looking at the parsing order of environment variables. I've actually just updated PR #239 which handles this by unsetting conflicting env vars at the entrypoint level (ensuring the JSON remains the source of truth) while also adding full Coolify/Docker support. It might be worth checking how we can unify these so they don't fight each other! |
nikolasdehor
left a comment
There was a problem hiding this comment.
Clean, minimal fix for an important edge case. In file-less deployments (Fly.io, Docker with env-only config), LoadConfig was returning DefaultConfig() without calling env.Parse(cfg), silently ignoring all environment variable overrides.
The regression test is well-written — uses t.Setenv for proper cleanup and filepath.Join(t.TempDir(), "missing.json") to guarantee a non-existent path. LGTM.
Uh oh!
There was an error while loading. Please reload this page.