From fc63e4931ee66f87da3e6d053df63e8795170133 Mon Sep 17 00:00:00 2001 From: Leonor Boga Date: Thu, 12 Oct 2023 16:49:42 +0200 Subject: [PATCH 01/12] Fix wrong text format --- docs/src/main/asciidoc/getting-started-dev-services.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/main/asciidoc/getting-started-dev-services.adoc b/docs/src/main/asciidoc/getting-started-dev-services.adoc index ef39883cf2d74..f5f309099a1d2 100644 --- a/docs/src/main/asciidoc/getting-started-dev-services.adoc +++ b/docs/src/main/asciidoc/getting-started-dev-services.adoc @@ -79,7 +79,7 @@ Once the application is up, visit http://localhost:8080/hello. It should show a === Accepting user input Let's make the application a bit more interactive. -Open the project in your IDE and navigate to `src/main/java/org/acme/GreetingResource.java' +Open the project in your IDE and navigate to `src/main/java/org/acme/GreetingResource.java` Add a query param in the `hello` method. (The `org.jboss.resteasy.reactive.RestQuery` annotation is like the Jakarta REST `@QueryParam` annotation, except you don't need to duplicate the parameter name.) From ae11836f10b6e6bcecae9cf3484c19c05d9313c0 Mon Sep 17 00:00:00 2001 From: Leonor Boga Date: Thu, 12 Oct 2023 16:50:07 +0200 Subject: [PATCH 02/12] Fix error in command to add extension using quarkus cli --- docs/src/main/asciidoc/_includes/devtools/extension-add.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/main/asciidoc/_includes/devtools/extension-add.adoc b/docs/src/main/asciidoc/_includes/devtools/extension-add.adoc index ff24545861b07..fba28c08b4698 100644 --- a/docs/src/main/asciidoc/_includes/devtools/extension-add.adoc +++ b/docs/src/main/asciidoc/_includes/devtools/extension-add.adoc @@ -1,7 +1,7 @@ [source,bash,subs=attributes+, role="primary asciidoc-tabs-sync-cli"] .CLI ---- -quarkus extension add '{add-extension-extensions}' +quarkus extension add {add-extension-extensions} ---- ifndef::devtools-no-maven[] ifdef::devtools-wrapped[+] From 448d6e4735b019813df74d7528f6c8e010bb982a Mon Sep 17 00:00:00 2001 From: Sanne Grinovero Date: Thu, 12 Oct 2023 09:29:39 +0100 Subject: [PATCH 03/12] Upgrade to Hibernate ORM 6.2.13.Final --- bom/application/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bom/application/pom.xml b/bom/application/pom.xml index c4272b907e2af..6ed24449a2154 100644 --- a/bom/application/pom.xml +++ b/bom/application/pom.xml @@ -99,7 +99,7 @@ 1.5.1 - 6.2.11.Final + 6.2.13.Final 1.14.7 6.0.6.Final 2.0.6.Final From 766de7f695e8a09fcf769a29c89aa25139d9ca95 Mon Sep 17 00:00:00 2001 From: Foivos Zakkak Date: Thu, 12 Oct 2023 17:48:29 +0100 Subject: [PATCH 04/12] Update builder images to jdk-21 - Update the GraalVM Community builder image to the tag `jdk-21` - Update the Mandrel builder image to the tag `jdk-21`(Mandrel 23.1) - Update GraalVM SDK version to 23.1 (yes, it does not follow the same version scheme) --- .../io/quarkus/deployment/pkg/NativeConfig.java | 6 +++--- .../io/quarkus/deployment/pkg/steps/GraalVM.java | 2 +- .../quarkus/deployment/pkg/NativeConfigTest.java | 14 +++++++------- docs/pom.xml | 8 ++++---- independent-projects/bootstrap/pom.xml | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/core/deployment/src/main/java/io/quarkus/deployment/pkg/NativeConfig.java b/core/deployment/src/main/java/io/quarkus/deployment/pkg/NativeConfig.java index 977cb104e0461..c973f8a449a91 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/pkg/NativeConfig.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/pkg/NativeConfig.java @@ -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. @@ -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}") diff --git a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/GraalVM.java b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/GraalVM.java index e0bacc8780aed..6fa2aa252fc1f 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/GraalVM.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/GraalVM.java @@ -155,7 +155,7 @@ public static final class Version implements Comparable { 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; diff --git a/core/deployment/src/test/java/io/quarkus/deployment/pkg/NativeConfigTest.java b/core/deployment/src/test/java/io/quarkus/deployment/pkg/NativeConfigTest.java index cb6a429e20f4d..654655f32234e 100644 --- a/core/deployment/src/test/java/io/quarkus/deployment/pkg/NativeConfigTest.java +++ b/core/deployment/src/test/java/io/quarkus/deployment/pkg/NativeConfigTest.java @@ -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"); } diff --git a/docs/pom.xml b/docs/pom.xml index 38070aa3d12c1..dbf502dbfae57 100644 --- a/docs/pom.xml +++ b/docs/pom.xml @@ -17,10 +17,10 @@ - for JDK 17 - jdk17 - jdk-17 - jdk-17 + for JDK 21 + jdk21 + jdk-21 + jdk-21 3.5.0 2.0.0 diff --git a/independent-projects/bootstrap/pom.xml b/independent-projects/bootstrap/pom.xml index 449aa916eec8d..b53b42b3de503 100644 --- a/independent-projects/bootstrap/pom.xml +++ b/independent-projects/bootstrap/pom.xml @@ -70,7 +70,7 @@ 3.0.2.Final 1.1.0.Final 1.7.36 - 23.0.1 + 23.1.0 2.6.0 2.0 1.26 From 0be31d09f0fc7dc948f75e3a6dcf6e1c1bd300dc Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Fri, 13 Oct 2023 18:21:31 +0200 Subject: [PATCH 05/12] Adjust documentation as builders are now JDK 21 --- docs/src/main/asciidoc/building-native-image.adoc | 11 ----------- docs/src/main/asciidoc/virtual-threads.adoc | 9 ++------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/docs/src/main/asciidoc/building-native-image.adoc b/docs/src/main/asciidoc/building-native-image.adoc index 8a2d72bc58b3c..0dad0256163c0 100644 --- a/docs/src/main/asciidoc/building-native-image.adoc +++ b/docs/src/main/asciidoc/building-native-image.adoc @@ -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: diff --git a/docs/src/main/asciidoc/virtual-threads.adoc b/docs/src/main/asciidoc/virtual-threads.adoc index 6851a32c28455..e79f8ed167599 100644 --- a/docs/src/main/asciidoc/virtual-threads.adoc +++ b/docs/src/main/asciidoc/virtual-threads.adoc @@ -386,15 +386,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 From 924322c7d2370fb73c53bfc79ea5bbd3477876e7 Mon Sep 17 00:00:00 2001 From: Sanne Grinovero Date: Thu, 12 Oct 2023 16:05:18 +0100 Subject: [PATCH 06/12] Upgrade Oracle JDBC driver to 23.3.0.23.09 --- bom/application/pom.xml | 2 +- docs/src/main/asciidoc/datasource.adoc | 16 ---------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/bom/application/pom.xml b/bom/application/pom.xml index c6451afb5719b..7ca3ad0759686 100644 --- a/bom/application/pom.xml +++ b/bom/application/pom.xml @@ -132,7 +132,7 @@ 8.0.30 12.4.0.jre11 1.6.7 - 23.2.0.0 + 23.3.0.23.09 10.14.2.0 11.5.8.0 1.2.6 diff --git a/docs/src/main/asciidoc/datasource.adoc b/docs/src/main/asciidoc/datasource.adoc index 6781dcbe5eaf6..164b9e16dff91 100644 --- a/docs/src/main/asciidoc/datasource.adoc +++ b/docs/src/main/asciidoc/datasource.adoc @@ -303,22 +303,6 @@ Quarkus offers several reactive clients for use with a reactive datasource. + The installed extension must be consistent with the `quarkus.datasource.db-kind` you define in your datasource configuration. -[WARNING] -==== -The Reactive Oracle datasource depends on the https://docs.oracle.com/en/database/oracle/oracle-database/23/jjdbc/jdbc-reactive-extensions.html[Reactive Extensions] provided by Oracle in its JDBC driver. - -There is a bug in versions 23.2 and 21.11 of the Oracle JDBC driver that prevents from getting any response if: - -* Reactive Extensions are used to execute an update/insert query that ends with an error (e.g. constraint violation), and -* https://vertx.io/docs/vertx-oracle-client/java/#_retrieving_generated_key_values[generated keys retrieval] is enabled. - -It is not known yet when the bug will be fixed. -In the meantime, you can either: - -* change the version of the driver in your project to `com.oracle.database.jdbc:ojdbc11:21.10.0.0`, or -* avoid executing queries with generated keys retrieval (e.g. load sequence value before inserting) -==== - . After adding the driver, configure the connection URL and define a proper size for your connection pool. + [source,properties] From a9945761183c3799bf80216cc3b6bd1248459e93 Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Fri, 13 Oct 2023 18:21:46 +0200 Subject: [PATCH 07/12] Run the virtual threads tests with Java 21 --- .github/workflows/ci-actions-incremental.yml | 6 +++--- .../src/main/resources/application.properties | 2 -- .../src/main/resources/application.properties | 2 -- .../src/main/resources/application.properties | 2 -- .../src/main/resources/application.properties | 2 -- .../src/main/resources/application.properties | 3 +-- integration-tests/virtual-threads/pom.xml | 3 +-- .../src/main/resources/application.properties | 3 --- .../src/main/resources/application.properties | 4 +--- .../src/main/resources/application.properties | 1 - .../src/main/resources/application.properties | 1 - .../src/main/resources/application.properties | 3 --- .../src/main/resources/application.properties | 1 - .../src/main/resources/application.properties | 3 +-- 14 files changed, 7 insertions(+), 29 deletions(-) diff --git a/.github/workflows/ci-actions-incremental.yml b/.github/workflows/ci-actions-incremental.yml index 4423a550a06ea..d9d32558c5bd1 100644 --- a/.github/workflows/ci-actions-incremental.yml +++ b/.github/workflows/ci-actions-incremental.yml @@ -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: | @@ -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() }} diff --git a/integration-tests/virtual-threads/amqp-virtual-threads/src/main/resources/application.properties b/integration-tests/virtual-threads/amqp-virtual-threads/src/main/resources/application.properties index f212b575de362..f6768433c2a8a 100644 --- a/integration-tests/virtual-threads/amqp-virtual-threads/src/main/resources/application.properties +++ b/integration-tests/virtual-threads/amqp-virtual-threads/src/main/resources/application.properties @@ -3,5 +3,3 @@ mp.messaging.incoming.prices.broadcast=true mp.messaging.outgoing.prices-out.address=prices smallrye.messaging.worker..max-concurrency=10 - -quarkus.native.additional-build-args=--enable-preview diff --git a/integration-tests/virtual-threads/grpc-virtual-threads/src/main/resources/application.properties b/integration-tests/virtual-threads/grpc-virtual-threads/src/main/resources/application.properties index c5e8d4afaaaf6..7646bf42cfd05 100644 --- a/integration-tests/virtual-threads/grpc-virtual-threads/src/main/resources/application.properties +++ b/integration-tests/virtual-threads/grpc-virtual-threads/src/main/resources/application.properties @@ -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 diff --git a/integration-tests/virtual-threads/jms-virtual-threads/src/main/resources/application.properties b/integration-tests/virtual-threads/jms-virtual-threads/src/main/resources/application.properties index 176a3abff2075..57d7613b5e8e5 100644 --- a/integration-tests/virtual-threads/jms-virtual-threads/src/main/resources/application.properties +++ b/integration-tests/virtual-threads/jms-virtual-threads/src/main/resources/application.properties @@ -4,7 +4,5 @@ mp.messaging.outgoing.prices-out.destination=prices smallrye.messaging.worker..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 diff --git a/integration-tests/virtual-threads/kafka-virtual-threads/src/main/resources/application.properties b/integration-tests/virtual-threads/kafka-virtual-threads/src/main/resources/application.properties index c361e848bc491..ad3c16899286a 100644 --- a/integration-tests/virtual-threads/kafka-virtual-threads/src/main/resources/application.properties +++ b/integration-tests/virtual-threads/kafka-virtual-threads/src/main/resources/application.properties @@ -4,5 +4,3 @@ mp.messaging.incoming.prices.auto.offset.reset=earliest mp.messaging.outgoing.prices-out.topic=prices smallrye.messaging.worker..max-concurrency=10 - -quarkus.native.additional-build-args=--enable-preview diff --git a/integration-tests/virtual-threads/mailer-virtual-threads/src/main/resources/application.properties b/integration-tests/virtual-threads/mailer-virtual-threads/src/main/resources/application.properties index 182aeaefac333..9d56807a66e4e 100644 --- a/integration-tests/virtual-threads/mailer-virtual-threads/src/main/resources/application.properties +++ b/integration-tests/virtual-threads/mailer-virtual-threads/src/main/resources/application.properties @@ -1,3 +1,2 @@ -quarkus.native.additional-build-args=--enable-preview quarkus.mailer.mock=false -quarkus.mailer.from=roger-the-robot@quarkus.io \ No newline at end of file +quarkus.mailer.from=roger-the-robot@quarkus.io diff --git a/integration-tests/virtual-threads/pom.xml b/integration-tests/virtual-threads/pom.xml index 853d39c10638b..5565ea6fa1dcc 100644 --- a/integration-tests/virtual-threads/pom.xml +++ b/integration-tests/virtual-threads/pom.xml @@ -103,7 +103,7 @@ ${maven.home} - --enable-preview -Djdk.tracePinnedThreads -Dgradle.scan.captureTestLogging=false + -Djdk.tracePinnedThreads -Dgradle.scan.captureTestLogging=false ${skipTests} @@ -130,7 +130,6 @@ ${version.compiler.plugin} - --enable-preview -parameters diff --git a/integration-tests/virtual-threads/quartz-virtual-threads/src/main/resources/application.properties b/integration-tests/virtual-threads/quartz-virtual-threads/src/main/resources/application.properties index 43b1e230c2184..e69de29bb2d1d 100644 --- a/integration-tests/virtual-threads/quartz-virtual-threads/src/main/resources/application.properties +++ b/integration-tests/virtual-threads/quartz-virtual-threads/src/main/resources/application.properties @@ -1,3 +0,0 @@ -quarkus.native.additional-build-args=--enable-preview - -quarkus.package.quiltflower.enabled=true \ No newline at end of file diff --git a/integration-tests/virtual-threads/redis-virtual-threads/src/main/resources/application.properties b/integration-tests/virtual-threads/redis-virtual-threads/src/main/resources/application.properties index 651500d04fd6d..83f9967b1c962 100644 --- a/integration-tests/virtual-threads/redis-virtual-threads/src/main/resources/application.properties +++ b/integration-tests/virtual-threads/redis-virtual-threads/src/main/resources/application.properties @@ -1,4 +1,2 @@ -quarkus.native.additional-build-args=--enable-preview - quarkus.cache.redis.value-type=java.lang.String -quarkus.cache.redis.ttl=10s \ No newline at end of file +quarkus.cache.redis.ttl=10s diff --git a/integration-tests/virtual-threads/rest-client-reactive-virtual-threads/src/main/resources/application.properties b/integration-tests/virtual-threads/rest-client-reactive-virtual-threads/src/main/resources/application.properties index 0bdbbf4a0cfe7..e69de29bb2d1d 100644 --- a/integration-tests/virtual-threads/rest-client-reactive-virtual-threads/src/main/resources/application.properties +++ b/integration-tests/virtual-threads/rest-client-reactive-virtual-threads/src/main/resources/application.properties @@ -1 +0,0 @@ -quarkus.native.additional-build-args=--enable-preview diff --git a/integration-tests/virtual-threads/resteasy-reactive-virtual-threads/src/main/resources/application.properties b/integration-tests/virtual-threads/resteasy-reactive-virtual-threads/src/main/resources/application.properties index 0632584e49a8d..e69de29bb2d1d 100644 --- a/integration-tests/virtual-threads/resteasy-reactive-virtual-threads/src/main/resources/application.properties +++ b/integration-tests/virtual-threads/resteasy-reactive-virtual-threads/src/main/resources/application.properties @@ -1 +0,0 @@ -quarkus.native.additional-build-args=--enable-preview \ No newline at end of file diff --git a/integration-tests/virtual-threads/scheduler-virtual-threads/src/main/resources/application.properties b/integration-tests/virtual-threads/scheduler-virtual-threads/src/main/resources/application.properties index 43b1e230c2184..e69de29bb2d1d 100644 --- a/integration-tests/virtual-threads/scheduler-virtual-threads/src/main/resources/application.properties +++ b/integration-tests/virtual-threads/scheduler-virtual-threads/src/main/resources/application.properties @@ -1,3 +0,0 @@ -quarkus.native.additional-build-args=--enable-preview - -quarkus.package.quiltflower.enabled=true \ No newline at end of file diff --git a/integration-tests/virtual-threads/vertx-event-bus-virtual-threads/src/main/resources/application.properties b/integration-tests/virtual-threads/vertx-event-bus-virtual-threads/src/main/resources/application.properties index 0bdbbf4a0cfe7..e69de29bb2d1d 100644 --- a/integration-tests/virtual-threads/vertx-event-bus-virtual-threads/src/main/resources/application.properties +++ b/integration-tests/virtual-threads/vertx-event-bus-virtual-threads/src/main/resources/application.properties @@ -1 +0,0 @@ -quarkus.native.additional-build-args=--enable-preview diff --git a/integration-tests/virtual-threads/virtual-threads-disabled/src/main/resources/application.properties b/integration-tests/virtual-threads/virtual-threads-disabled/src/main/resources/application.properties index c97efe2603807..4ac0c01bba146 100644 --- a/integration-tests/virtual-threads/virtual-threads-disabled/src/main/resources/application.properties +++ b/integration-tests/virtual-threads/virtual-threads-disabled/src/main/resources/application.properties @@ -1,2 +1 @@ -quarkus.native.additional-build-args=--enable-preview -quarkus.virtual-threads.enabled=false \ No newline at end of file +quarkus.virtual-threads.enabled=false From f23aceff571d36868c6ac1352c3e99d5414ffa74 Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Mon, 16 Oct 2023 10:23:18 +0200 Subject: [PATCH 08/12] Disable GraphQLClientUsingOidcClientTest Related to #36469 --- .../oidc/client/graphql/GraphQLClientUsingOidcClientTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extensions/oidc-client-graphql/deployment/src/test/java/io/quarkus/oidc/client/graphql/GraphQLClientUsingOidcClientTest.java b/extensions/oidc-client-graphql/deployment/src/test/java/io/quarkus/oidc/client/graphql/GraphQLClientUsingOidcClientTest.java index 112fb47baf5cb..257b3fc09ddc0 100644 --- a/extensions/oidc-client-graphql/deployment/src/test/java/io/quarkus/oidc/client/graphql/GraphQLClientUsingOidcClientTest.java +++ b/extensions/oidc-client-graphql/deployment/src/test/java/io/quarkus/oidc/client/graphql/GraphQLClientUsingOidcClientTest.java @@ -2,6 +2,7 @@ import static org.hamcrest.Matchers.equalTo; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; @@ -11,6 +12,7 @@ import io.restassured.RestAssured; @QuarkusTestResource(KeycloakTestResourceLifecycleManager.class) +@Disabled public class GraphQLClientUsingOidcClientTest { private static final Class[] testClasses = { From 765c5dbb6a2314ef0ca744036783372fb4243482 Mon Sep 17 00:00:00 2001 From: Foivos Zakkak Date: Mon, 16 Oct 2023 11:51:15 +0300 Subject: [PATCH 09/12] Document Mandrel and GraalVM new UnlockExperimentalVMOptions option Closes #35811 --- docs/src/main/asciidoc/native-reference.adoc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/src/main/asciidoc/native-reference.adoc b/docs/src/main/asciidoc/native-reference.adoc index d2fba7cbe0721..5aaf0176fef95 100644 --- a/docs/src/main/asciidoc/native-reference.adoc +++ b/docs/src/main/asciidoc/native-reference.adoc @@ -1889,6 +1889,19 @@ For example, when registering types and methods for reflection access, the analysis can’t easily see what’s behind those types or methods, so it has to do more work to complete the analysis step. +[[native-faq-experimental-options]] +=== I get a warning about using experimental options, what can I do? + +Starting with Mandrel 23.1 and GraalVM for JDK 21, the native executable generation process will warn about the use of experimental options with a message like this: + +[source,bash] +---- +Warning: The option '-H:ReflectionConfigurationResources=META-INF/native-image/io.micrometer/micrometer-core/reflect-config.json' is experimental and must be enabled via '-H:+UnlockExperimentalVMOptions' in the future. +---- + +If the mentioned option is added by a third party library like in the example above, you should consider opening an issue in the library's repository to ask for the option to be removed. +If the option is added by your application, you should consider either removing it (if it's not necessary) or wrapping it between `-H:+UnlockExperimentalVMOptions` and `-H:-UnlockExperimentalVMOptions`. + === I get a `AnalysisError\$ParsingError` when building a native executable due to an `UnresolvedElementException`, what can I do? When building a native executable Quarkus requires all classes being referenced by the code, no matter if they are build-time or run-time initialized, to be present in the classpath. From 6a84fe9a464e1e0f744ca2e4f19c3a93351a2020 Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Mon, 16 Oct 2023 09:07:18 +0300 Subject: [PATCH 10/12] Take ReaderInterceptor into account when reading SSE events --- .../reactive/client/impl/InboundSseEventImpl.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/InboundSseEventImpl.java b/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/InboundSseEventImpl.java index 66cecfadab348..e4357da6b0edf 100644 --- a/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/InboundSseEventImpl.java +++ b/independent-projects/resteasy-reactive/client/runtime/src/main/java/org/jboss/resteasy/reactive/client/impl/InboundSseEventImpl.java @@ -9,6 +9,7 @@ import jakarta.ws.rs.core.GenericType; import jakarta.ws.rs.core.MediaType; +import jakarta.ws.rs.ext.ReaderInterceptor; import jakarta.ws.rs.sse.InboundSseEvent; import jakarta.ws.rs.sse.SseEvent; @@ -24,12 +25,18 @@ public class InboundSseEventImpl implements InboundSseEvent { private String data; private MediaType mediaType; private long reconnectDelay = SseEvent.RECONNECT_NOT_SET; - private Serialisers serialisers; - private ConfigurationImpl configuration; + private final Serialisers serialisers; + private final ConfigurationImpl configuration; + private final ReaderInterceptor[] interceptors; public InboundSseEventImpl(ConfigurationImpl configuration, Serialisers serialisers) { this.configuration = configuration; this.serialisers = serialisers; + var interceptors = Serialisers.NO_READER_INTERCEPTOR; + if ((configuration != null) && configuration.getReaderInterceptors() != null) { + interceptors = configuration.getReaderInterceptors().toArray(Serialisers.NO_READER_INTERCEPTOR); + } + this.interceptors = interceptors; } public MediaType getMediaType() { @@ -122,7 +129,7 @@ public T readData(GenericType type, MediaType mediaType) { try { return (T) ClientSerialisers.invokeClientReader(null, type.getRawType(), type.getType(), mediaType, null, null, new QuarkusMultivaluedHashMap<>(), - serialisers, in, Serialisers.NO_READER_INTERCEPTOR, configuration); + serialisers, in, interceptors, configuration); } catch (IOException e) { throw new UncheckedIOException(e); } From 975871cec39bab5b20d7325fec24861eca832a2f Mon Sep 17 00:00:00 2001 From: Foivos Zakkak Date: Mon, 16 Oct 2023 13:26:58 +0300 Subject: [PATCH 11/12] Update documentation about using GraalVM configuration files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Starting with Mandrel 23.1 and GraalVM for JDK 21 the use of `-H:ResourceConfigurationFiles` and `-H:ReflectionConfigurationFiles` is marked as experimental and requires the use of `-H::±UnlockExperimentalVMOptions` to avoid warnings (see oracle/graal#7190), while in the future (planned for the next release) the presence of this option will be mandatory when using experimental options (see oracle/graal#7370). Furthermore, as described in oracle/graal#7487 Mandrel and GraalVM will also adopt glob patterns in the future (planned for the next release) and gradually phase out the ability to use exclude patterns. The aim of this change is to inform Quarkus users that they are responsible for keeping such configuration files up to date and to make clear that they need to start using the `-H::±UnlockExperimentalVMOptions` option. --- .../writing-native-applications-tips.adoc | 60 ++++++++++++++++--- 1 file changed, 52 insertions(+), 8 deletions(-) diff --git a/docs/src/main/asciidoc/writing-native-applications-tips.adoc b/docs/src/main/asciidoc/writing-native-applications-tips.adoc index 002d6c3253160..728ee3356d1d2 100644 --- a/docs/src/main/asciidoc/writing-native-applications-tips.adoc +++ b/docs/src/main/asciidoc/writing-native-applications-tips.adoc @@ -37,6 +37,8 @@ So this directory is not a shortcut for "let's automatically include these resou Other resources should be declared explicitly. ==== +==== Using the `quarkus.native.resources.includes` configuration property + To include more resources in the native executable, the easiest way is to use the `quarkus.native.resources.includes` configuration property, and its counterpart to exclude resources `quarkus.native.resources.excludes`. @@ -55,8 +57,19 @@ will include: * all files in the `foo/` directory and its subdirectories except for files in `foo/private/` and its subdirectories, * all text files in the `bar/` directory and its subdirectories. +==== Using a configuration file + If globs are not sufficiently precise for your use case and you need to rely on regular expressions, or if you prefer relying on the GraalVM infrastructure, -you can also create a `resources-config.json` (the most common location is within `src/main/resources`) JSON file defining which resources should be included: +you can also create a `resources-config.json` (the most common location is within `src/main/resources`) JSON file defining which resources should be included. + +[WARNING] +==== +Relying on the GraalVM infrastructure means that you are responsible for keeping the configuration file up to date as new Mandrel and GraalVM versions are released. + +Please also note that the `resources-config.json` file will be overwritten by Quarkus if placed directly under `src/main/resources/META-INF/native-image/` as Quarkus generates its own configuration file in this directory. +==== + +An example of such a file is the following: [source,json] ---- @@ -84,9 +97,18 @@ The final order of business is to make the configuration file known to the `nati [source,properties] ---- -quarkus.native.additional-build-args =-H:ResourceConfigurationFiles=resources-config.json +quarkus.native.additional-build-args =\ + -H:+UnlockExperimentalVMOptions,\ + -H:ResourceConfigurationFiles=resources-config.json,\ + -H:-UnlockExperimentalVMOptions ---- +[NOTE] +==== +Starting with Mandrel 23.1 and GraalVM for JDK 21, `-H:ResourceConfigurationFiles=resources-config.json` results in a warning being shown unless wrapped in `-H:+UnlockExperimentalVMOptions` and `-H:-UnlockExperimentalVMOptions`. +The absence of these options will result in build failures in the future. +==== + In the previous snippet we were able to simply use `resources-config.json` instead of specifying the entire path of the file simply because it was added to `src/main/resources`. If the file had been added to another directory, the proper file path would have had to be specified manually. @@ -97,8 +119,10 @@ Multiple options may be separated by a comma. For example, one could use: [source,properties] ---- quarkus.native.additional-build-args =\ + -H:+UnlockExperimentalVMOptions,\ -H:ResourceConfigurationFiles=resources-config.json,\ - -H:ReflectionConfigurationFiles=reflection-config.json + -H:ReflectionConfigurationFiles=reflection-config.json,\ + -H:-UnlockExperimentalVMOptions ---- in order to ensure that various resources are included and additional reflection is registered. @@ -115,7 +139,9 @@ When using Maven, we could use the following configuration: native native - -H:ResourceConfigurationFiles=resources-config.json + + -H:+UnlockExperimentalVMOptions,-H:ResourceConfigurationFiles=resources-config.json,-H:-UnlockExperimentalVMOptions + @@ -225,7 +251,12 @@ public class MyReflectionConfiguration { ==== Using a configuration file -You can use a configuration file to register classes for reflection. +You can also use a configuration file to register classes for reflection, if you prefer relying on the GraalVM infrastructure. + +[WARNING] +==== +Relying on the GraalVM infrastructure means that you are responsible for keeping the configuration file up to date as new Mandrel and GraalVM versions are released. +==== As an example, in order to register all methods of class `com.acme.MyClass` for reflection, we create `reflection-config.json` (the most common location is within `src/main/resources`) @@ -253,9 +284,18 @@ The final order of business is to make the configuration file known to the `nati [source,properties] ---- -quarkus.native.additional-build-args =-H:ReflectionConfigurationFiles=reflection-config.json +quarkus.native.additional-build-args =\ + -H:+UnlockExperimentalVMOptions,\ + -H:ReflectionConfigurationFiles=reflection-config.json,\ + -H:-UnlockExperimentalVMOptions ---- +[NOTE] +==== +Starting with Mandrel 23.1 and GraalVM for JDK 21, `-H:ResourceConfigurationFiles=resources-config.json` results in a warning being shown unless wrapped in `-H:+UnlockExperimentalVMOptions` and `-H:-UnlockExperimentalVMOptions`. +The absence of these options will result in build failures in the future. +==== + In the previous snippet we were able to simply use `reflection-config.json` instead of specifying the entire path of the file simply because it was added to `src/main/resources`. If the file had been added to another directory, the proper file path would have had to be specified manually. @@ -266,8 +306,10 @@ Multiple options may be separated by a comma. For example, one could use: [source,properties] ---- quarkus.native.additional-build-args =\ + -H:+UnlockExperimentalVMOptions,\ -H:ResourceConfigurationFiles=resources-config.json,\ - -H:ReflectionConfigurationFiles=reflection-config.json + -H:ReflectionConfigurationFiles=reflection-config.json,\ + -H:-UnlockExperimentalVMOptions ---- in order to ensure that various resources are included and additional reflection is registered. @@ -284,7 +326,9 @@ When using Maven, we could use the following configuration: native native - -H:ReflectionConfigurationFiles=reflection-config.json + + -H:+UnlockExperimentalVMOptions,-H:ReflectionConfigurationFiles=reflection-config.json,-H:-UnlockExperimentalVMOptions + From 2632e1cbb9013c6a5b1712308bf8ccc0b23c40af Mon Sep 17 00:00:00 2001 From: brunobat Date: Mon, 16 Oct 2023 11:56:23 +0100 Subject: [PATCH 12/12] support external exporters in CDI --- .../deployment/OpenTelemetryBuildItem.java | 18 ------------------ .../otlp/ExternalOtelExporterBuildItem.java | 18 ++++++++++++++++++ .../exporter/otlp/OtlpExporterProcessor.java | 18 ++++++++++++------ ...Recorder.java => OTelExporterRecorder.java} | 10 +++++----- ...ExporterUtil.java => OTelExporterUtil.java} | 4 ++-- .../exporter/otlp/VertxGrpcExporter.java | 2 +- .../exporter/otlp/VertxHttpExporter.java | 2 +- .../otlp/OtlpExporterProviderTest.java | 12 ++++++------ 8 files changed, 45 insertions(+), 39 deletions(-) delete mode 100644 extensions/opentelemetry/deployment/src/main/java/io/quarkus/opentelemetry/deployment/OpenTelemetryBuildItem.java create mode 100644 extensions/opentelemetry/deployment/src/main/java/io/quarkus/opentelemetry/deployment/exporter/otlp/ExternalOtelExporterBuildItem.java rename extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/exporter/otlp/{OtlpRecorder.java => OTelExporterRecorder.java} (97%) rename extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/exporter/otlp/{OtlpExporterUtil.java => OTelExporterUtil.java} (88%) diff --git a/extensions/opentelemetry/deployment/src/main/java/io/quarkus/opentelemetry/deployment/OpenTelemetryBuildItem.java b/extensions/opentelemetry/deployment/src/main/java/io/quarkus/opentelemetry/deployment/OpenTelemetryBuildItem.java deleted file mode 100644 index 743782aa88c14..0000000000000 --- a/extensions/opentelemetry/deployment/src/main/java/io/quarkus/opentelemetry/deployment/OpenTelemetryBuildItem.java +++ /dev/null @@ -1,18 +0,0 @@ -package io.quarkus.opentelemetry.deployment; - -import io.opentelemetry.api.OpenTelemetry; -import io.quarkus.builder.item.SimpleBuildItem; -import io.quarkus.runtime.RuntimeValue; - -public final class OpenTelemetryBuildItem extends SimpleBuildItem { - - private final RuntimeValue value; - - public OpenTelemetryBuildItem(RuntimeValue value) { - this.value = value; - } - - public RuntimeValue getValue() { - return value; - } -} diff --git a/extensions/opentelemetry/deployment/src/main/java/io/quarkus/opentelemetry/deployment/exporter/otlp/ExternalOtelExporterBuildItem.java b/extensions/opentelemetry/deployment/src/main/java/io/quarkus/opentelemetry/deployment/exporter/otlp/ExternalOtelExporterBuildItem.java new file mode 100644 index 0000000000000..685cbf3f04400 --- /dev/null +++ b/extensions/opentelemetry/deployment/src/main/java/io/quarkus/opentelemetry/deployment/exporter/otlp/ExternalOtelExporterBuildItem.java @@ -0,0 +1,18 @@ +package io.quarkus.opentelemetry.deployment.exporter.otlp; + +import io.quarkus.builder.item.MultiBuildItem; + +/** + * Build item to be used by Quarkiverse exporters to register themselves as an external exporter. + */ +final public class ExternalOtelExporterBuildItem extends MultiBuildItem { + final private String exporterName; + + public ExternalOtelExporterBuildItem(String exporterName) { + this.exporterName = exporterName; + } + + public String getExporterName() { + return exporterName; + } +} diff --git a/extensions/opentelemetry/deployment/src/main/java/io/quarkus/opentelemetry/deployment/exporter/otlp/OtlpExporterProcessor.java b/extensions/opentelemetry/deployment/src/main/java/io/quarkus/opentelemetry/deployment/exporter/otlp/OtlpExporterProcessor.java index 1c03b5bd44920..8d2d594d3ca44 100644 --- a/extensions/opentelemetry/deployment/src/main/java/io/quarkus/opentelemetry/deployment/exporter/otlp/OtlpExporterProcessor.java +++ b/extensions/opentelemetry/deployment/src/main/java/io/quarkus/opentelemetry/deployment/exporter/otlp/OtlpExporterProcessor.java @@ -2,6 +2,7 @@ import static io.quarkus.opentelemetry.runtime.config.build.ExporterType.Constants.CDI_VALUE; +import java.util.List; import java.util.function.BooleanSupplier; import jakarta.enterprise.inject.Instance; @@ -27,7 +28,7 @@ import io.quarkus.opentelemetry.runtime.config.runtime.exporter.OtlpExporterRuntimeConfig; import io.quarkus.opentelemetry.runtime.exporter.otlp.EndUserSpanProcessor; import io.quarkus.opentelemetry.runtime.exporter.otlp.LateBoundBatchSpanProcessor; -import io.quarkus.opentelemetry.runtime.exporter.otlp.OtlpRecorder; +import io.quarkus.opentelemetry.runtime.exporter.otlp.OTelExporterRecorder; import io.quarkus.runtime.TlsConfig; import io.quarkus.vertx.core.deployment.CoreVertxBuildItem; @@ -60,12 +61,18 @@ void createEndUserSpanProcessor( @SuppressWarnings("deprecation") @BuildStep @Record(ExecutionTime.RUNTIME_INIT) - SyntheticBeanBuildItem createBatchSpanProcessor(OtlpRecorder recorder, + void createBatchSpanProcessor(OTelExporterRecorder recorder, OTelRuntimeConfig otelRuntimeConfig, OtlpExporterRuntimeConfig exporterRuntimeConfig, TlsConfig tlsConfig, - CoreVertxBuildItem vertxBuildItem) { - return SyntheticBeanBuildItem + CoreVertxBuildItem vertxBuildItem, + List externalOtelExporterBuildItem, + BuildProducer syntheticBeanBuildItemBuildProducer) { + if (!externalOtelExporterBuildItem.isEmpty()) { + // if there is an external exporter, we don't want to create the default one + return; + } + syntheticBeanBuildItemBuildProducer.produce(SyntheticBeanBuildItem .configure(LateBoundBatchSpanProcessor.class) .types(SpanProcessor.class) .setRuntimeInit() @@ -75,7 +82,6 @@ SyntheticBeanBuildItem createBatchSpanProcessor(OtlpRecorder recorder, new Type[] { ClassType.create(DotName.createSimple(SpanExporter.class.getName())) }, null)) .createWith(recorder.batchSpanProcessorForOtlp(otelRuntimeConfig, exporterRuntimeConfig, tlsConfig, vertxBuildItem.getVertx())) - .done(); - + .done()); } } diff --git a/extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/exporter/otlp/OtlpRecorder.java b/extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/exporter/otlp/OTelExporterRecorder.java similarity index 97% rename from extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/exporter/otlp/OtlpRecorder.java rename to extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/exporter/otlp/OTelExporterRecorder.java index 2da845ca59599..8757df5a2dcdd 100644 --- a/extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/exporter/otlp/OtlpRecorder.java +++ b/extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/exporter/otlp/OTelExporterRecorder.java @@ -38,7 +38,7 @@ @SuppressWarnings("deprecation") @Recorder -public class OtlpRecorder { +public class OTelExporterRecorder { public Function, LateBoundBatchSpanProcessor> batchSpanProcessorForOtlp( OTelRuntimeConfig otelRuntimeConfig, @@ -174,11 +174,11 @@ private URI getBaseUri(OtlpExporterRuntimeConfig exporterRuntimeConfig) { static String resolveEndpoint(final OtlpExporterRuntimeConfig runtimeConfig) { String endpoint = runtimeConfig.traces().legacyEndpoint() - .filter(OtlpRecorder::excludeDefaultEndpoint) + .filter(OTelExporterRecorder::excludeDefaultEndpoint) .orElse(runtimeConfig.traces().endpoint() - .filter(OtlpRecorder::excludeDefaultEndpoint) + .filter(OTelExporterRecorder::excludeDefaultEndpoint) .orElse(runtimeConfig.endpoint() - .filter(OtlpRecorder::excludeDefaultEndpoint) + .filter(OTelExporterRecorder::excludeDefaultEndpoint) .orElse(DEFAULT_GRPC_BASE_URI))); return endpoint.trim(); } @@ -208,7 +208,7 @@ private void configureTLS(HttpClientOptions options) { options.setKeyCertOptions(toPemKeyCertOptions()); options.setPemTrustOptions(toPemTrustOptions()); - if (OtlpExporterUtil.isHttps(baseUri)) { + if (OTelExporterUtil.isHttps(baseUri)) { options.setSsl(true); options.setUseAlpn(true); } diff --git a/extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/exporter/otlp/OtlpExporterUtil.java b/extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/exporter/otlp/OTelExporterUtil.java similarity index 88% rename from extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/exporter/otlp/OtlpExporterUtil.java rename to extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/exporter/otlp/OTelExporterUtil.java index 1108a7aca4f24..02aefe66744f9 100644 --- a/extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/exporter/otlp/OtlpExporterUtil.java +++ b/extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/exporter/otlp/OTelExporterUtil.java @@ -3,9 +3,9 @@ import java.net.URI; import java.util.Locale; -final class OtlpExporterUtil { +final class OTelExporterUtil { - private OtlpExporterUtil() { + private OTelExporterUtil() { } static int getPort(URI uri) { diff --git a/extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/exporter/otlp/VertxGrpcExporter.java b/extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/exporter/otlp/VertxGrpcExporter.java index d80e966e8d8a3..22a97a73e35d2 100644 --- a/extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/exporter/otlp/VertxGrpcExporter.java +++ b/extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/exporter/otlp/VertxGrpcExporter.java @@ -67,7 +67,7 @@ final class VertxGrpcExporter implements SpanExporter { Vertx vertx) { this.type = type; this.exporterMetrics = ExporterMetrics.createGrpcOkHttp(exporterName, type, meterProviderSupplier); - this.server = SocketAddress.inetSocketAddress(OtlpExporterUtil.getPort(grpcBaseUri), grpcBaseUri.getHost()); + this.server = SocketAddress.inetSocketAddress(OTelExporterUtil.getPort(grpcBaseUri), grpcBaseUri.getHost()); this.compressionEnabled = compressionEnabled; this.headers = headersMap; var httpClientOptions = new HttpClientOptions() diff --git a/extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/exporter/otlp/VertxHttpExporter.java b/extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/exporter/otlp/VertxHttpExporter.java index 0ed0ef9764984..ed09c04c0541a 100644 --- a/extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/exporter/otlp/VertxHttpExporter.java +++ b/extensions/opentelemetry/runtime/src/main/java/io/quarkus/opentelemetry/runtime/exporter/otlp/VertxHttpExporter.java @@ -1,6 +1,6 @@ package io.quarkus.opentelemetry.runtime.exporter.otlp; -import static io.quarkus.opentelemetry.runtime.exporter.otlp.OtlpExporterUtil.getPort; +import static io.quarkus.opentelemetry.runtime.exporter.otlp.OTelExporterUtil.getPort; import java.io.IOException; import java.io.OutputStream; diff --git a/extensions/opentelemetry/runtime/src/test/java/io/quarkus/opentelemetry/runtime/exporter/otlp/OtlpExporterProviderTest.java b/extensions/opentelemetry/runtime/src/test/java/io/quarkus/opentelemetry/runtime/exporter/otlp/OtlpExporterProviderTest.java index 50b17e200707e..f7cc1d9451645 100644 --- a/extensions/opentelemetry/runtime/src/test/java/io/quarkus/opentelemetry/runtime/exporter/otlp/OtlpExporterProviderTest.java +++ b/extensions/opentelemetry/runtime/src/test/java/io/quarkus/opentelemetry/runtime/exporter/otlp/OtlpExporterProviderTest.java @@ -18,7 +18,7 @@ class OtlpExporterProviderTest { @Test public void resolveEndpoint_legacyWins() { assertEquals("http://localhost:1111/", - OtlpRecorder.resolveEndpoint(createOtlpExporterRuntimeConfig( + OTelExporterRecorder.resolveEndpoint(createOtlpExporterRuntimeConfig( DEFAULT_GRPC_BASE_URI, "http://localhost:1111/", "http://localhost:2222/"))); @@ -27,7 +27,7 @@ public void resolveEndpoint_legacyWins() { @Test public void resolveEndpoint_newWins() { assertEquals("http://localhost:2222/", - OtlpRecorder.resolveEndpoint(createOtlpExporterRuntimeConfig( + OTelExporterRecorder.resolveEndpoint(createOtlpExporterRuntimeConfig( "http://localhost:1111/", DEFAULT_GRPC_BASE_URI, "http://localhost:2222/"))); @@ -36,7 +36,7 @@ public void resolveEndpoint_newWins() { @Test public void resolveEndpoint_globalWins() { assertEquals("http://localhost:1111/", - OtlpRecorder.resolveEndpoint(createOtlpExporterRuntimeConfig( + OTelExporterRecorder.resolveEndpoint(createOtlpExporterRuntimeConfig( "http://localhost:1111/", DEFAULT_GRPC_BASE_URI, DEFAULT_GRPC_BASE_URI))); @@ -45,7 +45,7 @@ public void resolveEndpoint_globalWins() { @Test public void resolveEndpoint_legacyTraceWins() { assertEquals("http://localhost:2222/", - OtlpRecorder.resolveEndpoint(createOtlpExporterRuntimeConfig( + OTelExporterRecorder.resolveEndpoint(createOtlpExporterRuntimeConfig( DEFAULT_GRPC_BASE_URI, null, "http://localhost:2222/"))); @@ -54,7 +54,7 @@ public void resolveEndpoint_legacyTraceWins() { @Test public void resolveEndpoint_legacyGlobalWins() { assertEquals(DEFAULT_GRPC_BASE_URI, - OtlpRecorder.resolveEndpoint(createOtlpExporterRuntimeConfig( + OTelExporterRecorder.resolveEndpoint(createOtlpExporterRuntimeConfig( DEFAULT_GRPC_BASE_URI, null, null))); @@ -63,7 +63,7 @@ public void resolveEndpoint_legacyGlobalWins() { @Test public void resolveEndpoint_testIsSet() { assertEquals(DEFAULT_GRPC_BASE_URI, - OtlpRecorder.resolveEndpoint(createOtlpExporterRuntimeConfig( + OTelExporterRecorder.resolveEndpoint(createOtlpExporterRuntimeConfig( null, null, null)));