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
Ever since we migrated to Quarkus 3.0.1 our native integration tests started to fail, see minimal working example. We have the following properties defined in our application.properties:
Yet, when booting the containerized native binary, it fails:
io.smallrye.config.ConfigValidationException: Configuration validation failed:
java.util.NoSuchElementException: SRCFG00014: The config property example.push.apn.server is required but it could not be found in any config source
java.util.NoSuchElementException: SRCFG00014: The config property example.push.apn.enabled is required but it could not be found in any config source
at io.smallrye.config.ConfigMappingProvider.mapConfigurationInternal(ConfigMappingProvider.java:979)
Weirdly, only those properties are considered missing that are also overriden with a %prod prefix.
Expected behavior
We would expect properties, that are defined in application.properties, without profile prefix, to be used as defaults, when no prefixed property exists. No matter if the application runs on a JVM or as containerized, native binary.
Actual behavior
The containerized native binary application fails to boot if quarkus.test.native-image-profile=test is set and application.properties contains properties and %prod-prefixed overrides.
How to Reproduce?
Please see our minimal working example. All you have to do is run ./mvnw clean verify -Pnative.
Output of uname -a or ver
Darwin wmf3196 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 arm64
Output of java -version
version: 17.0.5, vendor: BellSoft
GraalVM version (if different from Java)
No response
Quarkus version or git rev
3.0.1
Build tool (ie. output of mvnw --version or gradlew --version)
Apache Maven 3.8.6
Additional information
No response
The text was updated successfully, but these errors were encountered:
I don't think this is a regression, but an interesting case in how we build and test the app.
When we build the native image, we build it with the prod profile, and when we test it, we run the native binary with the test profile, not prod. Because we build with prod and the prod properties take precedence over the unprofiled ones, these are the only ones being recorded in the native image.
Describe the bug
Ever since we migrated to Quarkus 3.0.1 our native integration tests started to fail, see minimal working example. We have the following properties defined in our
application.properties
:Yet, when booting the containerized native binary, it fails:
Weirdly, only those properties are considered missing that are also overriden with a
%prod
prefix.Expected behavior
We would expect properties, that are defined in
application.properties
, without profile prefix, to be used as defaults, when no prefixed property exists. No matter if the application runs on a JVM or as containerized, native binary.Actual behavior
The containerized native binary application fails to boot if
quarkus.test.native-image-profile=test
is set andapplication.properties
contains properties and%prod
-prefixed overrides.How to Reproduce?
Please see our minimal working example. All you have to do is run
./mvnw clean verify -Pnative
.Output of
uname -a
orver
Darwin wmf3196 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 arm64
Output of
java -version
version: 17.0.5, vendor: BellSoft
GraalVM version (if different from Java)
No response
Quarkus version or git rev
3.0.1
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.6
Additional information
No response
The text was updated successfully, but these errors were encountered: