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] 3.2.10.Final backports batch 1 #38180

Merged
merged 29 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
7e1e955
Handle generic types for ParamConverter in REST Client
geoand Nov 6, 2023
17281e0
Fix vale errors and some warnings in OidcCommonConfig
rolfedh Nov 10, 2023
4da919f
Never register server specific providers in REST Client (fixed)
famod Nov 10, 2023
57fd236
Use empty string in Sse event when there is no data
geoand Nov 13, 2023
ed2aa74
Updates infinispan client intelligence section
karesti Nov 14, 2023
e43064a
recognize quarkus.tls.trust-all property by keycloak-admin-client ext…
barreiro Nov 20, 2023
010051e
Fix OpenTelemetry trace exclusion of endpoints served from the manage…
cescoffier Nov 20, 2023
9926bc3
Add a test for the Duplicated Context handling in the CacheResultInte…
cescoffier Nov 21, 2023
3b09ce9
Always execute a JPA password action
sberyozkin Nov 21, 2023
cdf7ff2
Prepare docs/sync-web-site.sh for automated releases
gsmet Nov 24, 2023
0a32281
Use batch mode for update-version.sh
gsmet Nov 25, 2023
1f69154
Avoid asking for GPG passphrase on CI
gsmet Nov 25, 2023
981ad59
quarkus-update - Improve cleanup of log lines
gsmet Nov 30, 2023
2e01ee0
quarkus update - Remove two unused methods
gsmet Nov 30, 2023
008f164
quarkus update - Fix Windows detection
gsmet Nov 30, 2023
50def73
quarkus update - Add a clean in mvn process-sources
gsmet Nov 30, 2023
7c7b644
quarkus update - Execute Maven commands in batch mode
gsmet Nov 30, 2023
ed141f6
Save pathParamValues encoded and perform decoding when requested
rmartinc Dec 4, 2023
229b3b1
Fix != expression in @PreAuthorize check
geoand Dec 5, 2023
ce86db8
Make docs/sync-web-site.sh recoverable
gsmet Dec 6, 2023
f522a8f
Support using commas to add and remove extensions with CLI
gsmet Dec 7, 2023
0d97d00
Reg. methods of RESTeasy reactive param. containers for reflection
zakkak Nov 13, 2023
28eac00
Refactor: Simplify class names array creation
zakkak Nov 13, 2023
dcbb238
Use standard URL when updating the website
gsmet Dec 12, 2023
102ec7e
Fix Create the Maven project section in security-oidc-bearer-token-au…
sberyozkin Jan 2, 2024
d50f48d
Do not expand config properties for Gradle Workers
radcortez Jan 2, 2024
a6c5b05
Test access to fields of @Immutable embeddables
yrodiere Dec 1, 2023
5f266fa
Fix Panache bytecode enhancement for @Embeddable records
yrodiere Dec 1, 2023
2e4648b
Avoid @TempDir in RestClientCDIDelegateBuilderTest
gsmet Nov 7, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class ProjectExtensionsAdd extends BaseBuildCommand implements Callable<I
@CommandLine.Mixin
RunModeOption runMode;

@CommandLine.Parameters(arity = "1", paramLabel = "EXTENSION", description = "extensions to add to this project")
@CommandLine.Parameters(arity = "1", paramLabel = "EXTENSION", description = "extensions to add to this project", split = ",")
Set<String> extensions;

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class ProjectExtensionsRemove extends BaseBuildCommand implements Callabl
@CommandLine.Mixin
RunModeOption runMode;

@CommandLine.Parameters(arity = "1", paramLabel = "EXTENSION", description = "Extension(s) to remove from this project.")
@CommandLine.Parameters(arity = "1", paramLabel = "EXTENSION", description = "Extension(s) to remove from this project.", split = ",")
Set<String> extensions;

@Override
Expand Down
50 changes: 48 additions & 2 deletions devtools/cli/src/test/java/io/quarkus/cli/CliDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ public static Result invokeExtensionRemoveQute(Path projectRoot, Path file) thro
}

public static Result invokeExtensionAddMultiple(Path projectRoot, Path file) throws Exception {
// add the qute extension
// add amazon-lambda-http and jackson extensions
Result result = execute(projectRoot, "extension", "add", "amazon-lambda-http", "jackson", "-e", "-B", "--verbose");
Assertions.assertEquals(CommandLine.ExitCode.OK, result.exitCode,
"Expected OK return code. Result:\n" + result);
Expand All @@ -345,7 +345,7 @@ public static Result invokeExtensionAddMultiple(Path projectRoot, Path file) thr
}

public static Result invokeExtensionRemoveMultiple(Path projectRoot, Path file) throws Exception {
// add the qute extension
// remove amazon-lambda-http and jackson extensions
Result result = execute(projectRoot, "extension", "remove", "amazon-lambda-http", "jackson", "-e", "-B", "--verbose");
Assertions.assertEquals(CommandLine.ExitCode.OK, result.exitCode,
"Expected OK return code. Result:\n" + result);
Expand All @@ -370,6 +370,52 @@ public static Result invokeExtensionRemoveMultiple(Path projectRoot, Path file)
return result;
}

public static Result invokeExtensionAddMultipleCommas(Path projectRoot, Path file) throws Exception {
Result result = execute(projectRoot, "extension", "add",
"quarkus-resteasy-reactive-jsonb,quarkus-resteasy-reactive-jackson", "-e", "-B", "--verbose");
Assertions.assertEquals(CommandLine.ExitCode.OK, result.exitCode,
"Expected OK return code. Result:\n" + result);

result = invokeValidateExtensionList(projectRoot);
Assertions.assertTrue(result.stdout.contains("quarkus-qute"),
"Expected quarkus-qute to be in the list of extensions. Result:\n" + result);
Assertions.assertTrue(result.stdout.contains("quarkus-resteasy-reactive-jsonb"),
"Expected quarkus-resteasy-reactive-jsonb to be in the list of extensions. Result:\n" + result);
Assertions.assertTrue(result.stdout.contains("quarkus-resteasy-reactive-jackson"),
"Expected quarkus-resteasy-reactive-jackson to be in the list of extensions. Result:\n" + result);

String content = CliDriver.readFileAsString(file);
Assertions.assertTrue(content.contains("quarkus-qute"),
"quarkus-qute should still be listed as a dependency. Result:\n" + content);
Assertions.assertTrue(content.contains("quarkus-resteasy-reactive-jsonb"),
"quarkus-resteasy-reactive-jsonb should be listed as a dependency. Result:\n" + content);
Assertions.assertTrue(content.contains("quarkus-resteasy-reactive-jackson"),
"quarkus-resteasy-reactive-jackson should be listed as a dependency. Result:\n" + content);

return result;
}

public static Result invokeExtensionRemoveMultipleCommas(Path projectRoot, Path file) throws Exception {
Result result = execute(projectRoot, "extension", "remove",
"quarkus-resteasy-reactive-jsonb,quarkus-resteasy-reactive-jackson", "-e", "-B", "--verbose");
Assertions.assertEquals(CommandLine.ExitCode.OK, result.exitCode,
"Expected OK return code. Result:\n" + result);

result = invokeValidateExtensionList(projectRoot);
Assertions.assertFalse(result.stdout.contains("quarkus-resteasy-reactive-jsonb"),
"quarkus-resteasy-reactive-jsonb should not be in the list of extensions. Result:\n" + result);
Assertions.assertFalse(result.stdout.contains("quarkus-resteasy-reactive-jackson"),
"quarkus-resteasy-reactive-jackson should not be in the list of extensions. Result:\n" + result);

String content = CliDriver.readFileAsString(file);
Assertions.assertFalse(content.contains("quarkus-resteasy-reactive-jsonb"),
"quarkus-resteasy-reactive-jsonb should not be listed as a dependency. Result:\n" + content);
Assertions.assertFalse(content.contains("quarkus-resteasy-reactive-jackson"),
"quarkus-resteasy-reactive-jackson should not be listed as a dependency. Result:\n" + content);

return result;
}

public static Result invokeExtensionListInstallable(Path projectRoot) throws Exception {
Result result = CliDriver.execute(projectRoot, "extension", "list", "-e", "-B", "--verbose", "-i");
Assertions.assertEquals(CommandLine.ExitCode.OK, result.exitCode,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,10 @@ public void testExtensionList() throws Exception {
CliDriver.invokeExtensionAddRedundantQute(project);
CliDriver.invokeExtensionListInstallable(project);
CliDriver.invokeExtensionAddMultiple(project, pom);
CliDriver.invokeExtensionAddMultipleCommas(project, pom);
CliDriver.invokeExtensionRemoveQute(project, pom);
CliDriver.invokeExtensionRemoveMultiple(project, pom);
CliDriver.invokeExtensionRemoveMultipleCommas(project, pom);

CliDriver.invokeExtensionListInstallableSearch(project);
CliDriver.invokeExtensionListFormatting(project);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import io.quarkus.gradle.QuarkusPlugin;
import io.quarkus.gradle.tasks.worker.BuildWorker;
import io.quarkus.maven.dependency.GACTV;
import io.smallrye.config.Expressions;

/**
* Base class for the {@link QuarkusBuildDependencies}, {@link QuarkusBuildCacheableAppParts}, {@link QuarkusBuild} tasks
Expand Down Expand Up @@ -205,12 +206,14 @@ void generateBuild() {

ApplicationModel appModel = resolveAppModelForBuild();
Map<String, String> configMap = new HashMap<>();
for (Map.Entry<String, String> entry : extension().buildEffectiveConfiguration(appModel.getAppArtifact()).configMap()
.entrySet()) {
if (entry.getKey().startsWith("quarkus.")) {
configMap.put(entry.getKey(), entry.getValue());
EffectiveConfig effectiveConfig = extension().buildEffectiveConfiguration(appModel.getAppArtifact());
Expressions.withoutExpansion(() -> {
for (Map.Entry<String, String> entry : effectiveConfig.configMap().entrySet()) {
if (entry.getKey().startsWith("quarkus.")) {
configMap.put(entry.getKey(), effectiveConfig.config().getRawValue(entry.getKey()));
}
}
}
});

getLogger().info("Starting Quarkus application build for package type {}", packageType);

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 @@ -93,28 +93,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.
====

=== Default and named connections
This extension lets you configure a _default_ Infinispan client connections and _named_ ones.
Named connections are essential to connect to multiple Infinispan clusters.
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 @@ -303,14 +303,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
Original file line number Diff line number Diff line change
Expand Up @@ -59,51 +59,35 @@ The solution is located in the `security-openid-connect-quickstart` link:{quicks
You can either create a new Maven project with the `oidc` extension or you can add the extension to an existing Maven project.
Complete one of the following commands:

* To create a new Maven project, use the following command:
+
====
To create a new Maven project, use the following command:

:create-app-artifact-id: security-openid-connect-quickstart
:create-app-extensions: oidc,resteasy-reactive-jackson
include::{includes}/devtools/create-app.adoc[]
====
This command generates a Maven project, importing the `oidc` extension
which is an implementation of OIDC for Quarkus.

* If you already have your Quarkus project configured, you can add the `oidc` extension
to your project by running the following command in your project base directory:
+
====
If you already have your Quarkus project configured, you can add the `oidc` extension to your project by running the following command in your project base directory:

:add-extension-extensions: oidc
include::{includes}/devtools/extension-add.adoc[]
====
The following configuration gets added to your build file:

* Using Maven (pom.xml):
+
====
--
This will add the following to your build file:

[source,xml,role="primary asciidoc-tabs-target-sync-cli asciidoc-tabs-target-sync-maven"]
.pom.xml
----
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-oidc</artifactId>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-oidc</artifactId>
</dependency>
----
--
====
+
* Using Gradle (build.gradle):
+
====
--

[source,gradle,role="secondary asciidoc-tabs-target-sync-gradle"]
.build.gradle
----
implementation("io.quarkus:quarkus-oidc")
----
--
====

=== Write the application
== Write the application

. Implement the `/api/users/me` endpoint as shown in the following example, which is a regular Jakarta REST resource:
+
Expand Down
7 changes: 6 additions & 1 deletion docs/sync-web-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,16 @@ fi

if [ -z $TARGET_DIR ]; then
TARGET_DIR=target/web-site
rm -rf ${TARGET_DIR}
GIT_OPTIONS=""
if [[ "$QUARKUS_WEB_SITE_PUSH" != "true" ]]; then
GIT_OPTIONS="--depth=1"
fi
git clone -b develop --single-branch $GIT_OPTIONS git@github.com:quarkusio/quarkusio.github.io.git ${TARGET_DIR}
if [ -n "${RELEASE_GITHUB_TOKEN}" ]; then
git clone -b develop --single-branch $GIT_OPTIONS https://github.com/quarkusio/quarkusio.github.io.git ${TARGET_DIR}
else
git clone -b develop --single-branch $GIT_OPTIONS git@github.com:quarkusio/quarkusio.github.io.git ${TARGET_DIR}
fi
fi

if [ $BRANCH == "main" ] && [ "$QUARKUS_RELEASE" == "true" ]; then
Expand Down
Loading
Loading