-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Incorrect precedence overwriting env vars with dotenv #2267
Comments
Hello @craigbeck , Do you have any reasons to use both Thanks |
A couple of our vars are common across multiple instances, and we use the I have extracted these and distributed to our The other issue is this was still an unexpected change that negatively impacts developer experience, one of a few issues I've found in the configuration space lately. |
@ovr what is the reasoning behind change the widely understood, expected behavior of |
Very sad to hear that you were affected by this change.
Feel free to create an issue or write in our Slack to indicate a problem and make Cube.js better.
Cube.js provides an ability to do reload the configuration with I will talk with our team to find a proper solution how it should work. |
Describe the bug
Recently did a deployment of CubeJs instance and instance attempted to connect to our Postgres instance but could not as it was using the
.env
file values rather than the supplied environment variables.To Reproduce
Expected behavior
dotenv
variable precedence to behave in the same expected wayScreenshots
n/a
Version:
@cubejs-backend/server@0.26.12
Additional context
.env
file supplied has values for local developmentapp.yaml
files to set environment specific values that take precedence over anything in.env
Here is where you
dotenv
is setup to overwrite existing env variable values: https://github.com/cube-js/cube.js/blob/d9f5154e38c14417aa332f9bcd3d38ef00553e5a/packages/cubejs-server/src/server.ts#L24-L27This is the change in the CubeJs fork of
@cubejs-backend/dotenv
that allowed this: cube-js/dotenv@e681675The text was updated successfully, but these errors were encountered: