-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Disable external configuration sources parsing in native-mode #42103
Conversation
`SmallryeConfigBuilder` tries to access properties files from various sources, despite them not being available at run-time nor supported in native-mode, see quarkusio#41994 This patch also avoids getting a `MissingRegistrationError` when using `-H:+ThrowMissingRegistrationErrors` or `--exact-reachability-metadata`. Related to quarkusio#41994 and quarkusio#41995
@BuildStep(onlyIf = NativeOrNativeSourcesBuild.class) | ||
void nativeNoSources(BuildProducer<StaticInitConfigBuilderBuildItem> staticInitConfigBuilder, | ||
BuildProducer<RunTimeConfigBuilderBuildItem> runTimeConfigBuilder) { | ||
runTimeConfigBuilder.produce(new RunTimeConfigBuilderBuildItem(SystemOnlySourcesConfigBuilder.class.getName())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is going to fail in the native build tests because this will disable the discovery of the external config
folder:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, that's not gonna work. Closing this and I will prepare another PR registering the necessary files as resources.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
io.smallrye.config.PropertiesConfigSourceLoader#inFileSystem
is public, so you can probably add a specific builder just for the native image with the inFileSystem
registration.
Status for workflow
|
Status | Name | Step | Failures | Logs | Raw logs | Build scan |
---|---|---|---|---|---|---|
✖ | Native Tests - Misc3 | Build |
Failures | Logs | Raw logs | 🔍 |
Full information is available in the Build summary check run.
You can consult the Develocity build scans.
Failures
⚙️ Native Tests - Misc3 #
- Failing: integration-tests/smallrye-config
📦 integration-tests/smallrye-config
✖ io.quarkus.it.smallrye.config.SmallRyeConfigIT.externalConfig
- History - More details - Source on GitHub
java.lang.AssertionError:
1 expectation failed.
JSON path value doesn't match.
Expected: 1234
Actual: null
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
Flaky tests - Develocity
⚙️ JVM Tests - JDK 21
📦 integration-tests/opentelemetry
✖ io.quarkus.it.opentelemetry.OpenTelemetryInjectionsTest.testOTelInjections
- History
Condition with Lambda expression in io.quarkus.it.opentelemetry.OpenTelemetryInjectionsTest was not fulfilled within 5 seconds.
-org.awaitility.core.ConditionTimeoutException
org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in io.quarkus.it.opentelemetry.OpenTelemetryInjectionsTest was not fulfilled within 5 seconds.
at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)
at org.awaitility.core.CallableCondition.await(CallableCondition.java:26)
at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:1006)
at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:975)
at io.quarkus.it.opentelemetry.OpenTelemetryInjectionsTest.reset(OpenTelemetryInjectionsTest.java:26)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
⚙️ Native Tests - HTTP
📦 integration-tests/rest-client-reactive
✖ io.quarkus.it.rest.client.BasicTestIT.shouldCreateClientSpans
- History
expected: <1> but was: <2>
-org.opentest4j.AssertionFailedError
org.opentest4j.AssertionFailedError: expected: <1> but was: <2>
at io.quarkus.it.rest.client.BasicTest.shouldCreateClientSpans(BasicTest.java:216)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.quarkus.test.junit.QuarkusTestExtension.interceptTestMethod(QuarkusTestExtension.java:812)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
SmallryeConfigBuilder
tries to access properties files from varioussources, despite them not being available at run-time nor supported in
native-mode, see #41994
This patch also avoids getting a
MissingRegistrationError
when using-H:+ThrowMissingRegistrationErrors
or--exact-reachability-metadata
.Related to #41994 and
#41995