Skip to content

Commit

Permalink
Merge pull request #37693 from gsmet/3.6.3-backports-1
Browse files Browse the repository at this point in the history
3.6.3 backports 1
  • Loading branch information
gsmet committed Dec 12, 2023
2 parents 146ed33 + 14ad405 commit abfe0d2
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .mvn/gradle-enterprise.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
</buildScan>
<buildCache>
<local>
<enabled>#{env['GRADLE_LOCAL_BUILD_CACHE'] != null}</enabled>
<enabled>#{env['GRADLE_LOCAL_BUILD_CACHE'] != null and env['RELEASE_GITHUB_TOKEN'] == null}</enabled>
</local>
<remote>
<enabled>true</enabled>
<storeEnabled>#{env['CI'] != null and env['GRADLE_ENTERPRISE_ACCESS_KEY'] != null and env['GRADLE_ENTERPRISE_ACCESS_KEY'] != ''}</storeEnabled>
<enabled>#{env['RELEASE_GITHUB_TOKEN'] == null}</enabled>
<storeEnabled>#{env['CI'] != null and env['GRADLE_ENTERPRISE_ACCESS_KEY'] != null and env['GRADLE_ENTERPRISE_ACCESS_KEY'] != '' and env['RELEASE_GITHUB_TOKEN'] == null}</storeEnabled>
</remote>
</buildCache>
</gradleEnterprise>
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ static final class VersionParseHelper {

private static final String VENDOR_VERS = "(?<VENDOR>.*)";
private static final String JDK_DEBUG = "[^\\)]*"; // zero or more of >anything not a ')'<
private static final String RUNTIME_NAME = "(?<RUNTIME>(?:OpenJDK|GraalVM) Runtime Environment) ";
private static final String RUNTIME_NAME = "(?<RUNTIME>(?:.*) Runtime Environment) ";
private static final String BUILD_INFO = "(?<BUILDINFO>.*)";
private static final String VM_NAME = "(?<VM>(?:OpenJDK 64-Bit Server|Substrate) VM) ";
private static final String VM_NAME = "(?<VM>(?:.*) VM) ";

private static final String FIRST_LINE_PATTERN = "native-image " + VSTR_FORMAT + " .*$";
private static final String SECOND_LINE_PATTERN = RUNTIME_NAME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,16 @@ public void testGraalVMVersionDetected() {
+ "GraalVM Runtime Environment GraalVM CE (build 20+34-jvmci-23.0-b10)\n"
+ "Substrate VM GraalVM CE (build 20+34, serial gc)").split("\\n"))));

// Should also work for other unknown implementations of GraalVM
assertVersion(new Version("GraalVM 23.0", "23.0", GRAALVM), GRAALVM,
Version.of(Stream.of(("native-image 20 2023-07-30\n"
+ "Foo Runtime Environment whatever (build 20+34-jvmci-23.0-b7)\n"
+ "Foo VM whatever (build 20+34, serial gc)").split("\\n"))));
assertVersion(new Version("GraalVM 23.0", "23.0", GRAALVM), GRAALVM,
Version.of(Stream.of(("native-image 20 2023-07-30\n"
+ "Another Runtime Environment whatever (build 20+34-jvmci-23.0-b7)\n"
+ "Another VM whatever (build 20+34, serial gc)").split("\\n"))));

// Older version parsing
assertVersion(new Version("GraalVM 20.1", "20.1", GRAALVM), GRAALVM,
Version.of(Stream.of("GraalVM Version 20.1.0 (Java Version 11.0.7)")));
Expand Down Expand Up @@ -130,6 +140,19 @@ public void testGraalVM22DevVersionParser() {
assertThat(graalVM22Dev.javaVersion.update()).isEqualTo(0);
}

@Test
public void testGraalVMEE22DevVersionParser() {
Version graalVMEE22Dev = Version.of(Stream.of(("native-image 22 2024-03-19\n"
+ "Java(TM) SE Runtime Environment Oracle GraalVM 22-dev+25.1 (build 22+25-jvmci-b01)\n"
+ "Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 22-dev+25.1 (build 22+25-jvmci-b01, mixed mode, sharing)")
.split("\\n")));
assertThat(graalVMEE22Dev.distribution.name()).isEqualTo("GRAALVM");
assertThat(graalVMEE22Dev.getVersionAsString()).isEqualTo("24.0-dev");
assertThat(graalVMEE22Dev.javaVersion.toString()).isEqualTo("22+25-jvmci-b01");
assertThat(graalVMEE22Dev.javaVersion.feature()).isEqualTo(22);
assertThat(graalVMEE22Dev.javaVersion.update()).isEqualTo(0);
}

@Test
public void testGraalVMVersionsOlderThan() {
assertOlderThan("GraalVM Version 19.3.6 CE", "GraalVM Version 20.2.0 (Java Version 11.0.9)");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public static Set<String> configFiles(Path configFilesLocation) throws IOExcepti
Set<String> configFiles = new HashSet<>();
try (DirectoryStream<Path> candidates = Files.newDirectoryStream(configFilesLocation, CONFIG_FILES_FILTER)) {
for (Path candidate : candidates) {
configFiles.add(candidate.toUri().getPath());
configFiles.add(candidate.toUri().toURL().toString());
}
}
return configFiles;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,15 @@ public OidcDevJsonRpcService(HttpConfiguration httpConfiguration, SmallRyeConfig
// we must always produce it when in DEV mode because we can't check for 'KeycloakDevServicesConfigBuildItem'
// due to circular reference: JSON RPC provider is additional bean and 'LoggingSetupBuildItem' used by
// 'KeycloakDevServicesProcessor' is created with combined index
OidcDevUiRpcSvcPropertiesBean props = Arc.container().instance(OidcDevUiRpcSvcPropertiesBean.class).get();
final var propsInstanceHandle = Arc.container().instance(OidcDevUiRpcSvcPropertiesBean.class);
final OidcDevUiRpcSvcPropertiesBean props;
if (propsInstanceHandle.isAvailable()) {
props = propsInstanceHandle.get();
} else {
// OIDC Dev UI is disabled, but this RPC service still gets initialized by Quarkus DEV UI
props = new OidcDevUiRpcSvcPropertiesBean(null, null, null, null, Map.of(), Map.of(), null, null, null, false, null,
List.of(), false, false, null, null, false);
}

this.httpPort = httpConfiguration.port;
this.config = config;
Expand Down

0 comments on commit abfe0d2

Please sign in to comment.