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
Hello,
I'm using quakus native (GraalVM) with AWS lambdas. I have BETA/PROD stages where I want to deploy the same build artifact with different runtime configuration from profile files. But Quarkus native ignores config keys for beta after QUARKUS_PROFILE=beta env variable override in native mode.
Build process takes time, so I want to re-use the same build artifact for both enviroments. Also it is kind of safer to deploy the same binaries that were tested, not generated differently.
Is there a way to achieve my setup? Maybe some GraalVM options to disable profile optimisztions. If no it would be nice to add or at least mention in the docs explicitly. I'd imagine it's quite a common setup so can be useful for others.
Expected behavior
QUARKUS_PROFILE=beta should override profile for native images and load corresponding configuration (beta in this case at runtime. Or at least tell explicitly that it's not possible.
Actual behavior
After QUARKUS_PROFILE=beta. Profile changed with a warning to beta with below warning
2025-01-15 14:25:58,124 WARN [io.qua.run.con.ConfigRecorder] (main) The profile 'prod' used to build the native image is different from the runtime profile 'beta'. This may lead to unexpected results.
Quarkus keeps using prod config keys.
In the documentation it's written that I can override the mode and there some instructions for integration tests. But being honest it's a bit vaugue for the native image use case. I cannot understand if it's supported or no.
How to Reproduce?
I have separate custom profile aware files with the config for each stage: application-prod.configuration, application-beta.configuration. Also some "common/default" values in application.config. The files are in resources.
I include the the resources to the native image as
I build service in native mode without any profile overrides (prod used by default)
Then I try to select necessary config at runtime using QUARKUS_PROFILE=beta env variable, but the values from the beta config are not read. (I test it using different CORS domains). In the lambda logs I see below warning
2025-01-15 14:25:58,124 WARN [io.qua.run.con.ConfigRecorder] (main) The profile 'prod' used to build the native image is different from the runtime profile 'beta'. This may lead to unexpected results.
Output of uname -a or ver
Version info: 'GraalVM 22.3.0.1-Final Java 17 Mandrel Distribution'
Java version info: '17.0.5+8'
C compiler: gcc (redhat, x86_64, 8.5.0)
Garbage collector: Serial GC
2 user-specific feature(s)
io.quarkus.runner.Feature: Auto-generated class by Quarkus from the existing extensions
io.quarkus.runtime.graal.DisableLoggingFeature: Disables INFO logging during the analysis phase
Output of java -version
Java version info: '17.0.5+8'
Quarkus version or git rev
3.15.1 (LTS)
Build tool (ie. output of mvnw --version or gradlew --version)
Describe the bug
Hello,
I'm using quakus native (GraalVM) with AWS lambdas. I have BETA/PROD stages where I want to deploy the same build artifact with different runtime configuration from profile files. But Quarkus native ignores config keys for beta after
QUARKUS_PROFILE=beta
env variable override in native mode.Build process takes time, so I want to re-use the same build artifact for both enviroments. Also it is kind of safer to deploy the same binaries that were tested, not generated differently.
Is there a way to achieve my setup? Maybe some GraalVM options to disable profile optimisztions. If no it would be nice to add or at least mention in the docs explicitly. I'd imagine it's quite a common setup so can be useful for others.
Expected behavior
QUARKUS_PROFILE=beta
should override profile for native images and load corresponding configuration (beta in this case at runtime. Or at least tell explicitly that it's not possible.Actual behavior
QUARKUS_PROFILE=beta
. Profile changed with a warning to beta with below warningHow to Reproduce?
application-prod.configuration
,application-beta.configuration
. Also some "common/default" values inapplication.config
. The files are in resources.Output of
uname -a
orver
Version info: 'GraalVM 22.3.0.1-Final Java 17 Mandrel Distribution'
Java version info: '17.0.5+8'
C compiler: gcc (redhat, x86_64, 8.5.0)
Garbage collector: Serial GC
2 user-specific feature(s)
Output of
java -version
Java version info: '17.0.5+8'
Quarkus version or git rev
3.15.1 (LTS)
Build tool (ie. output of
mvnw --version
orgradlew --version
)mvn --version
Apache Maven 3.9.5 (57804ffe001d7215b5e7bcb531cf83df38f93546)
Additional information
No response
The text was updated successfully, but these errors were encountered: