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
Profiles in helidon-mp yaml configuration do not override config parameters.
Environment Details
Helidon Version: 4.0.9
Helidon MP
JDK version: openjdk 21 2023-09-19
OS: Ubuntu 22.04.4 (WSL)
Problem Description
When using a meta-config.yml file to specify a configuration file, this configuration file does not respect profiles. If I have a value
And i run my program with said profile, currently the value without profile is active, where as I expect the profile version to be active.
Steps to reproduce
Starting from a new helion-mp project, this is how I came to the described situation:
Add a config parameter with profile to microprofile-config.properties:
I added for example "%dev.app.greeting=Hello-dev" after the default line "example app.greeting=Hello".
When compiling, and running java -Dmp.config.profile=dev -jar target/helidon-quickstart-mp.jar, now curl http://localhost:8080/greet returns the following: {"message":"Hello-dev World!"}
Add the file meta-config.yaml with reference to the default configuration filemicroprofile-config.properties:
When I run mvn clean package, followed by java -Dmp.config.profile=dev -jar target/helidon-quickstart-mp.jar and finally curl http://localhost:8080/greet , I would expect the same response, but the response is {"message":"Hello World!"}
The text was updated successfully, but these errors were encountered:
ahreurink
changed the title
Profile in helidon mp yaml configuration
Profile does not apply in helidon mp configuration made by meta-config.yaml
Jun 6, 2024
The bug reproduces if I use mp-meta-config.yaml (I think this is how I should have done it to begin with).
However, if I use mp-meta-config.yaml and add add-default-sources: true, the expected behavior does occur, even if there is no microprofile-config.properties present
Meta-config yaml replaces other configuration options of MP Config.
You can configure profile in the meta-config.yaml file itself (and have a different file on each environment).
Profiles in helidon-mp yaml configuration do not override config parameters.
Environment Details
Problem Description
When using a meta-config.yml file to specify a configuration file, this configuration file does not respect profiles. If I have a value
And i run my program with said profile, currently the value without profile is active, where as I expect the profile version to be active.
Steps to reproduce
Starting from a new helion-mp project, this is how I came to the described situation:
Add a config parameter with profile to
microprofile-config.properties
:I added for example "%dev.app.greeting=Hello-dev" after the default line "example app.greeting=Hello".
When compiling, and running
java -Dmp.config.profile=dev -jar target/helidon-quickstart-mp.jar
, nowcurl http://localhost:8080/greet
returns the following: {"message":"Hello-dev World!"}Add the file
meta-config.yaml
with reference to the default configuration filemicroprofile-config.properties
:When I run
mvn clean package
, followed byjava -Dmp.config.profile=dev -jar target/helidon-quickstart-mp.jar
and finallycurl http://localhost:8080/greet
, I would expect the same response, but the response is {"message":"Hello World!"}The text was updated successfully, but these errors were encountered: