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

Quarkus main fails to parse GraalVM version starting with GraalVM for JDK 22 #36246

Closed
zakkak opened this issue Oct 2, 2023 · 5 comments · Fixed by #36267
Closed

Quarkus main fails to parse GraalVM version starting with GraalVM for JDK 22 #36246

zakkak opened this issue Oct 2, 2023 · 5 comments · Fixed by #36267
Labels
area/native-image kind/bug Something isn't working
Milestone

Comments

@zakkak
Copy link
Contributor

zakkak commented Oct 2, 2023

Describe the bug

It looks like labsJDK 22 dropped the "old" GraalVM versioning (e.g., 23.1) from its version:

❯ ~/jvms/labsjdk-ce-latest-22+13-jvmci-b01/bin/java -version 
openjdk version "22" 2024-03-19
OpenJDK Runtime Environment (build 22+13-jvmci-b01)
OpenJDK 64-Bit Server VM (build 22+13-jvmci-b01, mixed mode, sharing)

❯ ~/jvms/labsjdk-ce-21-jvmci-23.1-b15/bin/java -version
openjdk version "21" 2023-09-19
OpenJDK Runtime Environment (build 21+35-jvmci-23.1-b15)
OpenJDK 64-Bit Server VM (build 21+35-jvmci-23.1-b15, mixed mode, sharing)

As a result, Quarkus fails to detect the version of GraalVM builds based on LabsJDK 22 onwards.

Expected behavior

Quarkus should detect the version and not crash.

Actual behavior

Quarkus fails to detect the version and crashes.

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

No response

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

Relates to #34161

Possible fixes:

  1. Rely on getting the value from the release file that accompanies the GraalVM build as discussed in Improve GraalVM/Mandrel version detection #34161 (comment)
  2. Switch to using the new versioning scheme
@zakkak zakkak added the kind/bug Something isn't working label Oct 2, 2023
@zakkak
Copy link
Contributor Author

zakkak commented Oct 2, 2023

cc @jerboaa @Karm

@jerboaa
Copy link
Contributor

jerboaa commented Oct 2, 2023

For reference, the native-image output of such a build looks like this:

$ native-image --version
native-image 22 2024-03-19
GraalVM Runtime Environment GraalVM CE 22-dev+15.1 (build 22+15-jvmci-b01)
Substrate VM GraalVM CE 22-dev+15.1 (build 22+15, serial gc)
$ grep GRAAL $GRAALVM_HOME/release
GRAALVM_VERSION="24.0.0-dev"

@jerboaa
Copy link
Contributor

jerboaa commented Oct 2, 2023

Possible fixes:

1. Rely on getting the value from the `release` file that accompanies the GraalVM build as discussed in
2. Switch to using the new versioning scheme

Could you clarify what this means? Switching to the new versioning scheme?

Option 3:

A quick-fix could also be a simple mapping by only looking at the JDK feature() version:

JDK 22 => GraalVM Community for JDK 22 => 24.0
JDK 23 => GraalVM Community for JDK 23 => 24.1
JDK 24 => GraalVM Community for JDK 24 => 25.0
JDK 25 => GraalVM Community for JDK 25 => 25.1

That mapping has to be done internally in Quarkus due to the maven artefacts too.

@zakkak
Copy link
Contributor Author

zakkak commented Oct 3, 2023

Could you clarify what this means? Switching to the new versioning scheme?

Right now Quarkus performs checks based on the "old" versioning scheme, i.e., GraalVM 22.3, GraalVM 23.1, etc.

Option 2 suggests that Quarkus starts comparing versions using the new versioning scheme GraalVM for JDK 17.0.8, GraalVM for JDK 21.0.0 etc. (after detecting these builds are using it, to avoid cases where 22.3 is seen as newer than 21.0.0)

@jerboaa
Copy link
Contributor

jerboaa commented Oct 3, 2023

Option 2 suggests that Quarkus starts comparing versions using the new versioning scheme GraalVM for JDK 17.0.8, GraalVM for JDK 21.0.0 etc. (after detecting these builds are using it, to avoid cases where 22.3 is seen as newer than 21.0.0)

Quarkus still supports 23.0, which has a JDK 17 and JDK 20 variant. Imo this is more approachable once GraalVM and JDK version numbers catch up (JDK 25).

zakkak added a commit to zakkak/quarkus that referenced this issue Oct 3, 2023
Temporarily works around
quarkusio#36246, till we have a
consensus on how to move forward in
quarkusio#34161

Closes quarkusio#36246
zakkak added a commit to zakkak/quarkus that referenced this issue Oct 3, 2023
Temporarily works around
quarkusio#36246, till we have a
consensus on how to move forward in
quarkusio#34161

Closes quarkusio#36246
zakkak added a commit to zakkak/quarkus that referenced this issue Oct 4, 2023
Temporarily works around
quarkusio#36246, till we have a
consensus on how to move forward in
quarkusio#34161

Closes quarkusio#36246
@quarkus-bot quarkus-bot bot added this to the 3.5 - main milestone Oct 5, 2023
holly-cummins pushed a commit to holly-cummins/quarkus that referenced this issue Feb 8, 2024
Temporarily works around
quarkusio#36246, till we have a
consensus on how to move forward in
quarkusio#34161

Closes quarkusio#36246
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/native-image kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants