You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I lookup smallrye_mp_config_lowcase_FATTEST_env_variable it will match it to the env variable in the .env file but this is incorrect according to the spec.
The text was updated successfully, but these errors were encountered:
Strictly, yes, but from our experience, env variable lookup should be more relaxed than MP Config defines.
From a user experience standpoint, we observed that users expect a case insensitive behaviour when looking up env variables, especially because you never know which source you are looking for, and containers do not place any restrictions on the names that can be used for env variables. For instance, dotted names are acceptable. In practice, the EnvSource almost works as any other source would. The problem is that you need to be able to match multiple combinations.
The strict behaviour also causes performance issues. While it is certainly possible to support it, (and we did in previous versions), it also comes at a high cost. It requires additional String transformations to look up exactly the expected name. Because the EnvSource is so high in the list of sources, most lookups are required to query it.
The current implementation uses a custom equals with the rules implemented to avoid the String transformations and to optimize the name lookup. Please see:
I have the following environment variable in a
.env
file:If I lookup
smallrye_mp_config_lowcase_FATTEST_env_variable
it will match it to the env variable in the.env
file but this is incorrect according to the spec.The text was updated successfully, but these errors were encountered: