Skip to content

Commit

Permalink
Merge pull request #37084 from gsmet/3.5.2-backports-2
Browse files Browse the repository at this point in the history
3.5.2 backports 2
  • Loading branch information
gsmet authored Nov 15, 2023
2 parents 043a213 + 6ac98d4 commit eeba2c3
Show file tree
Hide file tree
Showing 41 changed files with 568 additions and 62 deletions.
2 changes: 1 addition & 1 deletion bom/application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
<plexus-component-annotations.version>2.1.0</plexus-component-annotations.version>
<graal-sdk.version>23.0.1</graal-sdk.version>
<gizmo.version>1.7.0</gizmo.version>
<jackson-bom.version>2.15.2</jackson-bom.version>
<jackson-bom.version>2.15.3</jackson-bom.version>
<commons-logging-jboss-logging.version>1.0.0.Final</commons-logging-jboss-logging.version>
<commons-lang3.version>3.12.0</commons-lang3.version>
<commons-codec.version>1.16.0</commons-codec.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
import io.quarkus.utilities.OS;

public abstract class QuarkusTask extends DefaultTask {
private static final List<String> WORKER_BUILD_FORK_OPTIONS = List.of("quarkus.package.",
"quarkus.application.", "quarkus.gradle-worker.", "quarkus.analytics.");
private static final List<String> WORKER_BUILD_FORK_OPTIONS = List.of("quarkus.");

private final transient QuarkusPluginExtension extension;
protected final File projectDir;
Expand Down Expand Up @@ -89,7 +88,7 @@ private void configureProcessWorkerSpec(ProcessWorkerSpec processWorkerSpec, Map
}

// It's kind of a "very big hammer" here, but this way we ensure that all necessary properties
// ("quarkus.package.*","quarkus.application,*", "quarkus.gradle-worker.*") from all configuration sources
// "quarkus.*" from all configuration sources
// are (forcefully) used in the Quarkus build - even properties defined on the QuarkusPluginExtension.
// This prevents that settings from e.g. a application.properties takes precedence over an explicit
// setting in Gradle project properties, the Quarkus extension or even via the environment or system
Expand Down
2 changes: 1 addition & 1 deletion devtools/gradle/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugin-publish = "1.2.1"

# updating Kotlin here makes QuarkusPluginTest > shouldNotFailOnProjectDependenciesWithoutMain(Path) fail
kotlin = "1.8.10"
smallrye-config = "3.4.1"
smallrye-config = "3.4.4"

junit5 = "5.10.0"
assertj = "3.24.2"
Expand Down
7 changes: 4 additions & 3 deletions docs/src/main/asciidoc/datasource.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -561,10 +561,11 @@ For more information, see the link:https://db.apache.org/derby/docs/10.8/devguid

Example:: `jdbc:h2:tcp://localhost/~/test`, `jdbc:h2:mem:myDB`

H2 is an embedded database that can run as a server, based on a file, or run completely in memory.
H2 is a database that can run in embedded or server mode.
It can use a file storage or run entirely in memory.
All of these options are available as listed above.

For more information, see the link:https://h2database.com/html/features.html?highlight=url&search=url#database_url[official documentation].
For more information, see the link:https://h2database.com/html/features.html#database_url[official documentation].

==== MariaDB

Expand Down Expand Up @@ -592,7 +593,7 @@ hostDescription:: `<host>[:<portnumber>] or address=(host=<host>)[(port=<portnum

Example:: `jdbc:mysql://localhost:3306/test`

For more information, see the link:https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference.html[official documentation].
For more information, see the link:https://dev.mysql.com/doc/connector-j/en/[official documentation].

===== MySQL limitations

Expand Down
24 changes: 19 additions & 5 deletions docs/src/main/asciidoc/infinispan-client-reference.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -95,28 +95,42 @@ quarkus.infinispan-client.hosts=localhost:11222 <1>
quarkus.infinispan-client.username=admin <2>
quarkus.infinispan-client.password=password <3>
quarkus.infinispan-client.client-intelligence=BASIC <4>
----
<1> Sets Infinispan Server address list, separated with commas
<2> Sets the authentication username
<3> Sets the authentication password
<4> Sets the client intelligence. Use BASIC as a workaround if using Docker for Mac.

Alternatively, you can use uri connection by providing a single connection property
[source,properties]
----
quarkus.infinispan-client.uri=hotrod://admin:password@localhost:11222 <1>
quarkus.infinispan-client.client-intelligence=BASIC <2>
----
<1> Sets Infinispan URI connection. The following properties will be ignored: hosts, username and password.
<2> Sets the client intelligence. Use BASIC as a workaround if using Docker for Mac

[TIP]
====
Use Infinispan Dev Services to run a server and connect without configuration.
====

=== Client intelligence
Infinispan client uses intelligence mechanisms to efficiently send requests to Infinispan Server clusters.
By default, the *HASH_DISTRIBUTION_AWARE* intelligence mechanism is enabled.
However, locally with Docker for Mac, you might experience connectivity issues.
In this case, configure the client intelligence to *BASIC*.

Learn more in the https://infinispan.org/docs/stable/titles/hotrod_java/hotrod_java.html#hotrod-client-intelligence_hotrod-java-client[Infinispan documentation].

[source,properties]
----
quarkus.infinispan-client.client-intelligence=BASIC <1>
----
<1> Docker for Mac workaround.

[IMPORTANT]
====
Don't use *BASIC* in production environments by default, performance might be impacted.
====

=== Configuring backup clusters in Cross-Site Replication
In High Availability production deployments, it is common to have multiple Infinispan Clusters that are
distributed across various Data Centers worldwide. Infinispan offers the capability to connect these clusters and
Expand Down
12 changes: 10 additions & 2 deletions docs/src/main/asciidoc/infinispan-client.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -305,14 +305,22 @@ Then, open the `src/main/resources/application.properties` file and add:
%prod.quarkus.infinispan-client.username=admin <2>
%prod.quarkus.infinispan-client.password=password <3>
## Docker 4 Mac workaround
%prod.quarkus.infinispan-client.client-intelligence=BASIC <4>
## Docker 4 Mac workaround. Uncomment only if you are using Docker for Mac.
## Read more about it in the Infinispan Reference Guide
# %prod.quarkus.infinispan-client.client-intelligence=BASIC <4>
----
<1> Sets Infinispan Server address list, separated with commas
<2> Sets the authentication username
<3> Sets the authentication password
<4> Sets the client intelligence. Use BASIC as a workaround if using Docker for Mac.

[IMPORTANT]
====
Client intelligence changes impact your performance in production.
Don't change the client intelligence unless strictly necessary for your case.
Read more in the xref:infinispan-client-reference.adoc[Infinispan Client extension reference guide].
====

== Packaging and running in JVM mode

You can run the application as a conventional jar file.
Expand Down
4 changes: 2 additions & 2 deletions docs/src/main/asciidoc/security-proactive-authentication.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ To disable proactive authentication in Quarkus, set the following attribute in t

[source,xml,options="nowrap",role="white-space-pre"]
----
`quarkus.http.auth.proactive=false`
quarkus.http.auth.proactive=false
----

If you disable proactive authentication, the authentication process runs only when an identity is requested.
Expand All @@ -42,7 +42,7 @@ You can still access `SecurityIdentity` synchronously with `public SecurityIdent
The same is also valid for xref:reactive-routes.adoc[Reactive routes] if a route response is synchronous.
====

xref:security-authorization.adoc#standard-security-annotations[Standard security annotations] on CDI beans are not supported on an I/O thread if a non-void secured method returns a value synchronously and proactive authentication is disabled because they need to access `SecurityIdentity`.
xref:security-authorize-web-endpoints-reference.adoc#standard-security-annotations[Standard security annotations] on CDI beans are not supported on an I/O thread if a non-void secured method returns a value synchronously and proactive authentication is disabled because they need to access `SecurityIdentity`.

In the following example, `HelloResource` and `HelloService` are defined.
Any GET request to `/hello` will run on the I/O thread and throw a `BlockingOperationNotAllowedException` exception.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public interface DataSourceJdbcRuntimeConfig {
/**
* The interval at which we check for connection leaks.
*/

@ConfigDocDefault("This feature is disabled by default.")
Optional<Duration> leakDetectionInterval();

/**
Expand All @@ -72,6 +74,7 @@ public interface DataSourceJdbcRuntimeConfig {
/**
* The max lifetime of a connection.
*/
@ConfigDocDefault("By default, there is no restriction on the lifespan of a connection.")
Optional<Duration> maxLifetime();

/**
Expand All @@ -92,7 +95,7 @@ public interface DataSourceJdbcRuntimeConfig {
boolean flushOnClose();

/**
* When enabled Agroal will be able to produce a warning when a connection is returned
* When enabled, Agroal will be able to produce a warning when a connection is returned
* to the pool without the application having closed all open statements.
* This is unrelated with tracking of open connections.
* Disable for peak performance, but only when there's high confidence that
Expand All @@ -112,7 +115,7 @@ public interface DataSourceJdbcRuntimeConfig {
Optional<String> validationQuerySql();

/**
* Disable pooling to prevent reuse of Connections. Use this with when an external pool manages the life-cycle
* Disable pooling to prevent reuse of Connections. Use this when an external pool manages the life-cycle
* of Connections.
*/
@WithDefault("true")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ public interface DataSourceReactiveRuntimeConfig {
* The datasource URLs.
* <p>
* If multiple values are set, this datasource will create a pool with a list of servers instead of a single server.
* The pool uses a round-robin load balancing when a connection is created to select different servers.
* Note: some driver may not support multiple values here.
* The pool uses round-robin load balancing for server selection during connection establishment.
* Note that certain drivers might not accommodate multiple values in this context.
*/
Optional<List<String>> url();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,10 @@ SyntheticBeanBuildItem initBasicAuth(
&& !buildTimeConfig.auth.basic.orElse(false)) {
//if not explicitly enabled we make this a default bean, so it is the fallback if nothing else is defined
configurator.defaultBean();
if (buildTimeConfig.auth.basic.isPresent() && buildTimeConfig.auth.basic.get()) {
securityInformationProducer.produce(SecurityInformationBuildItem.BASIC());
}
}

if (buildTimeConfig.auth.basic.isPresent() && buildTimeConfig.auth.basic.get()) {
securityInformationProducer.produce(SecurityInformationBuildItem.BASIC());
}

return configurator.done();
Expand Down
2 changes: 1 addition & 1 deletion independent-projects/extension-maven-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<version.enforcer.plugin>3.2.1</version.enforcer.plugin>
<version.surefire.plugin>3.1.2</version.surefire.plugin>
<maven-plugin-plugin.version>3.8.1</maven-plugin-plugin.version>
<jackson-bom.version>2.15.2</jackson-bom.version>
<jackson-bom.version>2.15.3</jackson-bom.version>
<smallrye-beanbag.version>1.3.2</smallrye-beanbag.version>
<junit.jupiter.version>5.10.0</junit.jupiter.version>
</properties>
Expand Down
2 changes: 1 addition & 1 deletion independent-projects/resteasy-reactive/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<vertx.version>4.4.6</vertx.version>
<rest-assured.version>5.3.0</rest-assured.version>
<commons-logging-jboss-logging.version>1.0.0.Final</commons-logging-jboss-logging.version>
<jackson-bom.version>2.15.2</jackson-bom.version>
<jackson-bom.version>2.15.3</jackson-bom.version>
<smallrye-stork.version>2.3.1</smallrye-stork.version>
<jakarta.validation-api.version>3.0.2</jakarta.validation-api.version>
<yasson.version>3.0.3</yasson.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,8 @@ public boolean isSimpleVersionUpdate() {
return VersionUpdateType.UPDATE_VERSION.equals(getVersionUpdateType())
|| VersionUpdateType.RECOMMEND_PLATFORM_MANAGED.equals(getVersionUpdateType());
}

public boolean isVersionUpdate() {
return !VersionUpdateType.ADD_VERSION.equals(getVersionUpdateType());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ public List<ExtensionUpdateInfo> getSimpleVersionUpdates() {
return streamExtensions().filter(ExtensionUpdateInfo::isSimpleVersionUpdate).collect(Collectors.toList());
}

public List<ExtensionUpdateInfo> getVersionUpdates() {
return streamExtensions().filter(ExtensionUpdateInfo::isVersionUpdate).collect(Collectors.toList());
}

public boolean shouldUpdateExtensions() {
return streamExtensions().anyMatch(ExtensionUpdateInfo::shouldUpdateExtension);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public static FetchResult createRecipe(MessageWriter log, Path target, MavenArti
request.currentVersion,
request.targetVersion,
request.projectExtensionsUpdateInfo
.getSimpleVersionUpdates());
.getVersionUpdates());
QuarkusUpdateRecipe recipe = new QuarkusUpdateRecipe()
.buildTool(request.buildTool);
if (request.updateJavaVersion.isPresent()) {
Expand Down
Loading

0 comments on commit eeba2c3

Please sign in to comment.