Skip to content

Commit

Permalink
Initial copy of wiki content
Browse files Browse the repository at this point in the history
  • Loading branch information
holly-cummins committed Nov 28, 2024
1 parent 7c850cc commit 1b81c0a
Show file tree
Hide file tree
Showing 49 changed files with 5,107 additions and 0 deletions.
95 changes: 95 additions & 0 deletions migration/Migration-Guide-1.1.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
## Hibernate Search + Elasticsearch (Preview)

`quarkus.hibernate-search.elasticsearch.automatic-indexing.synchronization.strategy` has been renamed to `quarkus.hibernate-search.automatic-indexing.synchronization.strategy`.

If you are using our Hibernate Search + Elasticsearch extension, there's a good chance you will need to adjust your configuration.

## Neo4j (Preview)

The Neo4j driver was updated to the Final 4.0 version and they have renamed a few classes, most notably `org.neo4j.driver.reactive.RxResult.RxStatementResult` has been renamed to `org.neo4j.driver.reactive.RxResult`.

## Gradle plugin

We now recommend using Gradle 6.0.1+. Starting from this version the Gradle plugin is no longer deployed in Maven Central, therefore some minor changes in your Gradle project might be needed.

### Changes in the `settings.gradle` file

Let's start by changing the `settings.gradle` file. It should be changed from (`rootProject.name` value may vary depending on your project name):

```gradle
pluginManagement {
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
}
resolutionStrategy {
eachPlugin {
if (requested.id.id == 'io.quarkus') {
useModule("io.quarkus:quarkus-gradle-plugin:1.0.1.Final")
}
}
}
}

rootProject.name='my-project'
```
to:
```gradle
pluginManagement {
repositories {
mavenLocal()
mavenCentral()
gradlePluginPortal()
}
plugins {
id 'io.quarkus' version "${quarkusPluginVersion}"
}
}
rootProject.name='my-project'
```

NOTE: the `plugins{}` method is not supported in Gradle 5.x. In this case make sure to explicitly declare the plugin version in the `build.gradle` file.

### Changes in the `build.gradle` file

Change your `build.gradle` file to use the plugin DSL format, from:

```gradle
// this block is necessary to make enforcedPlatform work for Quarkus plugin available
// only locally (snapshot) that is also importing the Quarkus BOM
buildscript {
repositories {
mavenLocal()
}
dependencies {
classpath "io.quarkus:quarkus-gradle-plugin:${quarkusPluginVersion}"
}
}

plugins {
id 'java'
}

apply plugin: 'io.quarkus'
```
to:
```gradle
plugins {
id 'java'
id 'io.quarkus'
}

```

## Extension framework

### Updated configuration framework

Our configuration framework got a big update to fix a number of issues all around.

The main consequence of this change is that you will need to mark optional collections and maps as `Optional` in your config classes (that means `Optional<List<String>>` for instance).

### GizmoAdaptor

The `GizmoAdaptor` class has been renamed to `GeneratedClassGizmoAdaptor`, due to the introduction of `GeneratedBeanGizmoAdaptor`.
14 changes: 14 additions & 0 deletions migration/Migration-Guide-1.10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Hibernate ORM

* `quarkus.hibernate-orm.log.bind-param` is deprecated and has been renamed `quarkus.hibernate-orm.log.bind-parameters`. The former will be removed at a later stage.

## Hibernate Search ORM + Elasticsearch (Preview)

* You should update your Maven/Gradle dependencies: replace any occurrence of the artifact ID `hibernate-search-elasticsearch` with `hibernate-search-orm-elasticsearch`
* You should update your configuration: replace any occurrence of the prefix `quarkus.hibernate-search.` with `quarkus.hibernate-search-orm.
* Many deprecated methods and classes were removed. For more information: https://in.relation.to/2020/11/04/hibernate-search-6-0-0-CR1/#breaking_changes
* Async/reactive methods now return `CompletionStage` instead of `CompletableFuture`. To convert a `CompletionStage` to a `Future`, call `.toCompletableFuture()`.`

## MongoDB

* The name of the default client is now `<default>` instead of the previous `__default__` to be more consistent with the rest of the code base. It shouldn't have too many consequences but typically the health checks now expose the new name.
55 changes: 55 additions & 0 deletions migration/Migration-Guide-1.11.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
## Log min-level

If you are using TRACE (or DEBUG too if using 1.11.0.Final or 1.11.1.Final - changed in 1.11.2.Final) log level, we made an important change in our logging layer: a new build-time `min-level` configuration property was introduced that sets the minimum log level you will be able to use at runtime.

So if you are logging at TRACE level for some loggers, setting `min-level` to TRACE is required.

## Non-application endpoints moved to their own namespace

[Path resolution for configurable endpoints](https://quarkus.io/blog/path-resolution-in-quarkus/) changed in this release. This transition was a little rough. There are some differences in behavior between 1.11.0.Final, when this was introduced, and 1.11.5.Final, when issues were resolved.

By default, non-application endpoints, like health and metrics, are now grouped under `/q`.

Convenience redirects from previous URLs to new namespaced URLs can be enabled and disabled by setting:
`quarkus.http.redirect-to-non-application-root-path=false`

Disable the Quarkus non-application endpoints by setting the non-application endpoint root to be the same as the http root:
`quarkus.http.non-application-root-path=${quarkus.http.root-path}`

You can customize the root used for non-application endpoints by setting `quarkus.http.non-application-root-path` to an alternative path.

As of 1.11.5.Final, leading slashes in configured paths are significant. Please see [Path resolution in Quarkus](https://quarkus.io/blog/path-resolution-in-quarkus/) for more details and examples.

## Jackson

The default `ObjectMapper` obtained via CDI and consumed by the Quarkus extensions now ignores unknown properties (by disabling the `DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES` feature).

See https://quarkus.io/guides/rest-json#jackson for more details about how to go back to the previous behavior.

## Kubernetes Client

We upgraded the Kubernetes Client to version 5. Please refer to the [Kubernetes Client migration guide](https://github.com/fabric8io/kubernetes-client/blob/master/doc/MIGRATION-v5.md) for more information.

## Hibernate Search ORM + Elasticsearch

* The default required status for Elasticsearch indexes is now `yellow`. If you have specific requirements and need to wait for indexes to be `green` on startup, set `quarkus.hibernate-search.elasticsearch.schema-management.required-status` to `green`.
* [Queries](https://docs.jboss.org/hibernate/search/6.0/reference/en-US/html_single/#troubleshooting-logging-query)
and [requests](https://docs.jboss.org/hibernate/search/6.0/reference/en-US/html_single/#troubleshooting-logging-elasticsearch-request)
are now logged at the `TRACE` level instead of the `DEBUG` level.

## MongoDB Panache

* A recent change was made to MongoDB panache to bring it in to conformity with the Hibernate Panache behavior. Public field accesses on `MongoEntity` and `ReactiveMongoEntity` types are now wrapped with the appropriate `get` or `set` methods. In general, you will like not see any difference in your application. However, if you have written a custom `get` or `set` method you may notice a change in behavior if those custom methods deviate from the standard `get`/`set` paradigm. See [this issue](https://github.com/quarkusio/quarkus-quickstarts/pull/726) for an example of something you might run in to.

## quarkus-smallrye-jwt-build

A new `quarkus-smallrye-jwt-build` extension has been introduced allowing users to generate JWT tokens without having to depend on `quarkus-smallrye-jwt` extension which is used for verifying JWT tokens.

## GraalVM 20.3

We upgraded the base container image to build native executables to GraalVM 20.3.

However, we hit a regression in the ImageIO support so if you are using ImageIO and seeing errors such as `UnsatisfiedLinkError: no awt in java.library.path`. This regression is specific to GraalVM 20.3.0 and will be fixed in GraalVM 20.3.1. Your options are:

* Go back to GraalVM 20.2 until we upgrade to GraalVM 20.3.1: `quarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-native-image:20.2.0-java11`
* Use [Mandrel](https://github.com/graalvm/mandrel/releases) in which we backported some additional ImageIO support from GraalVM master: `quarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-mandrel:20.3-java11`
127 changes: 127 additions & 0 deletions migration/Migration-Guide-1.12.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
## Fast-jar as default

Fast-jar is a new Quarkus application packaging format that is faster to boot, compared to our legacy jar packaging. It was introduced several versions ago and it brings many improvements that made us make it the new default.

### Starting the application

The biggest change here is that to start your Quarkus application, you should now use:

```bash
java -jar target/quarkus-app/quarkus-run.jar
```

(instead of using the versioned `-runner` jar)

This change will concern all your applications as soon as you have upgraded them to 1.12.

When deploying your application, make sure to deploy the entire `quarkus-app` directory.

For those who want to stick to the legacy jar packaging, they can go back to the previous behavior by adding the following property to the `application.properties`:

```properties
quarkus.package.type=legacy-jar
```

### Dockerfiles

For existing applications, you have two Dockerfiles:

- `Dockerfile.jvm`: this is the one for the `legacy-jar` packaging
- `Dockerfile.fast-jar`: this is the one for `fast-jar` packaging (so the new default)

For newly generated applications, the situation is a bit different:

- `Dockerfile.jvm`: this is the one for the `fast-jar` packaging (so the new default)
- `Dockerfile.legacy-jar`: this is the one for `legacy-jar`

Note that if you want all your applications to be consistent, you can just update the Dockerfiles of your existing applications with the ones of a newly generated project.

You can find an example of the new Fast jar Dockerfile [here](https://github.com/quarkusio/quarkus-quickstarts/blob/master/validation-quickstart/src/main/docker/Dockerfile.jvm).

## Quarkus Maven Plugin

We cleaned up a few things in the Quarkus Maven Plugin. Make sure the `quarkus-maven-plugin` section of the `pom.xml` of your project looks like:

```xml
<plugin>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
<version>${quarkus-plugin.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>build</goal>
<goal>generate-code</goal>
<goal>generate-code-tests</goal>
</goals>
</execution>
</executions>
</plugin>
```

## Mutiny

Mutiny has deprecated a few APIs. The deprecated APIs are still available and would work, but are planned for removal.

Changed APIs are:

* `multi.collectItems()` -> `multi.collect()`
* `multi.groupItems()` -> `multi.group()`
* `multi.transform().byTakingFirstItems(long)/byTestingItemsWith()/byFilteringItemsWith()` -> `multi.select().first(long)`, `multi.select().when(Function<T, Uni<?>>)`, `multi.select().where(Predicate<T>)`
* `multi.transform().toHotStream()` -> `multi.toHotStream()`
* `multi.transform().bySkippingFirstItems(long)` -> `multi.skip().first(long)`

Mutiny removes two methods (deprecated for 11 months):

* `uni.subscribeOn` -> `uni.runSubscriptionOn()`
* `multi.subscribeOn` -> `multi.runSubscriptionOn()`


## Mailer

* The `MailTemplateInstance` now returns a `Uni<Void>` instead of `CompletionStage<Void>`. To convert a `Uni` to a `CompletionStage`, call `.subscribeAsCompletionStage()`.

## Vert.x

* The Axle and RX Java API from Vert.x are no more exposed, use the Mutiny API instead. These features were deprecated since February 2020.

## HTTP

A couple of the default file upload settings have changed.

`quarkus.http.body.delete-uploaded-files-on-end` now defaults to `true` (the reason being that no uploaded files should be left over on the server by default).
`quarkus.http.body.uploads-directory` now defaults to `${java.io.tmpdir}/uploads` (the reason being that some application might not have the permissions to write to the current working directory)


[Path resolution for configurable endpoints](https://quarkus.io/blog/path-resolution-in-quarkus/) changed in this release.

By default, non-application endpoints, like health and metrics, are now grouped under `/q`.

Convenience redirects from previous URLs to new namespaced URLs can be enabled and disabled by setting:
`quarkus.http.redirect-to-non-application-root-path=false`

Disable the Quarkus non-application endpoints by setting the non-application endpoint root to be the same as the http root:
`quarkus.http.non-application-root-path=${quarkus.http.root-path}`

You can customize the root used for non-application endpoints by setting `quarkus.http.non-application-root-path` to an alternative path.

As of 1.12.1.Final, leading slashes in configured paths are significant. Please see [Path resolution in Quarkus](https://quarkus.io/blog/path-resolution-in-quarkus/) for more details and examples.

## Rest Client Exceptions

If you are using `quarkus-rest-client` then please be aware that MP REST Client or JAX-RS Client invocation exceptions will no longer have JAX-RS `Response` available by default to avoid leaking some potentially sensitive downstream endpoint data such as cookies. You can set `resteasy.original.webapplicationexception.behavior=true` in `application.properties` if you need to access the exception `Response`.
Please see https://docs.jboss.org/resteasy/docs/4.5.9.Final/userguide/html/ExceptionHandling.html#ResteasyWebApplicationException for more information.

## Version of distroless image

If you are using the distroless image, please note that it now has an immutable version so you might have to update your Dockerfiles to use: `quay.io/quarkus/quarkus-distroless-image:1.0` instead of `quay.io/quarkus/quarkus-distroless-image:20.3-java11`.


## Kafka Health Check

Readiness health checks for _incoming_ Kafka channel may report _DOWN_ if they are consumed lazily (like using SSE). To avoid this, disable the readiness health check:

```
mp.messaging.incoming.your-topic.health-readiness-enabled=false
```
48 changes: 48 additions & 0 deletions migration/Migration-Guide-1.13.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
## Configuration

All `application.properties` files found in the classpath are loaded in the Quarkus configuration. Files in the current application will have priority and files in dependencies will use the classloader order. This means, that your Quarkus application may pick up additional configuration that was not picked up previously and possible change the behaviour of your application.

## Jackson

`SerializationFeature.WRITE_DATES_AS_TIMESTAMPS` is now **disabled** by default which means your temporal types will be serialized as strings (e.g. `1988-11-17T00:00:00Z`) starting 1.13, instead of numeric values.

You can easily go back to the previous behavior by adding `quarkus.jackson.write-dates-as-timestamps=true` to your `application.properties`.

## Live Reload Instrumentation

`quarkus.dev.instrumentation` has been renamed to `quarkus.live-reload.instrumentation` to be more consistent with other configuration properties related to live reload.

## Removal of the `native-image` Maven goal

The goal `native-image` of `quarkus-maven-plugin` had long been deprecated and the plugin had been logging a warning since `1.11.1.Final`.

It has now finally been removed in 1.13. Please remove the plugin execution from your `pom.xml` and simply add the following property to your native profile:

```xml
<properties>
<quarkus.package.type>native</quarkus.package.type>
</properties>
```

In case you have been setting non-default configuration parameters like `<enableHttpsUrlHandler>true</enableHttpsUrlHandler>`, replace those with the respective [documented properties](https://quarkus.io/guides/building-native-image#configuration-reference), e.g. `<quarkus.native.enable-https-url-handler>true</quarkus.native.enable-https-url-handler>`.

## Removal of the Maven `uberJar` and Gradle `--uber-jar` parameters

Both the Maven `uberJar` and the Gradle `--uber-jar` parameters had been deprecated since `1.11.2.Final`/`1.12.0.CR1` and have now been removed in 1.13.

As a replacement, add `quarkus.package.type=uber-jar` to your `application.properties` (or e.g. `pom.xml`).

## New methods signatures in `AuthenticationRequest`

New methods signatures have been added to the `AuthenticationRequest` interface to allow transportation of additional context information with the request such as context path, HTTP header or query parameter values. If you were implementing this interface before, you can now extend `BaseAuthenticationRequest` in 1.13 without having to implement the new methods.

## Kafka

Kafka `group.id` now defaults to application name (as configured by `quarkus.application.name`).
Only if the application name isn't set, a random string is used.

Automatic generation of a random string is merely a development convenience.
You shouldn't rely on it in production.

If you require application instances to have a unique Kafka `group.id`, you should ensure that explicitly.
For example, you can set the `KAFKA_GROUP_ID` environment variable.
Loading

0 comments on commit 1b81c0a

Please sign in to comment.