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

Config quarkus.config.locations is evaluated before applying profile #25186

Closed
lamemind-ud opened this issue Apr 27, 2022 · 1 comment · Fixed by #25401
Closed

Config quarkus.config.locations is evaluated before applying profile #25186

lamemind-ud opened this issue Apr 27, 2022 · 1 comment · Fixed by #25401
Labels
area/config kind/bug Something isn't working
Milestone

Comments

@lamemind-ud
Copy link

lamemind-ud commented Apr 27, 2022

Describe the bug

Hello,

the config quarkus.config.locations is evaluated before applying the profile.

quarkus.config.locations=file1.properties
%test.quarkus.config.locations=file1.properties,file2.properties

Launching tests, the "Test" profile is activated AFTER the quarkus.config.locations property being read. Thus file2.properties is not getting loaded.

But if you read the property via @ConfigProperty(name = "quarkus.config.locations"), the value is correct.

Expected behavior

%test.quarkus.config.locations should be evaluated during tests

Actual behavior

the default quarkus.config.locations property is evaluated

How to Reproduce?

The bug is not reproducible using @ConfigProperty(name = "quarkus.config.locations"), that way the property is correctly read.

In order to reproduce you need to read a property declared in the not-loaded-config-file.

Output of uname -a or ver

No response

Output of java -version

17.0.1

GraalVM version (if different from Java)

No response

Quarkus version or git rev

2.8.0

Build tool (ie. output of mvnw --version or gradlew --version)

3.8.4

Additional information

No response

@lamemind-ud lamemind-ud added the kind/bug Something isn't working label Apr 27, 2022
@radcortez
Copy link
Member

As a workaround, use smallrye.config.locations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/config kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants