-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Quarkus 3.18.1 does not allow overwriting lists from application.yaml
with lists supplied in environment variables
#46016
Comments
/cc @radcortez (config) |
I'll have a look. |
A collection configuration value can be represented as This usually is not a problem because users use only one of the styles, but the YAML source is tricky. The All the While we fix this, my recommendation is to use a |
Alternatively, you can also use |
I think the same issue is present in application.properties too |
Did you try it with Quarkus 3.18.2? |
Describe the bug
We use the
quarkus-config-yaml
extension to provide a default baseline configuration for our application in YAML format:We inject this into the application as follows:
When running in production, the list from
application.yaml
may need to be overwritten with other values. We do this by providing a comma separated list as the value of theMY_LIST
environment variable (e.g.export MY_LIST=hello,bob
).After switching from the current LTS version (3.15.3) to the most recent Quarkus version (3.18.1). This behavior no longer works. The value of
MY_LIST
is ignored. It seems that only YAML lists are affected by this, as overwriting String-typed config values works fine.Expected behavior
If
MY_LIST=hello,bob
then we expectmyList
to contain exactly the values"hello"
and"bob"
.Actual behavior
The value injected into
myList
contains the values"hello'
and"world"
althoughMY_LIST=hello,bob
.How to Reproduce?
https://github.com/snophey/quarkus-reproduce-list-bug (follow the steps in the README)
Output of
uname -a
orver
Linux codespaces-5565d0 6.5.0-1025-azure #26~22.04.1-Ubuntu SMP Thu Jul 11 22:33:04 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
OpenJDK 64-Bit Server VM Corretto-21.0.5.11.1 (build 21.0.5+11-LTS, mixed mode, sharing)
Quarkus version or git rev
3.18.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.9 (8e8579a9e76f7d015ee5ec7bfcdc97d260186937)
Additional information
No response
The text was updated successfully, but these errors were encountered: