Skip to content
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

Fix generateJniConfig step #32829

Merged
merged 2 commits into from
Apr 25, 2023
Merged

Conversation

scrocquesel
Copy link
Contributor

Follow up #32432

When defining both methods and ctors, ctors are discarded. This will merge both.

@scrocquesel
Copy link
Contributor Author

/review @geoand @jerboaa @zakkak

@quarkus-bot

This comment has been minimized.

@geoand geoand requested a review from zakkak April 24, 2023 05:10
Copy link
Contributor

@zakkak zakkak left a comment

Choose a reason for hiding this comment

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

LGTM!

We need the same change applied to https://github.com/quarkusio/quarkus/blob/main/core/deployment/src/main/java/io/quarkus/deployment/steps/NativeImageReflectConfigStep.java as well.

@scrocquesel could you please include the change in this PR? If not I will prepare a follow up.

@jerboaa
Copy link
Contributor

jerboaa commented Apr 24, 2023

This is probably one for @Karm to review. I'm not super familiar with this json generation logic.

@Karm
Copy link
Member

Karm commented Apr 24, 2023

Uh...

2023-04-21T18:26:52.5442536Z [INFO] --- quarkus-maven-plugin:999-SNAPSHOT:build (default) @ quarkus-integration-test-resteasy-jackson ---
2023-04-21T18:26:57.6233638Z [INFO] [io.quarkus.smallrye.openapi] OpenAPI JSON saved: D:\a\quarkus\quarkus\integration-tests\resteasy-jackson\target\generated\openapi.json
2023-04-21T18:26:57.6291394Z [INFO] [io.quarkus.smallrye.openapi] OpenAPI YAML saved: D:\a\quarkus\quarkus\integration-tests\resteasy-jackson\target\generated\openapi.yaml
2023-04-21T18:26:57.7576988Z [INFO] [io.quarkus.deployment.pkg.steps.JarResultBuildStep] Building native image source jar: D:\a\quarkus\quarkus\integration-tests\resteasy-jackson\target\quarkus-integration-test-resteasy-jackson-999-SNAPSHOT-native-image-source-jar\quarkus-integration-test-resteasy-jackson-999-SNAPSHOT-runner.jar
2023-04-21T18:26:58.4945060Z [INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Building native image from D:\a\quarkus\quarkus\integration-tests\resteasy-jackson\target\quarkus-integration-test-resteasy-jackson-999-SNAPSHOT-native-image-source-jar\quarkus-integration-test-resteasy-jackson-999-SNAPSHOT-runner.jar
2023-04-21T18:26:59.5439223Z [INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on native-image 21.3.6.0-Final Mandrel Distribution (Java Version 17.0.7+7)
2023-04-21T18:26:59.6280794Z [INFO] ------------------------------------------------------------------------
2023-04-21T18:26:59.6281528Z [INFO] BUILD FAILURE
2023-04-21T18:26:59.6282154Z [INFO] ------------------------------------------------------------------------
2023-04-21T18:26:59.6297327Z [INFO] Total time:  17.878 s
2023-04-21T18:26:59.6299208Z [INFO] Finished at: 2023-04-21T18:26:59Z
2023-04-21T18:26:59.6299748Z [INFO] ------------------------------------------------------------------------
2023-04-21T18:26:59.6884877Z [ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:999-SNAPSHOT:build (default) on project quarkus-integration-test-resteasy-jackson: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
2023-04-21T18:26:59.6950784Z [ERROR] 	[error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: java.lang.IllegalStateException: Out of date version of GraalVM detected: native-image 21.3.6.0-Final Mandrel Distribution (Java Version 17.0.7+7). Quarkus currently supports 22.3.0. Please upgrade GraalVM to this version.
2023-04-21T18:26:59.6952064Z [ERROR] 	at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.checkGraalVMVersion(NativeImageBuildStep.java:455)
2023-04-21T18:26:59.6952910Z [ERROR] 	at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:221)
2023-04-21T18:26:59.6953593Z [ERROR] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2023-04-21T18:26:59.6954262Z [ERROR] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
2023-04-21T18:26:59.6955020Z [ERROR] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
2023-04-21T18:26:59.6955661Z [ERROR] 	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
2023-04-21T18:26:59.6956207Z [ERROR] 	at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:909)
2023-04-21T18:26:59.6956745Z [ERROR] 	at io.quarkus.builder.BuildContext.run(BuildContext.java:282)
2023-04-21T18:26:59.6957289Z [ERROR] 	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
2023-04-21T18:26:59.6957872Z [ERROR] 	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2513)
2023-04-21T18:26:59.6958680Z [ERROR] 	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1538)
2023-04-21T18:26:59.6959210Z [ERROR] 	at java.base/java.lang.Thread.run(Thread.java:833)
2023-04-21T18:26:59.6959694Z [ERROR] 	at org.jboss.threads.JBossThread.run(JBossThread.java:501)
2023-04-21T18:26:59.6960183Z [ERROR] -> [Help 1]

Why would the Windows test take our latest 21.3. instead of 22.3? Was it because for a couple of days, our 21.3 was the latest release on GH...?

@Karm
Copy link
Member

Karm commented Apr 24, 2023

Re-running the check.

And I'll compare the produced json files...

@quarkus-bot

This comment has been minimized.

@Karm
Copy link
Member

Karm commented Apr 24, 2023

2023-04-24T14:47:03.7662261Z   JAVA_HOME: C:\hostedtoolcache\windows\mandrel-java17-windows\22.3.2-0-Final\x64\mandrel-java17-22.3.2.0-Final

Looks right now. But the flow doesn't do anything when manually restarted as I did:

Starting download for maven-repo
Error: Unable to find an artifact with the name: maven-repo

@scrocquesel
Copy link
Contributor Author

LGTM!

We need the same change applied to https://github.com/quarkusio/quarkus/blob/main/core/deployment/src/main/java/io/quarkus/deployment/steps/NativeImageReflectConfigStep.java as well.

@scrocquesel could you please include the change in this PR? If not I will prepare a follow up.

Done

@quarkus-bot
Copy link

quarkus-bot bot commented Apr 25, 2023

Failing Jobs - Building 4cd3d42

Status Name Step Failures Logs Raw logs
✔️ Maven Tests - JDK 11
Maven Tests - JDK 11 Windows Build Failures Logs Raw logs

Full information is available in the Build summary check run.

Failures

⚙️ Maven Tests - JDK 11 Windows #

- Failing: integration-tests/maven 

📦 integration-tests/maven

io.quarkus.maven.it.JarRunnerIT.testThatLegacyJarFormatWorks line 204 - More details - Source on GitHub

org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.maven.it.JarRunnerIT that uses io.quarkus.maven.it.verifier.MavenProcessInvocationResult was not fulfilled within 1 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)

io.quarkus.maven.it.JarRunnerIT.testThatLegacyJarFormatWorks line 204 - More details - Source on GitHub

org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.maven.it.JarRunnerIT that uses io.quarkus.maven.it.verifier.MavenProcessInvocationResult was not fulfilled within 1 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)

Copy link
Contributor

@zakkak zakkak left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @scrocquesel !

@zakkak
Copy link
Contributor

zakkak commented Apr 25, 2023

@Karm the version-related failure was due to 21.3.6.0.Final appearing as latest in https://github.com/graalvm/mandrel/releases/latest, before the release of 22.3.2.0.Final, which is what https://github.com/graalvm/setup-graalvm/ uses to get the latest mandrel version when invoked in:

- name: Setup GraalVM
id: setup-graalvm
uses: graalvm/setup-graalvm@v1
if: startsWith(matrix.os-name, 'windows')
with:
version: 'mandrel-latest'
java-version: '17'
components: 'native-image'
github-token: ${{ secrets.GITHUB_TOKEN }}

I think this is good to merge if you have no objection.

Copy link
Member

@Karm Karm left a comment

Choose a reason for hiding this comment

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

I unzipped the jars and compared the json files with/without the change for an AWT app and it seems good. THX 🙏

@Karm Karm merged commit 57bdb43 into quarkusio:main Apr 25, 2023
@quarkus-bot quarkus-bot bot added this to the 3.1 - main milestone Apr 25, 2023
@scrocquesel scrocquesel deleted the fix_jni_config_step branch April 25, 2023 21:22
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.

5 participants