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

Warn users when using older GraalVM or Mandrel versions #39866

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,21 @@ public static final class Version implements Comparable<Version> {
public static final Version VERSION_23_1_0 = new Version("GraalVM 23.1.0", "23.1.0", "21", Distribution.GRAALVM);
public static final Version VERSION_24_0_0 = new Version("GraalVM 24.0.0", "24.0.0", "22", Distribution.GRAALVM);

/**
* The minimum version of GraalVM supported by Quarkus.
* Versions prior to this are expected to cause major issues.
*/
public static final Version MINIMUM = VERSION_22_2_0;
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should be 23.0 (JDK 17-based), by now for quarkus main. 22.2.0 is very old. Failing that, use 22.3.0 at least.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why though? By bumping MINIMUM we (mandrel team) will no longer be able to do tests with these versions (mostly to see the evolution through time or to see in which version a regression was introduced) even if there is no major "breakage". So far there is no extra effort required on our side to keep this as is. cc @galderz

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see this being tested anywhere with Quarkus main, so unless you can show this actually works with 22.2, there is no point in keeping it.

/**
* The current version of GraalVM supported by Quarkus.
* This version is the one actively being tested and is expected to give the best experience.
*/
public static final Version CURRENT = VERSION_23_1_0;
/**
* The minimum version of GraalVM officially supported by Quarkus.
* Versions prior to this are expected to work but are not given the same level of testing or priority.
*/
public static final Version MINIMUM_SUPPORTED = CURRENT;

final String fullVersion;
public final Runtime.Version javaVersion;
Expand Down Expand Up @@ -227,6 +240,10 @@ boolean isObsolete() {
return this.compareTo(MINIMUM) < 0;
}

boolean isSupported() {
return this.compareTo(MINIMUM_SUPPORTED) >= 0;
}

boolean isMandrel() {
return distribution == Distribution.MANDREL;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,15 @@ private void checkGraalVMVersion(GraalVM.Version version) {
log.info("Running Quarkus native-image plugin on " + version.distribution.name() + " " + version.getVersionAsString()
+ " JDK " + version.javaVersion);
if (version.isObsolete()) {
throw new IllegalStateException("Out of date version of GraalVM detected: " + version.getVersionAsString() + "."
throw new IllegalStateException(
"Out of date version of GraalVM or Mandrel detected: " + version.getVersionAsString() + "."
+ " Quarkus currently supports " + GraalVM.Version.CURRENT.getVersionAsString()
+ ". Please upgrade to this version.");
}
if (!version.isSupported()) {
log.warn("You are using an older version of GraalVM or Mandrel : " + version.getVersionAsString() + "."
+ " Quarkus currently supports " + GraalVM.Version.CURRENT.getVersionAsString()
+ ". Please upgrade GraalVM to this version.");
+ ". Please upgrade to this version.");
}
}

Expand Down
Loading