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

Update builder images to jdk-21 #36457

Merged
merged 3 commits into from
Oct 16, 2023
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
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 @@ -425,20 +425,9 @@
----
In this case, use the parameter `-Dquarkus.native.remote-container-build=true` instead of `-Dquarkus.native.container-build=true`.

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.

Check warning on line 428 in docs/src/main/asciidoc/building-native-image.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsSuggestions] Depending on the context, consider using 'because' or 'while' rather than 'as'. Raw Output: {"message": "[Quarkus.TermsSuggestions] Depending on the context, consider using 'because' or 'while' rather than 'as'.", "location": {"path": "docs/src/main/asciidoc/building-native-image.adoc", "range": {"start": {"line": 428, "column": 7}}}, "severity": "INFO"}

Check warning on line 428 in docs/src/main/asciidoc/building-native-image.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.Spelling] Use correct American English spelling. Did you really mean 'performant'? Raw Output: {"message": "[Quarkus.Spelling] Use correct American English spelling. Did you really mean 'performant'?", "location": {"path": "docs/src/main/asciidoc/building-native-image.adoc", "range": {"start": {"line": 428, "column": 468}}}, "severity": "WARNING"}
====

[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 @@ -386,18 +386,13 @@

[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

Check warning on line 395 in docs/src/main/asciidoc/virtual-threads.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.SentenceLength] Try to keep sentences to an average of 32 words or fewer. Raw Output: {"message": "[Quarkus.SentenceLength] Try to keep sentences to an average of 32 words or fewer.", "location": {"path": "docs/src/main/asciidoc/virtual-threads.adoc", "range": {"start": {"line": 395, "column": 14}}}, "severity": "INFO"}
====
If you are using a Mac M1 or M2 (using an ARM64 CPU), you need to be aware that the native executable you will get using an in-container build will be a Linux executable, but using your host (ARM 64) architecture.
You can use emulation to force the architecture when using Docker with the following property:
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 @@ -103,7 +103,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 @@ -130,7 +130,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
Loading