quarkus
quarkus copied to clipboard
[Narayana] Make all Record class and BeanPopulator to init at runtime
revert https://github.com/quarkusio/quarkus/pull/40250
cc @mmusgrov
Thanks for your pull request!
The title of your pull request does not follow our editorial rules. Could you have a look?
- title should preferably start with an uppercase character (if it makes sense!)
This message is automatically generated by a bot.
@gastaldi it needs to backport to 3.8
The hibernate-orm-panache
is failing in native build and I will investigate.
:waning_crescent_moon: This workflow status is outdated as a new workflow run has been triggered.
Status for workflow Quarkus CI
This is the status report for running Quarkus CI
on commit 27b80df090def1e9f2804dd5d3fc1b7f2541c523.
Failing Jobs
Status | Name | Step | Failures | Logs | Raw logs | Build scan |
---|---|---|---|---|---|---|
✖ | Native Tests - Data3 | Build |
Failures | Logs | Raw logs | :mag: |
✖ | Native Tests - Data5 | Build |
Failures | Logs | Raw logs | :mag: |
✖ | Native Tests - Main | Build |
Failures | Logs | Raw logs | :mag: |
Full information is available in the Build summary check run. You can consult the Develocity build scans.
Failures
:gear: Native Tests - Data3 #
- Failing: integration-tests/hibernate-orm-panache
:package: integration-tests/hibernate-orm-panache
✖ Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-hibernate-orm-panache: Failed to build quarkus application
:gear: Native Tests - Data5 #
- Failing: integration-tests/jpa-postgresql integration-tests/jpa-postgresql-withxml
:package: integration-tests/jpa-postgresql
✖ io.quarkus.it.jpa.postgresql.ImageMetricsITCase.verifyImageMetrics
line 16
- History - More details - Source on GitHub
org.opentest4j.MultipleFailuresError:
Multiple Failures (2 failures)
org.opentest4j.AssertionFailedError: Expected analysis_results.methods.reflection to be within range [4708 +- 3%] but was 5004 ==> expected: <true> but was: <false>
org.opentest4j.AssertionFailedError: Expected analysis_results.fields.reflection to be within range [201 +- 3%] but was 338 ==> expected: <true> but was: <false>
at org.junit.jupiter.api.AssertAll.assertAll(AssertAll.java:80)
at org.junit.jupiter.api.AssertAll.assertAll(AssertAll.java:58)
at org.junit.jupiter.api.Assertions.assertAll(Assertions.java:3012)
at io.quarkus.test.junit.nativeimage.NativeBuildOutputExtension.verifyImageMetrics(NativeBuildOutputExtension.java:59)
:package: integration-tests/jpa-postgresql-withxml
✖ io.quarkus.it.jpa.postgresql.ImageMetricsITCase.verifyImageMetrics
line 15
- History - More details - Source on GitHub
org.opentest4j.MultipleFailuresError:
Multiple Failures (3 failures)
org.opentest4j.AssertionFailedError: Expected analysis_results.methods.reflection to be within range [4893 +- 3%] but was 5186 ==> expected: <true> but was: <false>
org.opentest4j.AssertionFailedError: Expected image_details.total_bytes to be within range [91650760 +- 3%] but was 94518080 ==> expected: <true> but was: <false>
org.opentest4j.AssertionFailedError: Expected analysis_results.fields.reflection to be within range [170 +- 3%] but was 307 ==> expected: <true> but was: <false>
at org.junit.jupiter.api.AssertAll.assertAll(AssertAll.java:80)
at org.junit.jupiter.api.AssertAll.assertAll(AssertAll.java:58)
at org.junit.jupiter.api.Assertions.assertAll(Assertions.java:3012)
:gear: Native Tests - Main #
- Failing: integration-tests/main
:package: integration-tests/main
✖ io.quarkus.it.main.ImageMetricsITCase.verifyImageMetrics
line 15
- History - More details - Source on GitHub
org.opentest4j.MultipleFailuresError:
Multiple Failures (2 failures)
org.opentest4j.AssertionFailedError: Expected analysis_results.methods.reflection to be within range [7741 +- 3%] but was 8253 ==> expected: <true> but was: <false>
org.opentest4j.AssertionFailedError: Expected analysis_results.fields.reflection to be within range [496 +- 3%] but was 633 ==> expected: <true> but was: <false>
at org.junit.jupiter.api.AssertAll.assertAll(AssertAll.java:80)
at org.junit.jupiter.api.AssertAll.assertAll(AssertAll.java:58)
at org.junit.jupiter.api.Assertions.assertAll(Assertions.java:3012)
at io.quarkus.test.junit.nativeimage.NativeBuildOutputExtension.verifyImageMetrics(NativeBuildOutputExtension.java:59)
@mmusgrov these three classes CAN NOT be added to initlize at runtime currently.
runtimeInit.produce(new RuntimeInitializedClassBuildItem(UserTransactionImple.class.getName()));
runtimeInit.produce(new RuntimeInitializedClassBuildItem(TransactionManagerImple.class.getName()));
runtimeInit.produce(new RuntimeInitializedClassBuildItem(BaseTransaction.class.getName()));
It looks like hibernate-orm-panache
has something to use TransactionManager
at build time. I don't have much time to do further investigation right now. So maybe we can open a followup issue?
:waning_crescent_moon: This workflow status is outdated as a new workflow run has been triggered.
Status for workflow Quarkus CI
This is the status report for running Quarkus CI
on commit 4b14a90b3b8f61f848fd8dce3b3e214172e3406d.
Failing Jobs
Status | Name | Step | Failures | Logs | Raw logs | Build scan |
---|---|---|---|---|---|---|
✖ | Native Tests - Data5 | Build |
Failures | Logs | Raw logs | :mag: |
✖ | Native Tests - Main | Build |
Failures | Logs | Raw logs | :mag: |
Full information is available in the Build summary check run. You can consult the Develocity build scans.
Failures
:gear: Native Tests - Data5 #
- Failing: integration-tests/jpa-postgresql integration-tests/jpa-postgresql-withxml
:package: integration-tests/jpa-postgresql
✖ io.quarkus.it.jpa.postgresql.ImageMetricsITCase.verifyImageMetrics
line 16
- History - More details - Source on GitHub
org.opentest4j.MultipleFailuresError:
Multiple Failures (2 failures)
org.opentest4j.AssertionFailedError: Expected analysis_results.methods.reflection to be within range [4708 +- 3%] but was 5004 ==> expected: <true> but was: <false>
org.opentest4j.AssertionFailedError: Expected analysis_results.fields.reflection to be within range [201 +- 3%] but was 338 ==> expected: <true> but was: <false>
at org.junit.jupiter.api.AssertAll.assertAll(AssertAll.java:80)
at org.junit.jupiter.api.AssertAll.assertAll(AssertAll.java:58)
at org.junit.jupiter.api.Assertions.assertAll(Assertions.java:3012)
at io.quarkus.test.junit.nativeimage.NativeBuildOutputExtension.verifyImageMetrics(NativeBuildOutputExtension.java:59)
:package: integration-tests/jpa-postgresql-withxml
✖ io.quarkus.it.jpa.postgresql.ImageMetricsITCase.verifyImageMetrics
line 15
- History - More details - Source on GitHub
org.opentest4j.MultipleFailuresError:
Multiple Failures (3 failures)
org.opentest4j.AssertionFailedError: Expected analysis_results.methods.reflection to be within range [4893 +- 3%] but was 5186 ==> expected: <true> but was: <false>
org.opentest4j.AssertionFailedError: Expected image_details.total_bytes to be within range [91650760 +- 3%] but was 94501696 ==> expected: <true> but was: <false>
org.opentest4j.AssertionFailedError: Expected analysis_results.fields.reflection to be within range [170 +- 3%] but was 307 ==> expected: <true> but was: <false>
at org.junit.jupiter.api.AssertAll.assertAll(AssertAll.java:80)
at org.junit.jupiter.api.AssertAll.assertAll(AssertAll.java:58)
at org.junit.jupiter.api.Assertions.assertAll(Assertions.java:3012)
:gear: Native Tests - Main #
- Failing: integration-tests/main
:package: integration-tests/main
✖ io.quarkus.it.main.ImageMetricsITCase.verifyImageMetrics
line 15
- History - More details - Source on GitHub
org.opentest4j.MultipleFailuresError:
Multiple Failures (2 failures)
org.opentest4j.AssertionFailedError: Expected analysis_results.methods.reflection to be within range [7741 +- 3%] but was 8253 ==> expected: <true> but was: <false>
org.opentest4j.AssertionFailedError: Expected analysis_results.fields.reflection to be within range [496 +- 3%] but was 633 ==> expected: <true> but was: <false>
at org.junit.jupiter.api.AssertAll.assertAll(AssertAll.java:80)
at org.junit.jupiter.api.AssertAll.assertAll(AssertAll.java:58)
at org.junit.jupiter.api.Assertions.assertAll(Assertions.java:3012)
at io.quarkus.test.junit.nativeimage.NativeBuildOutputExtension.verifyImageMetrics(NativeBuildOutputExtension.java:59)
@gastaldi I think the reflection increase is expected.
@zhfeng that's a lot of increase for a lot of applications so we need a certainty here. I'm not entirely sure why we end up increasing this so much.
Maybe @zakkak can help us understand what's going on.
BTW, I would rather have the revert in a separate PR so that we revert right away. I don't want us to take the risk of having this patch released somehow.
Thanks @gsmet - I seperate revert commit in
- https://github.com/quarkusio/quarkus/pull/40334
Status for workflow Quarkus CI
This is the status report for running Quarkus CI
on commit de2dbb25bad4dd0f036543e9a2219dbf328c4588.
Failing Jobs
Status | Name | Step | Failures | Logs | Raw logs | Build scan |
---|---|---|---|---|---|---|
✖ | Native Tests - Data5 | Build |
Failures | Logs | Raw logs | :mag: |
✖ | Native Tests - Main | Build |
Failures | Logs | Raw logs | :mag: |
Full information is available in the Build summary check run. You can consult the Develocity build scans.
Failures
:gear: Native Tests - Data5 #
- Failing: integration-tests/jpa-postgresql integration-tests/jpa-postgresql-withxml
:package: integration-tests/jpa-postgresql
✖ io.quarkus.it.jpa.postgresql.ImageMetricsITCase.verifyImageMetrics
line 16
- History - More details - Source on GitHub
org.opentest4j.MultipleFailuresError:
Multiple Failures (2 failures)
org.opentest4j.AssertionFailedError: Expected analysis_results.methods.reflection to be within range [4367 +- 3%] but was 4663 ==> expected: <true> but was: <false>
org.opentest4j.AssertionFailedError: Expected analysis_results.fields.reflection to be within range [201 +- 3%] but was 338 ==> expected: <true> but was: <false>
at org.junit.jupiter.api.AssertAll.assertAll(AssertAll.java:80)
at org.junit.jupiter.api.AssertAll.assertAll(AssertAll.java:58)
at org.junit.jupiter.api.Assertions.assertAll(Assertions.java:3012)
at io.quarkus.test.junit.nativeimage.NativeBuildOutputExtension.verifyImageMetrics(NativeBuildOutputExtension.java:59)
:package: integration-tests/jpa-postgresql-withxml
✖ io.quarkus.it.jpa.postgresql.ImageMetricsITCase.verifyImageMetrics
line 15
- History - More details - Source on GitHub
org.opentest4j.MultipleFailuresError:
Multiple Failures (2 failures)
org.opentest4j.AssertionFailedError: Expected analysis_results.methods.reflection to be within range [4551 +- 3%] but was 4845 ==> expected: <true> but was: <false>
org.opentest4j.AssertionFailedError: Expected analysis_results.fields.reflection to be within range [170 +- 3%] but was 307 ==> expected: <true> but was: <false>
at org.junit.jupiter.api.AssertAll.assertAll(AssertAll.java:80)
at org.junit.jupiter.api.AssertAll.assertAll(AssertAll.java:58)
at org.junit.jupiter.api.Assertions.assertAll(Assertions.java:3012)
at io.quarkus.test.junit.nativeimage.NativeBuildOutputExtension.verifyImageMetrics(NativeBuildOutputExtension.java:59)
:gear: Native Tests - Main #
- Failing: integration-tests/main
:package: integration-tests/main
✖ io.quarkus.it.main.ImageMetricsITCase.verifyImageMetrics
line 15
- History - More details - Source on GitHub
org.opentest4j.MultipleFailuresError:
Multiple Failures (1 failure)
org.opentest4j.AssertionFailedError: Expected analysis_results.fields.reflection to be within range [496 +- 3%] but was 633 ==> expected: <true> but was: <false>
at org.junit.jupiter.api.AssertAll.assertAll(AssertAll.java:80)
at org.junit.jupiter.api.AssertAll.assertAll(AssertAll.java:58)
at org.junit.jupiter.api.Assertions.assertAll(Assertions.java:3012)
at io.quarkus.test.junit.nativeimage.NativeBuildOutputExtension.verifyImageMetrics(NativeBuildOutputExtension.java:59)
at io.quarkus.test.junit.nativeimage.NativeBuildOutputExtension.verifyImageMetrics(NativeBuildOutputExtension.java:46)
Flaky tests - Develocity
:gear: JVM Tests - JDK 17 Windows
:package: integration-tests/grpc-hibernate
✖ com.example.grpc.hibernate.BlockingRawTest.shouldAdd
- History
-
Condition with Lambda expression in com.example.grpc.hibernate.BlockingRawTestBase was not fulfilled within 30 seconds.
-org.awaitility.core.ConditionTimeoutException
org.awaitility.core.ConditionTimeoutException: Condition with Lambda expression in com.example.grpc.hibernate.BlockingRawTestBase was not fulfilled within 30 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 com.example.grpc.hibernate.BlockingRawTestBase.shouldAdd(BlockingRawTestBase.java:59)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
We will discuss the merit of this PR later. For now we plan to fix the immediate issue with https://github.com/quarkusio/quarkus/pull/40365
Is this PR still necessary?
Is this PR still necessary?
I don't think so but we need @zhfeng to decide.
For fixing #39283 , it is not needed. But if we still want to support system properties in the native mode, it is necessary.
Maybe @zakkak can help us understand what's going on.
I don't see anything special going on. Registering more classes for reflection is expected to increase these metrics.
- RecoveryEnvironmentBean has 36 methods
- CoordinatorEnvironmentBean has 62 methods
- ObjectStoreEnvironmentBean has 56 methods
With a quick count over the rest of the classes as well I get a total of 192 methods being added for reflection (which were not being added before).
Assuming that even before this PR the registered methods were close to the threshold if I subtract 192 from the reported numbers I see that the result is below the 3% threshold.