Skip to content

Commit

Permalink
Merge pull request quarkusio#36457 from zakkak/2023-10-12-mandrel-23.1
Browse files Browse the repository at this point in the history
Update builder images to jdk-21
  • Loading branch information
zakkak authored Oct 16, 2023
2 parents 8d92854 + a994576 commit a90d6d5
Show file tree
Hide file tree
Showing 21 changed files with 25 additions and 63 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-actions-incremental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -771,11 +771,11 @@ jobs:
path: .
- name: Extract .m2/repository/io/quarkus
run: tar -xzf m2-io-quarkus.tgz -C ~
- name: Set up JDK 20
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 20
java-version: 21
# We do this so we can get better analytics for the downloaded version of the build images
- name: Update Docker Client User Agent
run: |
Expand All @@ -785,7 +785,7 @@ jobs:
TEST_MODULES: ${{matrix.test-modules}}
CONTAINER_BUILD: ${{startsWith(matrix.os-name, 'windows') && 'false' || 'true'}}
run: |
export LANG=en_US && ./mvnw $COMMON_MAVEN_ARGS -f integration-tests/virtual-threads -pl "$TEST_MODULES" $NATIVE_TEST_MAVEN_ARGS -Dextra-args=--enable-preview -Dquarkus.native.container-build=true -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-20
export LANG=en_US && ./mvnw $COMMON_MAVEN_ARGS -f integration-tests/virtual-threads -pl "$TEST_MODULES" $NATIVE_TEST_MAVEN_ARGS -Dextra-args=--enable-preview -Dquarkus.native.container-build=true
- name: Upload build reports (if build failed)
uses: actions/upload-artifact@v3
if: ${{ failure() || cancelled() }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
@ConfigMapping(prefix = "quarkus.native")
public interface NativeConfig {

String DEFAULT_GRAALVM_BUILDER_IMAGE = "quay.io/quarkus/ubi-quarkus-graalvmce-builder-image:jdk-17";
String DEFAULT_MANDREL_BUILDER_IMAGE = "quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-17";
String DEFAULT_GRAALVM_BUILDER_IMAGE = "quay.io/quarkus/ubi-quarkus-graalvmce-builder-image:jdk-21";
String DEFAULT_MANDREL_BUILDER_IMAGE = "quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-21";

/**
* Comma-separated, additional arguments to pass to the build process.
Expand Down Expand Up @@ -225,7 +225,7 @@ default boolean isExplicitContainerBuild() {
interface BuilderImageConfig {
/**
* The docker image to use to do the image build. It can be one of `graalvm`, `mandrel`, or the full image path, e.g.
* {@code quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-17}.
* {@code quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-21}.
*/
@WithParentName
@WithDefault("${platform.quarkus.native.builder-image}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ 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", Distribution.GRAALVM);

public static final Version MINIMUM = VERSION_22_2_0;
public static final Version CURRENT = VERSION_23_0_0;
public static final Version CURRENT = VERSION_23_1_0;
public static final int UNDEFINED = -1;

final String fullVersion;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@ class NativeConfigTest {
@Test
public void testBuilderImageProperlyDetected() {
assertThat(createConfig("graalvm").builderImage().getEffectiveImage()).contains("ubi-quarkus-graalvmce-builder-image")
.contains("jdk-17");
.contains("jdk-21");
assertThat(createConfig("GraalVM").builderImage().getEffectiveImage()).contains("ubi-quarkus-graalvmce-builder-image")
.contains("jdk-17");
.contains("jdk-21");
assertThat(createConfig("GraalVM").builderImage().getEffectiveImage()).contains("ubi-quarkus-graalvmce-builder-image")
.contains("jdk-17");
.contains("jdk-21");
assertThat(createConfig("GRAALVM").builderImage().getEffectiveImage()).contains("ubi-quarkus-graalvmce-builder-image")
.contains("jdk-17");
.contains("jdk-21");

assertThat(createConfig("mandrel").builderImage().getEffectiveImage()).contains("ubi-quarkus-mandrel-builder-image")
.contains("jdk-17");
.contains("jdk-21");
assertThat(createConfig("Mandrel").builderImage().getEffectiveImage()).contains("ubi-quarkus-mandrel-builder-image")
.contains("jdk-17");
.contains("jdk-21");
assertThat(createConfig("MANDREL").builderImage().getEffectiveImage()).contains("ubi-quarkus-mandrel-builder-image")
.contains("jdk-17");
.contains("jdk-21");

assertThat(createConfig("aRandomString").builderImage().getEffectiveImage()).isEqualTo("aRandomString");
}
Expand Down
8 changes: 4 additions & 4 deletions docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
<properties>
<!-- The Graal version we suggest using in documentation - as that's
what we work with by self downloading it: -->
<graal-community.version-for-documentation>for JDK 17</graal-community.version-for-documentation>
<graal-community.tag-for-documentation>jdk17</graal-community.tag-for-documentation>
<graal-community.image-tag-for-documentation>jdk-17</graal-community.image-tag-for-documentation>
<mandrel.image-tag-for-documentation>jdk-17</mandrel.image-tag-for-documentation>
<graal-community.version-for-documentation>for JDK 21</graal-community.version-for-documentation>
<graal-community.tag-for-documentation>jdk21</graal-community.tag-for-documentation>
<graal-community.image-tag-for-documentation>jdk-21</graal-community.image-tag-for-documentation>
<mandrel.image-tag-for-documentation>jdk-21</mandrel.image-tag-for-documentation>

<assembly-maven-plugin.version>3.5.0</assembly-maven-plugin.version>
<asciidoctor-maven-plugin.version>2.0.0</asciidoctor-maven-plugin.version>
Expand Down
11 changes: 0 additions & 11 deletions docs/src/main/asciidoc/building-native-image.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -428,17 +428,6 @@ In this case, use the parameter `-Dquarkus.native.remote-container-build=true` i
The reason for this is that the local build driver invoked through `-Dquarkus.native.container-build=true` uses volume mounts to make the JAR available in the build container, but volume mounts do not work with remote daemons. The remote container build driver copies the necessary files instead of mounting them. Note that even though the remote driver also works with local daemons, the local driver should be preferred in the local case because mounting is usually more performant than copying.
====

[TIP]
====
The builder image used by default supports Java 17 as it is the latest LTS version.
If your application uses Java 18 or later, you need to specify a builder image supporting Java 20:
:build-additional-parameters: -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-20
include::{includes}/devtools/build-native-container-parameters.adoc[]
:!build-additional-parameters:
====

[TIP]
====
Building with GraalVM instead of Mandrel requires a custom builder image parameter to be passed additionally:
Expand Down
9 changes: 2 additions & 7 deletions docs/src/main/asciidoc/virtual-threads.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -387,15 +387,10 @@ Then, add to your `application.properties` file:

[source, properties]
----
quarkus.native.additional-build-args=--enable-preview <1>
# In-container build to get a linux 64 executable
quarkus.native.container-build=true <2>
quarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-20 <3>
quarkus.native.container-build=true <1>
----
<1> The `enable-preview` flag in only necessary until Java 21.
<2> Enables the in-container build
<3> The builder container to use. Make sure it supports virtual threads
<1> Enables the in-container build

[IMPORTANT]
.From ARM/64 to AMD/64
Expand Down
2 changes: 1 addition & 1 deletion independent-projects/bootstrap/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<jboss-logmanager.version>3.0.2.Final</jboss-logmanager.version>
<slf4j-jboss-logmanager.version>1.1.0.Final</slf4j-jboss-logmanager.version>
<slf4j-api.version>1.7.36</slf4j-api.version>
<graal-sdk.version>23.0.1</graal-sdk.version>
<graal-sdk.version>23.1.0</graal-sdk.version>
<plexus-classworlds.version>2.6.0</plexus-classworlds.version> <!-- not actually used but ClassRealm class is referenced from the API used in BootstrapWagonConfigurator -->
<plexus-cipher.version>2.0</plexus-cipher.version>
<plexus-interpolation.version>1.26</plexus-interpolation.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@ mp.messaging.incoming.prices.broadcast=true
mp.messaging.outgoing.prices-out.address=prices

smallrye.messaging.worker.<virtual-thread>.max-concurrency=10

quarkus.native.additional-build-args=--enable-preview
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@ quarkus.grpc.clients.service.port=9001

%vertx.quarkus.grpc.server.use-separate-server=false

quarkus.native.additional-build-args=--enable-preview

%vertx.quarkus.grpc.clients.service.port=8081
%vertx.quarkus.grpc.clients.service.use-quarkus-grpc-client=true
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@ mp.messaging.outgoing.prices-out.destination=prices

smallrye.messaging.worker.<virtual-thread>.max-concurrency=5

quarkus.native.additional-build-args=--enable-preview

quarkus.artemis.devservices.enabled=true
quarkus.artemis.devservices.image-name=quay.io/artemiscloud/activemq-artemis-broker:1.0.18
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@ mp.messaging.incoming.prices.auto.offset.reset=earliest
mp.messaging.outgoing.prices-out.topic=prices

smallrye.messaging.worker.<virtual-thread>.max-concurrency=10

quarkus.native.additional-build-args=--enable-preview
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
quarkus.native.additional-build-args=--enable-preview
quarkus.mailer.mock=false
quarkus.mailer.from=roger-the-robot@quarkus.io
quarkus.mailer.from=roger-the-robot@quarkus.io
3 changes: 1 addition & 2 deletions integration-tests/virtual-threads/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
<!-- gradle scan capture test logging disabled: System.out in virtual threads cause pinning when enabled. -->
<argLine>--enable-preview -Djdk.tracePinnedThreads -Dgradle.scan.captureTestLogging=false</argLine>
<argLine>-Djdk.tracePinnedThreads -Dgradle.scan.captureTestLogging=false</argLine>
<skipTests>${skipTests}</skipTests>
</configuration>
</plugin>
Expand All @@ -131,7 +131,6 @@
<version>${version.compiler.plugin}</version>
<configuration>
<compilerArgs>
<arg>--enable-preview</arg>
<arg>-parameters</arg>
</compilerArgs>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
quarkus.native.additional-build-args=--enable-preview

quarkus.package.quiltflower.enabled=true
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
quarkus.native.additional-build-args=--enable-preview

quarkus.cache.redis.value-type=java.lang.String
quarkus.cache.redis.ttl=10s
quarkus.cache.redis.ttl=10s
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
quarkus.native.additional-build-args=--enable-preview
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
quarkus.native.additional-build-args=--enable-preview
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
quarkus.native.additional-build-args=--enable-preview

quarkus.package.quiltflower.enabled=true
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
quarkus.native.additional-build-args=--enable-preview
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
quarkus.native.additional-build-args=--enable-preview
quarkus.virtual-threads.enabled=false
quarkus.virtual-threads.enabled=false

0 comments on commit a90d6d5

Please sign in to comment.