Skip to content

Conversation

@zakkak
Copy link
Contributor

@zakkak zakkak commented Jan 9, 2024

Similar fix to main which was done in
#37813 for jpa-postgresql and in #37879 for jpa-postgresql-withxml.

Openning as draft till tests with mandrel 23.1 and JDK 21.0.1+12 build complete in https://github.com/graalvm/mandrel/actions/runs/7461888676

cc @jerboaa

Similar fix to main which was done in
quarkusio#37813 for jpa-postgresql and
in quarkusio#37879 for
jpa-postgresql-withxml.

Closes quarkusio#37809
@jerboaa
Copy link
Contributor

jerboaa commented Jan 9, 2024

Link to the JDK bug: https://bugs.openjdk.org/browse/JDK-8316304

Copy link
Contributor

@jerboaa jerboaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please explain why exactly this fixes #37809? I.e. a test in QuarkusTestCallbacksITCase.testCallbackContextIsNotFailed is fixed because of a change in image-metrics.properties? What am I missing? Why is this not affecting ImageMetricsITCase?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need files for 24.0 and 24.1 too now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the mechanism is working OKish (we probably still need to relax some diff percentages), so we could indeed start expanding it to more tests and more versions.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm asking because we see the QuarkusTestCallbacksITCase.testCallbackContextIsNotFailed test failing with 24.0 too. See: https://github.com/graalvm/mandrel/actions/runs/7242468774/job/19728465877#step:12:688 or more recently here: https://github.com/graalvm/mandrel/actions/runs/7455460280/job/20285177037#step:12:706

Do you know if the 23.1 specific metrics fix, will fix it for 24.0 and 24.1 as well?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For posterity, this PR got merged since it fixes an issue with GraalVM for JDK 21 builds (internal version 23.1). Later releases are still being tracked in #37809.

@zakkak zakkak marked this pull request as ready for review January 9, 2024 17:01
@zakkak
Copy link
Contributor Author

zakkak commented Jan 9, 2024

Could you please explain why exactly this fixes #37809? I.e. a test in QuarkusTestCallbacksITCase.testCallbackContextIsNotFailed is fixed because of a change in image-metrics.properties? What am I missing? Why is this not affecting ImageMetricsITCase?

Looking closely I actually noticed that ImageMetricsITCase was failing as well, and when failing it also results in a failure of testCallbackContextIsNotFailed because the latter relies on QuarkusTestMethodContext to check if the callbacks failed, but the context also contains the other tests failures (when they fail).

@quarkus-bot

This comment has been minimized.

@jerboaa
Copy link
Contributor

jerboaa commented Jan 9, 2024

Could you please explain why exactly this fixes #37809? I.e. a test in QuarkusTestCallbacksITCase.testCallbackContextIsNotFailed is fixed because of a change in image-metrics.properties? What am I missing? Why is this not affecting ImageMetricsITCase?

Looking closely I actually noticed that ImageMetricsITCase was failing as well, and when failing it also results in a failure of testCallbackContextIsNotFailed because the latter relies on QuarkusTestMethodContext to check if the callbacks failed, but the context also contains the other tests failures (when they fail).

OK, thanks for clarifying!

@zakkak zakkak marked this pull request as draft January 9, 2024 17:38
@zakkak
Copy link
Contributor Author

zakkak commented Jan 9, 2024

Apparently that's still not enough to completely fix #37809. When testing Mandrel 24.0 the verification still produces an exception (broken assumption) that triggers the same failure.

org.opentest4j.TestAbortedException: Assumption failed: Could not find properties file matching the Mandrel version being used: image-metrics/24.0/image-metrics.properties
	at org.junit.jupiter.api.Assumptions.throwAssumptionFailed(Assumptions.java:316)
	at org.junit.jupiter.api.Assumptions.assumeTrue(Assumptions.java:115)
	at io.quarkus.test.junit.nativeimage.NativeBuildOutputExtension.getProperties(NativeBuildOutputExtension.java:74)
	at io.quarkus.test.junit.nativeimage.NativeBuildOutputExtension.verifyImageMetrics(NativeBuildOutputExtension.java:57)
	at io.quarkus.test.junit.nativeimage.NativeBuildOutputExtension.verifyImageMetrics(NativeBuildOutputExtension.java:46)
	at io.quarkus.it.main.ImageMetricsITCase.verifyImageMetrics(ImageMetricsITCase.java:15)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
[ERROR] Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.004 s <<< FAILURE! -- in io.quarkus.it.main.QuarkusTestCallbacksITCase
[ERROR] io.quarkus.it.main.QuarkusTestCallbacksITCase.testCallbackContextIsNotFailed -- Time elapsed: 0.001 s <<< FAILURE!
org.opentest4j.AssertionFailedError: expected: <false> but was: <true>
	at org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151)
	at org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132)
	at org.junit.jupiter.api.AssertFalse.failNotFalse(AssertFalse.java:63)
	at org.junit.jupiter.api.AssertFalse.assertFalse(AssertFalse.java:36)
	at org.junit.jupiter.api.AssertFalse.assertFalse(AssertFalse.java:31)
	at org.junit.jupiter.api.Assertions.assertFalse(Assertions.java:231)
	at io.quarkus.it.main.QuarkusTestCallbacksITCase.testCallbackContextIsNotFailed(QuarkusTestCallbacksITCase.java:64)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)

Marking this as draft till I get a complete fix for (hopefully) all test combinations.

@zakkak
Copy link
Contributor Author

zakkak commented Jan 9, 2024

Marking this as draft till I get a complete fix for (hopefully) all test combinations.

Marking this again as ready for review as it fixes an actual issue (even if it doesn't close #37809). I will handle the other issue (also described in #37809 (comment)) in a different PR.

@zakkak zakkak marked this pull request as ready for review January 9, 2024 18:40
@quarkus-bot
Copy link

quarkus-bot bot commented Jan 9, 2024

✔️ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.

@zakkak zakkak merged commit e7f867c into quarkusio:main Jan 9, 2024
@quarkus-bot quarkus-bot bot added this to the 3.7 - main milestone Jan 9, 2024
@zakkak zakkak deleted the 2024-01-09-fix-37809 branch January 9, 2024 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants