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

ENVs required in prod profile break dev profile but only when using the built artifact #15389

Closed
atamanroman opened this issue Mar 1, 2021 · 2 comments · Fixed by #15396 or #15999
Closed
Labels
area/config kind/bug Something isn't working
Milestone

Comments

@atamanroman
Copy link

Describe the bug

Quarkus tries to resolve ENVs for profiles which are not active. This breaks other profiles. This only happens with the built jar. It works fine with the quarkus:dev plugin.

Example:

Empty Quarkus project with %prod.quarkus.http.port=${HTTP_PORT} as the only configuration in application.properties breaks every other profile when running from jar if HTTP_PORT is not exported.

Expected behavior

If HTTP_PORT is not set application should start fine with any profile but prod. HTTP_PORT is only required in prod.

Actual behavior

Quarkus tries to resolve HTTP_PORT regardless of the active profile and fails to start.

QUARKUS_PROFILE=foo java -jar target/quarkus-app/quarkus-run.jar
One or more configuration errors have prevented the application from starting. The errors are:
  - SRCFG00011: Could not expand value HTTP_PORT in property quarkus.http.port

To Reproduce

https://github.com/atamanroman/quarkus-profile-dev-prod-repro

Steps to reproduce here:

https://github.com/atamanroman/quarkus-profile-dev-prod-repro/blob/main/README.md

Additional context

This issue was opened after discussion in this zulip thread.

@atamanroman atamanroman added the kind/bug Something isn't working label Mar 1, 2021
@famod
Copy link
Member

famod commented Mar 1, 2021

/cc @radcortez

@gsmet
Copy link
Member

gsmet commented Mar 24, 2021

Reopening this as I had to revert the commit for the Final.

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
4 participants