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

Should config values from Environment variables override other settings? #3140

Closed
jamescrosswell opened this issue Feb 10, 2024 · 1 comment
Milestone

Comments

@jamescrosswell
Copy link
Collaborator

jamescrosswell commented Feb 10, 2024

@slonopotamus suggested in another issue that setting the DSN in an environment variable should override an empty string (i.e. disabled) value that has been set via other bindings (like appsettings.json).

This would be more consistent with how things are done in ASP.NET Core:

Using the default configuration, the EnvironmentVariablesConfigurationProvider loads configuration from environment variable key-value pairs after reading appsettings.json, appsettings.{Environment}.json, and user secrets. Therefore, key values read from the environment override values read from appsettings.json, appsettings.{Environment}.json, and user secrets.

I think if we do this, it shouldn't be just for the DSN and shouldn't be just for the disabled DSN value... but that env variables trump other provider sources more generally.

However this is likely a breaking changes as we may have many customers who have their production environments configured based on the current behaviour.

@bitsandfoxes
Copy link
Contributor

See #3143 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants