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

3.2.9 backports 2 #37082

Merged
merged 4 commits into from
Nov 14, 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
17 changes: 10 additions & 7 deletions docs/src/main/asciidoc/blaze-persistence.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -33,34 +33,37 @@

Add the following dependencies to your project:

* the Blaze-Persistence extension: `com.blazebit:blaze-persistence-integration-quarkus`
* the Blaze-Persistence extension: `com.blazebit:blaze-persistence-integration-quarkus-3`
* further Blaze-Persistence integrations as needed:
- `blaze-persistence-integration-jackson` for link:https://persistence.blazebit.com/documentation/entity-view/manual/en_US/index.html#Jackson%20integration[Jackson]
- `blaze-persistence-integration-jackson-jakarta` for link:https://persistence.blazebit.com/documentation/entity-view/manual/en_US/index.html#Jackson%20integration[Jackson]
- `blaze-persistence-integration-jsonb-jakarta` for link:https://persistence.blazebit.com/documentation/1.6/entity-view/manual/en_US/#jsonb-integration[JSONB]
- `blaze-persistence-integration-jaxrs` for link:https://persistence.blazebit.com/documentation/entity-view/manual/en_US/index.html#jaxrs-integration[Jakarta REST]
- `blaze-persistence-integration-jaxrs-jackson-jakarta` for link:https://persistence.blazebit.com/documentation/entity-view/manual/en_US/index.html#jaxrs-integration[Jakarta REST with Jackson]
- `blaze-persistence-integration-jaxrs-jsonb-jakarta` for link:https://persistence.blazebit.com/documentation/entity-view/manual/en_US/index.html#jaxrs-integration[Jakarta REST with JSONB]

[source,xml,role="primary asciidoc-tabs-target-sync-cli asciidoc-tabs-target-sync-maven"]
.Example dependencies using Maven
----
<!-- Blaze-Persistence specific dependencies -->
<dependency>
<groupId>com.blazebit</groupId>
<artifactId>blaze-persistence-integration-quarkus</artifactId>
<artifactId>blaze-persistence-integration-quarkus-3</artifactId>
</dependency>
<dependency>
<groupId>com.blazebit</groupId>
<artifactId>blaze-persistence-integration-hibernate-5.6</artifactId>
<artifactId>blaze-persistence-integration-hibernate-6.2</artifactId>
<scope>runtime</scope>
</dependency>
----

[source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"]
.Using Gradle
----
implementation("com.blazebit:blaze-persistence-integration-quarkus")
runtimeOnly("com.blazebit:blaze-persistence-integration-hibernate-5.6")
implementation("com.blazebit:blaze-persistence-integration-quarkus-3")
runtimeOnly("com.blazebit:blaze-persistence-integration-hibernate-6.2")
----

The use in native images requires a dependency on the entity view annotation processor that may be extracted into a separate `native` profile:

Check warning on line 66 in docs/src/main/asciidoc/blaze-persistence.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsWarnings] Consider using 'might (for possiblity)' or 'can (for ability)' rather than 'may' unless updating existing content that uses it. Raw Output: {"message": "[Quarkus.TermsWarnings] Consider using 'might (for possiblity)' or 'can (for ability)' rather than 'may' unless updating existing content that uses it.", "location": {"path": "docs/src/main/asciidoc/blaze-persistence.adoc", "range": {"start": {"line": 66, "column": 93}}}, "severity": "WARNING"}

[source,xml]
----
Expand All @@ -70,7 +73,7 @@
<dependencies>
<dependency>
<groupId>com.blazebit</groupId>
<artifactId>blaze-persistence-entity-view-processor</artifactId>
<artifactId>blaze-persistence-entity-view-processor-jakarta</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
Expand Down
9 changes: 8 additions & 1 deletion docs/src/main/asciidoc/resteasy-reactive.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -2176,7 +2176,9 @@
}
----

Such a response filter will also be called for <<exception-mapping, handled>> exceptions.

Your filters may declare any of the following parameter types:

Check warning on line 2181 in docs/src/main/asciidoc/resteasy-reactive.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsWarnings] Consider using 'might (for possiblity)' or 'can (for ability)' rather than 'may' unless updating existing content that uses it. Raw Output: {"message": "[Quarkus.TermsWarnings] Consider using 'might (for possiblity)' or 'can (for ability)' rather than 'may' unless updating existing content that uses it.", "location": {"path": "docs/src/main/asciidoc/resteasy-reactive.adoc", "range": {"start": {"line": 2181, "column": 14}}}, "severity": "WARNING"}

.Filter parameters
|===
Expand All @@ -2192,7 +2194,7 @@
|A context object to access the current response

|link:{jdkapi}/java/lang/Throwable.html[`Throwable`]
|Any thrown exception, or `null` (only for response filters)
|Any thrown and <<exception-mapping, handled>> exception, or `null` (only for response filters).

|===

Expand Down Expand Up @@ -2273,6 +2275,11 @@
2019-06-05 12:51:04,485 INFO [org.acm.res.jso.LoggingFilter] (executor-thread-1) Request GET /fruits from IP 127.0.0.1
----

[NOTE]
====
A `ContainerResponseFilter` will also be called for <<exception-mapping, handled>> exceptions.
====

=== Readers and Writers: mapping entities and HTTP bodies

[[readers-writers]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,12 @@ public class OidcCommonConfig {
public Optional<Duration> connectionDelay = Optional.empty();

/**
* The number of times an attempt to re-establish an already available connection will be repeated for.
* Note this property is different to the `connection-delay` property which is only effective during the initial OIDC
* The number of times an attempt to re-establish an already available connection will be repeated.
* Note this property is different from the `connection-delay` property, which is only effective during the initial OIDC
* connection creation.
* This property is used to try to recover the existing connection which may have been temporarily lost.
* For example, if a request to the OIDC token endpoint fails due to a connection exception then the request will be retried
* for
* a number of times configured by this property.
* This property is used to try to recover an existing connection that may have been temporarily lost.
* For example, if a request to the OIDC token endpoint fails due to a connection exception, then the request will be
* retried the number of times configured by this property.
*/
@ConfigItem(defaultValue = "3")
public int connectionRetryCount = 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ public String getGrantType() {
* The WebClient timeout.
* Use this property to configure how long an HTTP client used by Dev UI handlers will wait for a response when requesting
* tokens from OpenId Connect Provider and sending them to the service endpoint.
* This timeout is also used by the OIDC dev service admin client.
*/
@ConfigItem(defaultValue = "4S")
public Duration webClientTimeout;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
import io.quarkus.oidc.runtime.devui.OidcDevServicesUtils;
import io.quarkus.runtime.LaunchMode;
import io.quarkus.runtime.configuration.ConfigUtils;
import io.smallrye.mutiny.TimeoutException;
import io.smallrye.mutiny.Uni;
import io.vertx.core.Vertx;
import io.vertx.core.http.HttpHeaders;
Expand Down Expand Up @@ -626,8 +627,11 @@ private String getAdminToken(WebClient client, String keycloakUrl) {
keycloakUrl + "/realms/master/protocol/openid-connect/token",
"admin-cli", null, "admin", "admin", null)
.await().atMost(oidcConfig.devui.webClientTimeout);
} catch (TimeoutException e) {
LOG.error("Admin token can not be acquired due to a client connection timeout. " +
"You may try increasing the `quarkus.oidc.devui.web-client-timeout` property.");
} catch (Throwable t) {
LOG.errorf("Admin token can not be acquired: %s", t.getMessage());
LOG.error("Admin token can not be acquired", t);
}
return null;
}
Expand Down Expand Up @@ -673,7 +677,7 @@ private void createRealm(WebClient client, String token, String keycloakUrl, Rea
} catch (Throwable t) {
errors.add(String.format("Realm %s can not be created: %s", realm.getRealm(), t.getMessage()));

LOG.errorf("Realm %s can not be created: %s", realm.getRealm(), t.getMessage());
LOG.errorf(t, "Realm %s can not be created", realm.getRealm());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class QuarkusBootstrap implements Serializable {
private final PathCollection applicationRoot;

/**
* The root of the project. This may be different to the application root for tests that
* The root of the project. This may be different from the application root for tests that
* run in a different directory.
*/
private final Path projectRoot;
Expand Down
Loading