Skip to content

Commit

Permalink
Merge branch 'main' into 35915
Browse files Browse the repository at this point in the history
  • Loading branch information
ejba authored Sep 19, 2023
2 parents 9a83b66 + 7903aa7 commit aacf00a
Show file tree
Hide file tree
Showing 59 changed files with 5,055 additions and 479 deletions.
10 changes: 5 additions & 5 deletions bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
<opentracing-jdbc.version>0.2.4</opentracing-jdbc.version>
<opentracing-kafka.version>0.1.15</opentracing-kafka.version>
<opentracing-mongo.version>0.1.5</opentracing-mongo.version>
<opentelemetry.version>1.28.0</opentelemetry.version>
<opentelemetry-alpha.version>1.28.0-alpha</opentelemetry-alpha.version>
<opentelemetry.version>1.29.0</opentelemetry.version>
<opentelemetry-alpha.version>1.29.0-alpha</opentelemetry-alpha.version>
<jaeger.version>1.8.1</jaeger.version>
<quarkus-http.version>5.0.3.Final</quarkus-http.version>
<micrometer.version>1.11.1</micrometer.version><!-- keep in sync with hdrhistogram -->
Expand Down Expand Up @@ -192,7 +192,7 @@
<keycloak.version>22.0.3</keycloak.version>
<logstash-gelf.version>1.15.1</logstash-gelf.version>
<checker-qual.version>3.38.0</checker-qual.version>
<error-prone-annotations.version>2.20.0</error-prone-annotations.version>
<error-prone-annotations.version>2.21.1</error-prone-annotations.version>
<jib-core.version>0.24.0</jib-core.version>
<google-http-client.version>1.43.3</google-http-client.version>
<scram-client.version>2.1</scram-client.version>
Expand All @@ -205,7 +205,7 @@
<log4j2-api.version>2.20.0</log4j2-api.version>
<log4j-jboss-logmanager.version>1.3.0.Final</log4j-jboss-logmanager.version>
<avro.version>1.11.2</avro.version>
<apicurio-registry.version>2.4.3.Final</apicurio-registry.version>
<apicurio-registry.version>2.4.7.Final</apicurio-registry.version>
<apicurio-common-rest-client.version>0.1.18.Final</apicurio-common-rest-client.version> <!-- must be the version Apicurio Registry uses -->
<testcontainers.version>1.18.3</testcontainers.version> <!-- Make sure to also update docker-java.version to match its needs -->
<docker-java.version>3.3.0</docker-java.version> <!-- must be the version Testcontainers use -->
Expand All @@ -215,7 +215,7 @@
<aesh.version>2.7</aesh.version>
<aesh-readline.version>2.4</aesh-readline.version>
<jansi.version>2.4.0</jansi.version> <!-- Keep in sync with aesh-readline and dekorate -->
<jgit.version>6.6.0.202305301015-r</jgit.version>
<jgit.version>6.6.1.202309021850-r</jgit.version>
<!-- these two artifacts needs to be compatible together -->
<strimzi-oauth.version>0.12.0</strimzi-oauth.version>
<strimzi-oauth.nimbus.version>9.34</strimzi-oauth.nimbus.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void testClean() throws Exception {

final Path projectDir = workDir().resolve("acme-clean");
final CliDriver.Result infoResult = run(projectDir, "info");

assertThat(infoResult.getExitCode()).isEqualTo(0);
assertQuarkusPlatformBoms(infoResult.stdout,
"org.acme.quarkus.platform:quarkus-bom:pom:2.0.0 " + UP_TO_DATE_ICON.iconOrMessage(),
"org.acme.quarkus.platform:acme-bom:pom:2.0.0 " + UP_TO_DATE_ICON.iconOrMessage());
Expand All @@ -72,7 +72,8 @@ void testClean() throws Exception {
assertRegistryExtensions(infoResult.stdout, "registry.acme.org",
"org.acme:acme-quarkiverse-extension:1.0");

final CliDriver.Result updateResult = run(projectDir, "update");
final CliDriver.Result updateResult = run(projectDir, "update", "--no-rewrite");
assertThat(updateResult.getExitCode()).isEqualTo(0);
assertQuarkusPlatformBoms(updateResult.stdout,
"org.acme.quarkus.platform:quarkus-bom:pom:2.0.0 " + UP_TO_DATE_ICON.iconOrMessage(),
"org.acme.quarkus.platform:acme-bom:pom:2.0.0 " + UP_TO_DATE_ICON.iconOrMessage());
Expand Down Expand Up @@ -102,11 +103,15 @@ void testMisalignedPlatformExtensionVersion() throws Exception {
assertRegistryExtensions(infoResult.stdout, "registry.acme.org",
"org.acme:acme-quarkiverse-extension:1.0");

final CliDriver.Result rectifyResult = run(projectDir, "update", "--platform-version=1.0.0");
final CliDriver.Result rectifyResult = run(projectDir, "update", "--platform-version=1.0.0", "--no-rewrite");
assertThat(rectifyResult.getExitCode()).isEqualTo(0);

assertThat(rectifyResult.stdout)
.contains("[INFO] Update: org.acme.quarkus.platform:acme-quarkus-subatomic:1.0.0 -> remove version (managed)");
.contains(
"[INFO] Update: org.acme.quarkus.platform:acme-quarkus-subatomic:1.0.0 -> drop version (managed by platform)");

final CliDriver.Result updateResult = run(projectDir, "update", "-Dquarkus.platform.version=1.0.0");
final CliDriver.Result updateResult = run(projectDir, "update", "-Dquarkus.platform.version=1.0.0", "--no-rewrite");
assertThat(updateResult.getExitCode()).isEqualTo(0);
assertQuarkusPlatformBomUpdates(updateResult.stdout,
ArtifactCoords.pom("org.acme.quarkus.platform", "quarkus-bom", "1.0.0 -> 2.0.0"),
ArtifactCoords.pom("org.acme.quarkus.platform", "acme-bom", "1.0.0 -> 2.0.0"));
Expand Down
8 changes: 5 additions & 3 deletions docs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +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>jdk-17</graal-community.version-for-documentation>
<mandrel.version-for-documentation>jdk-17</mandrel.version-for-documentation>
<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>

<assembly-maven-plugin.version>3.5.0</assembly-maven-plugin.version>
<asciidoctor-maven-plugin.version>2.0.0</asciidoctor-maven-plugin.version>
Expand All @@ -27,7 +29,7 @@
<roaster-jdt.version>2.26.0.Final</roaster-jdt.version>
<maven-model-helper.version>21</maven-model-helper.version>
<eclipse-collections.version>11.1.0</eclipse-collections.version>
<jgit.version>6.6.0.202305301015-r</jgit.version>
<jgit.version>6.6.1.202309021850-r</jgit.version>

<quarkus-home-url>https://quarkus.io</quarkus-home-url>
<quarkus-base-url>https://github.com/quarkusio/quarkus</quarkus-base-url>
Expand Down
6 changes: 3 additions & 3 deletions docs/src/main/asciidoc/_attributes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
// .
:maven-version: ${proposed-maven-version}
:graalvm-version: ${graal-community.version-for-documentation}
:graalvm-flavor: ${graal-community.version-for-documentation}
:mandrel-version: ${mandrel.version-for-documentation}
:mandrel-flavor: ${mandrel.version-for-documentation}
:graalvm-docs-version: ${graal-community.tag-for-documentation}
:graalvm-flavor: ${graal-community.image-tag-for-documentation}
:mandrel-flavor: ${mandrel.image-tag-for-documentation}
:surefire-version: ${version.surefire.plugin}
:gradle-version: ${gradle-wrapper.version}
:elasticsearch-version: ${elasticsearch-server.version}
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/aws-lambda-http.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -576,4 +576,4 @@ the `QUARKUS_AWS_LAMBDA_FORCE_USER_NAME` environment variable

== SnapStart

To optimize your application for Lambda SnapStart, check xref:amazon-snapstart.adoc[the SnapStart Configuration Documentation].
To optimize your application for Lambda SnapStart, check xref:aws-lambda-snapstart.adoc[the SnapStart Configuration Documentation].
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/aws-lambda.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -715,4 +715,4 @@ That's all there is to it!

== SnapStart

To optimize your application for Lambda SnapStart, check xref:amazon-snapstart.adoc[the SnapStart Configuration Documentation].
To optimize your application for Lambda SnapStart, check xref:aws-lambda-snapstart.adoc[the SnapStart Configuration Documentation].
4 changes: 2 additions & 2 deletions docs/src/main/asciidoc/building-native-image.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ If you cannot install GraalVM, you can use a multi-stage Docker build to run Mav
There is an explanation of how to do this at <<#multistage-docker,the end of this guide>>.
====

Version {graalvm-version} is required.
GraalVM {graalvm-version} is required.

1. Install GraalVM if you haven't already. You have a few options for this:
** Download the appropriate archive from <https://github.com/graalvm/mandrel/releases> or <https://github.com/graalvm/graalvm-ce-builds/releases>, and unpack it like you would any other JDK.
Expand Down Expand Up @@ -233,7 +233,7 @@ You can do so by prepending the flag with `-J` and passing it as additional nati
IMPORTANT: Fully static native executables support is experimental.

On Linux it's possible to package a native executable that doesn't depend on any system shared library.
There are link:https://www.graalvm.org/latest/reference-manual/native-image/guides/build-static-executables/#prerequisites-and-preparation[some system requirements] to be fulfilled and additional build arguments to be used along with the `native-image` invocation, a minimum is `-Dquarkus.native.additional-build-args="--static","--libc=musl"`.
There are link:https://www.graalvm.org/{graalvm-docs-version}/reference-manual/native-image/guides/build-static-executables/#prerequisites-and-preparation[some system requirements] to be fulfilled and additional build arguments to be used along with the `native-image` invocation, a minimum is `-Dquarkus.native.additional-build-args="--static","--libc=musl"`.

Compiling fully static binaries is done by statically linking https://musl.libc.org/[musl] instead of `glibc` and should not be used in production without rigorous testing.

Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/cdi-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ quarkus.arc.exclude-dependency.acme.artifact-id=acme-services <2>
== Native Executables and Private Members
Quarkus is using GraalVM to build a native executable.
One of the limitations of GraalVM is the usage of link:https://www.graalvm.org/latest/reference-manual/native-image/Reflection/[Reflection, window="_blank"].
One of the limitations of GraalVM is the usage of link:https://www.graalvm.org/{graalvm-docs-version}/reference-manual/native-image/Reflection/[Reflection, window="_blank"].
Reflective operations are supported but all relevant members must be registered for reflection explicitly.
Those registrations result in a bigger native executable.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/gradle-tooling.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ Once executed, you will be able to safely run quarkus task with `--offline` flag

Native executables make Quarkus applications ideal for containers and serverless workloads.

Make sure to have `GRAALVM_HOME` configured and pointing to the latest release of GraalVM version {graalvm-version}.
Make sure to have `GRAALVM_HOME` configured and pointing to the latest release of GraalVM {graalvm-version}.

Create a native executable using:

Expand Down
24 changes: 17 additions & 7 deletions docs/src/main/asciidoc/hibernate-reactive-panache.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@ breadth of an Object Relational Mapper allowing you to access your database over
It makes complex mappings possible, but it does not make simple and common mappings trivial.
Hibernate Reactive with Panache focuses on making your entities trivial and fun to write in Quarkus.

[NOTE]
====
Hibernate Reactive is not a replacement for xref:hibernate-orm-panache.adoc[Hibernate ORM] or the future of Hibernate ORM.
It is a different stack tailored for reactive use cases where you need high-concurrency.
Furthermore, using RESTEasy Reactive, our default REST layer, does not require the use of Hibernate Reactive.
It is perfectly valid to use RESTEasy Reactive with Hibernate ORM,
and if you do not need high-concurrency, or are not accustomed to the reactive paradigm, it is recommended to use Hibernate ORM.
====

== First: an example

What we're doing in Panache allows you to write your Hibernate Reactive entities like this:
Expand Down Expand Up @@ -685,7 +695,7 @@ matching the values returned by the select clause:
----
import io.quarkus.runtime.annotations.RegisterForReflection;
@RegisterForReflection
@RegisterForReflection
public class RaceWeight {
public final String race;
public final Double weight
Expand Down Expand Up @@ -736,7 +746,7 @@ NOTE: Note that a Panache entity may not be used from a blocking thread. See als
Also make sure to wrap methods that modify the database or involve multiple queries (e.g. `entity.persist()`) within a transaction.
You can annotate a CDI business method that returns `Uni` with the `@WithTransaction` annotation.
The method will be intercepted and the returned `Uni` is triggered within a transaction boundary.
Alternatively, you can use the `Panache.withTransaction()` method for the same effect.
Alternatively, you can use the `Panache.withTransaction()` method for the same effect.

IMPORTANT: You cannot use the `@Transactional` annotation with Hibernate Reactive for your transactions: you must use `@WithTransaction`, and your annotated method must return a `Uni` to be non-blocking.

Expand Down Expand Up @@ -871,9 +881,9 @@ public class SomeTest {
@Test
@RunOnVertxContext
public void testEntity(TransactionalUniAsserter asserter) {
public void testEntity(TransactionalUniAsserter asserter) {
asserter.execute(() -> new MyEntity().persist()); <1>
asserter.assertEquals(() -> MyEntity.count(), 1l); <2>
asserter.assertEquals(() -> MyEntity.count(), 1l); <2>
asserter.execute(() -> MyEntity.deleteAll()); <3>
}
}
Expand Down Expand Up @@ -1062,7 +1072,7 @@ public class PanacheFunctionalityTest {
@RunOnVertxContext // <1>
@Test
public void testPanacheRepositoryMocking(UniAsserter asserter) { // <2>
// Mocked classes always return a default value
asserter.assertEquals(() -> mockablePersonRepository.count(), 0l);
Expand Down Expand Up @@ -1091,7 +1101,7 @@ public class PanacheFunctionalityTest {
});
asserter.assertThat(() -> mockablePersonRepository.findById(12l), p -> Assertions.assertSame(p, asserter.getData(key)));
asserter.assertNull(() -> mockablePersonRepository.findById(42l));
// Mock throwing
asserter.execute(() -> Mockito.when(mockablePersonRepository.findById(12l)).thenThrow(new WebApplicationException()));
asserter.assertFailedWith(() -> {
Expand All @@ -1113,7 +1123,7 @@ public class PanacheFunctionalityTest {
Mockito.verify(mockablePersonRepository).persist(Mockito.<Person> any());
Mockito.verifyNoMoreInteractions(mockablePersonRepository);
});
// IMPORTANT: We need to execute the asserter within a reactive session
asserter.surroundWith(u -> Panache.withSession(() -> u));
}
Expand Down
11 changes: 10 additions & 1 deletion docs/src/main/asciidoc/hibernate-reactive.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,19 @@ include::_attributes.adoc[]
:reactive-doc-url-prefix: https://hibernate.org/reactive/documentation/1.1/reference/html_single/#getting-started
:extension-status: preview


link:https://hibernate.org/reactive/[Hibernate Reactive] is a reactive API for Hibernate ORM, supporting non-blocking database drivers
and a reactive style of interaction with the database.

[NOTE]
====
Hibernate Reactive is not a replacement for xref:hibernate-orm.adoc[Hibernate ORM] or the future of Hibernate ORM.
It is a different stack tailored for reactive use cases where you need high-concurrency.
Also, using RESTEasy Reactive, our default REST layer, does not require the use of Hibernate Reactive.
It is perfectly valid to use RESTEasy Reactive with Hibernate ORM,
and if you do not need high-concurrency, or are not accustomed to the reactive paradigm, it is recommended to use Hibernate ORM.
====

[NOTE]
====
Hibernate Reactive works with the same annotations and most of the configuration described in the
Expand Down
31 changes: 26 additions & 5 deletions docs/src/main/asciidoc/logging.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -241,13 +241,34 @@ All potential properties are listed in the <<loggingConfigurationReference,loggi

=== Logging categories

Logging is done on a per-category basis, with each category being configured independently.
A category configuration recursively applies to all subcategories of that category unless there is a more specific matching sub-category configuration.
Logging is configured on a per-category basis, with each category being configured independently.
Configuration for a category applies recursively to all subcategories unless there is a more specific subcategory configuration.

The parent of all logging categories is called the "root category".
This category, being the ultimate parent, may contain configuration which applies globally to all other categories. This includes the globally configured handlers and formatters.
The parent of all logging categories is called the "root category."
As the ultimate parent, this category might contain a configuration that applies globally to all other categories.
This includes the globally configured handlers and formatters.

.An example of a global configuration that applies to all categories:
====
[source, properties]
----
quarkus.log.handlers=console,mylog
----
In this example, the root category is configured to use two handlers: `console` and `mylog`.
====

.An example of a per-category configuration:
====
[source, properties]
----
quarkus.log.category."org.apache.kafka.clients".level=INFO
quarkus.log.category."org.apache.kafka.common.utils".level=INFO
----
This example shows how you can configure the minimal log level on the categories `org.apache.kafka.clients` and `org.apache.kafka.common.utils`.
====

Thus, configurations made under `quarkus.log.console.+*+`, `quarkus.log.file.+*+`, and `quarkus.log.syslog.+*+` are global and apply for all categories.
For more information, see <<loggingConfigurationReference>>.

If you want to configure something extra for a specific category, create a named handler like `quarkus.log.handler.[console|file|syslog].<your-handler-name>.*` and set it up for that category by using `quarkus.log.category.<my-category>.handlers`.
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/maven-tooling.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ This goal will resolve all the runtime, build time, test and dev mode dependenci

Native executables make Quarkus applications ideal for containers and serverless workloads.

Make sure to have `GRAALVM_HOME` configured and pointing to the latest release of GraalVM version {graalvm-version}.
Make sure to have `GRAALVM_HOME` configured and pointing to the latest release of GraalVM {graalvm-version}.
Verify that your `pom.xml` has the proper `native` profile as shown in <<build-tool-maven>>.

Create a native executable using:
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/native-and-ssl.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ The file containing the custom TrustStore does *not* (and probably should not) h
=== Run time configuration

Using the runtime certificate configuration, supported by GraalVM since 21.3 does not require any special or additional configuration compared to regular java programs or Quarkus in jvm mode.
For more information, see the link:https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/CertificateManagement/#runtime-options[Runtime Options] section of the "GraalVM Certificate Management in Native Image" guide.
For more information, see the link:https://www.graalvm.org/{graalvm-docs-version}/reference-manual/native-image/dynamic-features/CertificateManagement/#runtime-options[Runtime Options] section of the "GraalVM Certificate Management in Native Image" guide.

[#working-with-containers]
=== Working with containers
Expand Down
Loading

0 comments on commit aacf00a

Please sign in to comment.