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

2.16.5 backports 1 #31897

Merged
merged 26 commits into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
7169f9d
Interpret negative/zero body-limit as infinite
brunoborges Mar 2, 2023
76f5131
Allow same origin CORS requests without 3rd party origins being confi…
sberyozkin Jan 31, 2023
f69ceed
fix: remove incorrect default value for keepAliveEnabled
gefloh Feb 28, 2023
f26970d
Ignore required documentation for @ConfigMapping default methods
radcortez Feb 23, 2023
62da248
Scheduler - detect scheduled methods of the same name on a class
mkouba Mar 2, 2023
81fbd3b
Prevent SSE writing from potentially causing accumulation of headers
geoand Mar 2, 2023
2f7f6df
Append System.lineSeparator() to config error messages
geertschuring Mar 2, 2023
618acc3
Reinitialize sun.security.pkcs11.P11Util at runtime
zakkak Mar 3, 2023
73bc2ba
Fix iterator issue when executing a zrange with score on a missing key
cescoffier Mar 7, 2023
c839d09
Make request scoped beans work properly in ReaderInterceptors
geoand Mar 9, 2023
f982ba3
Properly close metadata file in integration tests
geoand Mar 9, 2023
464ef12
Register additional cache implementations for reflection
gsmet Mar 9, 2023
ee7f867
Suppress config changed warning for quarkus.test.arg-line
radcortez Mar 8, 2023
23faec5
Remove all dev services for kubernetes dependencies from kubernetes-c…
scrocquesel Mar 7, 2023
9ea0e71
feat: capability added for quarkus-rest-client-reactive-jackson
chberger Mar 10, 2023
df2b576
Remove duplicate handling of oracle.jdbc.driver.BlockSource$ThreadedC…
yrodiere Mar 10, 2023
202b733
Reinitialize oracle.jdbc.driver.BlockSource$ThreadedCachingBlockSourc…
yrodiere Mar 10, 2023
12be197
Qute type-safe fragments - fix validation for loop metadata and globals
mkouba Mar 15, 2023
0566557
Fix incorrect generic type passed to MessageBodyWriter#writeTo
geoand Mar 15, 2023
6bc9ece
Add logging to RequestDeserializeHandler
geoand Mar 15, 2023
09f077b
Filter out RESTEasy related warning in ProviderConfigInjectionWarning…
gsmet Mar 1, 2023
5fcaebc
Supply missing extension metadata for reactive keycloak client
holly-cummins Mar 16, 2023
aa5b163
Fix truststore REST Client config when password is not set
Sgitario Mar 16, 2023
e89ccd2
Add more lenient Liquibase ZipPathHandler to work around includeAll n…
famod Mar 16, 2023
764f8d6
Support of generic collections in RESTEasy Reactive server and client
Sgitario Mar 17, 2023
a22f5db
New home for Narayana LRA coordinator Docker images
gsmet Mar 18, 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 @@ -42,6 +42,7 @@ public interface Capability {
String REST = QUARKUS_PREFIX + "rest";
String REST_CLIENT = REST + ".client";
String REST_CLIENT_REACTIVE = REST_CLIENT + ".reactive";
String REST_CLIENT_REACTIVE_JACKSON = REST_CLIENT_REACTIVE + ".jackson";
String REST_JACKSON = REST + ".jackson";
String REST_JSONB = REST + ".jsonb";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,7 @@ public void suppressNonRuntimeConfigChanged(
suppressNonRuntimeConfigChanged.produce(new SuppressNonRuntimeConfigChangedWarningBuildItem("quarkus.uuid"));
suppressNonRuntimeConfigChanged.produce(new SuppressNonRuntimeConfigChangedWarningBuildItem("quarkus.default-locale"));
suppressNonRuntimeConfigChanged.produce(new SuppressNonRuntimeConfigChangedWarningBuildItem("quarkus.locales"));
suppressNonRuntimeConfigChanged.produce(new SuppressNonRuntimeConfigChangedWarningBuildItem("quarkus.test.arg-line"));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -512,20 +512,22 @@ private void processCtorConfigItem(ExecutableElement ctor, Properties javadocPro
final String docComment = getRequiredJavadoc(ctor);
final StringBuilder buf = new StringBuilder();
appendParamTypes(ctor, buf);
javadocProps.put(className + Constants.DOT + buf.toString(), docComment);
javadocProps.put(className + Constants.DOT + buf, docComment);
}

private void processMethodConfigItem(ExecutableElement method, Properties javadocProps, String className) {
final String docComment = getRequiredJavadoc(method);
final StringBuilder buf = new StringBuilder();
buf.append(method.getSimpleName().toString());
appendParamTypes(method, buf);
javadocProps.put(className + Constants.DOT + buf.toString(), docComment);
javadocProps.put(className + Constants.DOT + buf, docComment);
}

private void processMethodConfigMapping(ExecutableElement method, Properties javadocProps, String className) {
final String docComment = getRequiredJavadoc(method);
javadocProps.put(className + Constants.DOT + method.getSimpleName().toString(), docComment);
if (method.getModifiers().contains(Modifier.ABSTRACT)) {
final String docComment = getRequiredJavadoc(method);
javadocProps.put(className + Constants.DOT + method.getSimpleName().toString(), docComment);
}
}

private void processConfigGroup(RoundEnvironment roundEnv, TypeElement annotation) {
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/asciidoc/lra.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ quarkus.lra.coordinator-url=http://localhost:8080/lra-coordinator
----

For a Narayana coordinator the path component of the url is normally `lra-coordinator`.
Coordinators can be obtained from `https://hub.docker.com/r/jbosstm/lra-coordinator`
Coordinators can be obtained from https://quay.io/repository/jbosstm/lra-coordinator
or you can build your own coordinator using a maven pom that includes the appropriate
dependencies. A Quarkus quickstart will be provided to show how to do this, or you can
take a look at one of the https://github.com/jbosstm/quickstart/tree/master/rts/lra-examples/lra-coordinator[Narayana quickstarts].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public void validateConfigProperties(Set<ConfigValidationMetadata> properties) {
ConfigProducerUtil.getValue(property.getName(), effectivePropertyType, property.getDefaultValue(), config);
} catch (Exception e) {
msg.append("Failed to load config value of type ").append(effectivePropertyType).append(" for: ")
.append(property.getName());
.append(property.getName()).append(System.lineSeparator());
problems.add(property.getName());
suppressed.add(e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ public static String[] typesNeedingConstructorsRegistered() {
"com.github.benmanes.caffeine.cache.PSMS",
"com.github.benmanes.caffeine.cache.PSW",
"com.github.benmanes.caffeine.cache.PSMW",
"com.github.benmanes.caffeine.cache.PSAMW",
"com.github.benmanes.caffeine.cache.PSAWMW",
"com.github.benmanes.caffeine.cache.PSWMS",
"com.github.benmanes.caffeine.cache.PSWMW",
"com.github.benmanes.caffeine.cache.SILMS",
Expand All @@ -88,6 +90,7 @@ public static String[] typesNeedingConstructorsRegistered() {
"com.github.benmanes.caffeine.cache.SSLMS",
"com.github.benmanes.caffeine.cache.SSMS",
"com.github.benmanes.caffeine.cache.SSMSA",
"com.github.benmanes.caffeine.cache.SSMSAW",
"com.github.benmanes.caffeine.cache.SSMSW",
"com.github.benmanes.caffeine.cache.SSW",
};
Expand All @@ -102,6 +105,7 @@ public static String[] typesNeedingConstructorsRegisteredWhenRecordingStats() {
"com.github.benmanes.caffeine.cache.SSSMS",
"com.github.benmanes.caffeine.cache.SSSMSA",
"com.github.benmanes.caffeine.cache.SSSMSW",
"com.github.benmanes.caffeine.cache.SSSMSAW",
"com.github.benmanes.caffeine.cache.SSSW"
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import io.quarkus.deployment.builditem.nativeimage.NativeImageAllowIncompleteClasspathBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
import io.quarkus.deployment.builditem.nativeimage.RuntimeReinitializedClassBuildItem;
import io.quarkus.maven.dependency.ArtifactKey;

/**
Expand Down Expand Up @@ -66,7 +67,8 @@ void build(BuildProducer<ReflectiveClassBuildItem> reflectiveClass) {
}

@BuildStep
void runtimeInitializeDriver(BuildProducer<RuntimeInitializedClassBuildItem> runtimeInitialized) {
void runtimeInitializeDriver(BuildProducer<RuntimeInitializedClassBuildItem> runtimeInitialized,
BuildProducer<RuntimeReinitializedClassBuildItem> runtimeReinitialized) {
//These re-implement all the "--initialize-at-build-time" arguments found in the native-image.properties :

// Override: the original metadata marks the drivers as "runtime initialized" but this makes it incompatible with
Expand All @@ -93,10 +95,14 @@ void runtimeInitializeDriver(BuildProducer<RuntimeInitializedClassBuildItem> run
runtimeInitialized.produce(new RuntimeInitializedClassBuildItem("oracle.net.nt.TcpMultiplexer"));
runtimeInitialized.produce(new RuntimeInitializedClassBuildItem("oracle.net.nt.TcpMultiplexer"));
runtimeInitialized.produce(new RuntimeInitializedClassBuildItem("oracle.net.nt.TcpMultiplexer$LazyHolder"));
runtimeInitialized
.produce(new RuntimeInitializedClassBuildItem("oracle.jdbc.driver.BlockSource$ThreadedCachingBlockSource"));
runtimeInitialized.produce(new RuntimeInitializedClassBuildItem(

// Needs to be REinitialized to avoid problems when also using the Elasticsearch Java client
// See https://github.com/quarkusio/quarkus/issues/31624#issuecomment-1457706253
runtimeReinitialized.produce(new RuntimeReinitializedClassBuildItem(
"oracle.jdbc.driver.BlockSource$ThreadedCachingBlockSource"));
runtimeReinitialized.produce(new RuntimeReinitializedClassBuildItem(
"oracle.jdbc.driver.BlockSource$ThreadedCachingBlockSource$BlockReleaser"));

runtimeInitialized.produce(new RuntimeInitializedClassBuildItem("oracle.jdbc.xa.client.OracleXADataSource"));
runtimeInitialized.produce(new RuntimeInitializedClassBuildItem("oracle.jdbc.replay.OracleXADataSourceImpl"));
runtimeInitialized.produce(new RuntimeInitializedClassBuildItem("oracle.jdbc.datasource.OracleXAConnection"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;

/**
* @author Sanne Grinovero <[email protected]>
Expand Down Expand Up @@ -35,10 +34,4 @@ void reflection(BuildProducer<ReflectiveClassBuildItem> reflectiveClass) {
reflectiveClass.produce(new ReflectiveClassBuildItem(false, false, "com.sun.jndi.rmi.registry.RegistryContextFactory"));
}

@BuildStep
void runtimeInitialization(BuildProducer<RuntimeInitializedClassBuildItem> runtimeInitializedClass) {
runtimeInitializedClass
.produce(new RuntimeInitializedClassBuildItem("oracle.jdbc.driver.BlockSource$ThreadedCachingBlockSource"));
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
artifact: ${project.groupId}:${project.artifactId}:${project.version}
name: "Reactive Keycloak Admin Client"
metadata:
keywords:
- "keycloak"
- "keycloak-admin-client"
- "admin"
- "openid-connect"
- "reactive"
categories:
- "security"
- "reactive"
status: "stable"
10 changes: 0 additions & 10 deletions extensions/kubernetes-client/deployment-internal/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,6 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-devservices-deployment</artifactId>
</dependency>
<dependency>
<groupId>com.dajudge.kindcontainer</groupId>
<artifactId>kindcontainer</artifactId>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<build>
Expand Down
15 changes: 15 additions & 0 deletions extensions/kubernetes-client/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,21 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jackson-deployment</artifactId>
</dependency>
<dependency>
<groupId>com.dajudge.kindcontainer</groupId>
<artifactId>kindcontainer</artifactId>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5-internal</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package io.quarkus.liquibase;

import java.io.FileNotFoundException;

import liquibase.resource.ResourceAccessor;
import liquibase.resource.ZipPathHandler;

// https://github.com/liquibase/liquibase/issues/3524#issuecomment-1465282155
public class LiquibaseLenientZipPathHandler extends ZipPathHandler {

@Override
public int getPriority(String root) {
if (root != null && root.startsWith("jar:") && root.contains("!/")) {
return PRIORITY_SPECIALIZED;
}
return PRIORITY_NOT_APPLICABLE;
}

@Override
public ResourceAccessor getResourceAccessor(String root) throws FileNotFoundException {
int idx = root.indexOf("!/");
return super.getResourceAccessor(idx > 0 ? root.substring(0, idx) : root);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
io.quarkus.liquibase.LiquibaseLenientZipPathHandler
Original file line number Diff line number Diff line change
Expand Up @@ -647,6 +647,7 @@ public void beforeParsing(ParserHelper parserHelper) {
@BuildStep
void validateCheckedFragments(List<CheckedFragmentValidationBuildItem> validations,
List<TemplateExpressionMatchesBuildItem> expressionMatches,
List<TemplateGlobalBuildItem> templateGlobals,
BeanArchiveIndexBuildItem beanArchiveIndex,
BuildProducer<ValidationErrorBuildItem> validationErrors) {

Expand All @@ -657,6 +658,8 @@ void validateCheckedFragments(List<CheckedFragmentValidationBuildItem> validatio
Map<DotName, AssignableInfo> assignableCache = new HashMap<>();
String[] hintPrefixes = { LoopSectionHelper.Factory.HINT_PREFIX, WhenSectionHelper.Factory.HINT_PREFIX,
SetSectionHelper.Factory.HINT_PREFIX };
Set<String> globals = templateGlobals.stream().map(TemplateGlobalBuildItem::getName)
.collect(Collectors.toUnmodifiableSet());

for (CheckedFragmentValidationBuildItem validation : validations) {
Map<String, Type> paramNamesToTypes = new HashMap<>();
Expand All @@ -672,33 +675,40 @@ void validateCheckedFragments(List<CheckedFragmentValidationBuildItem> validatio
}

for (Expression expression : validation.fragmentExpressions) {
// Note that we ignore literals and expressions with no type info and expressions with a hint referencing an expression from inside the fragment
if (expression.isLiteral()) {
// Note that we ignore:
// - literals,
// - globals,
// - expressions with no type info,
// - loop metadata; e.g. |java.lang.Integer|<loop-metadata>
// - expressions with a hint referencing an expression from inside the fragment
if (expression.isLiteral() || globals.contains(expression.getParts().get(0).getName())) {
continue;
}
if (expression.hasTypeInfo()) {
Info info = TypeInfos.create(expression, index, null).get(0);
if (info.isTypeInfo()) {
// |org.acme.Foo|.name
paramNamesToTypes.put(expression.getParts().get(0).getName(), info.asTypeInfo().resolvedType);
} else if (info.hasHints()) {
// foo<set#123>.name
hintLoop: for (String helperHint : info.asHintInfo().hints) {
for (String prefix : hintPrefixes) {
if (helperHint.startsWith(prefix)) {
int generatedId = parseHintId(helperHint, prefix);
Expression localExpression = findExpression(generatedId, validation.fragmentExpressions);
if (localExpression == null) {
Match match = matchResults.getMatch(generatedId);
if (match == null) {
throw new IllegalStateException(
"Match result not found for expression [" + expression.toOriginalString()
+ "] in: "
+ validation.templateId);
}
paramNamesToTypes.put(expression.getParts().get(0).getName(), match.type);
break hintLoop;
String typeInfo = expression.getParts().get(0).getTypeInfo();
if (typeInfo == null || (typeInfo != null && typeInfo.endsWith(LoopSectionHelper.Factory.HINT_METADATA))) {
continue;
}
Info info = TypeInfos.create(expression, index, null).get(0);
if (info.isTypeInfo()) {
// |org.acme.Foo|.name
paramNamesToTypes.put(expression.getParts().get(0).getName(), info.asTypeInfo().resolvedType);
} else if (info.hasHints()) {
// foo<set#123>.name
hintLoop: for (String helperHint : info.asHintInfo().hints) {
for (String prefix : hintPrefixes) {
if (helperHint.startsWith(prefix)) {
int generatedId = parseHintId(helperHint, prefix);
Expression localExpression = findExpression(generatedId, validation.fragmentExpressions);
if (localExpression == null) {
Match match = matchResults.getMatch(generatedId);
if (match == null) {
throw new IllegalStateException(
"Match result not found for expression [" + expression.toOriginalString()
+ "] in: "
+ validation.templateId);
}
paramNamesToTypes.put(expression.getParts().get(0).getName(), match.type);
break hintLoop;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.junit.jupiter.api.extension.RegisterExtension;

import io.quarkus.qute.CheckedTemplate;
import io.quarkus.qute.TemplateGlobal;
import io.quarkus.qute.TemplateInstance;
import io.quarkus.test.QuarkusUnitTest;

Expand All @@ -20,21 +21,30 @@ public class CheckedTemplateFragmentTest {
.addClasses(Templates.class, Item.class)
.addAsResource(new StringAsset(
"{#each items}{#fragment id='item'}{it.name}{#if it.name.length > 5} is a long name{/if}{/fragment}{/each}"),
"templates/CheckedTemplateFragmentTest/items.html"));
"templates/CheckedTemplateFragmentTest/items.html")
.addAsResource(new StringAsset(
"{#fragment id=foo}{#for i in bar}{i_count}. <{i}>{#if i_hasNext}, {/if}{/for}{/fragment}"),
"templates/CheckedTemplateFragmentTest/foos.html"));

@Test
public void testFragment() {
assertEquals("Foo", Templates.items(null).getFragment("item").data("it", new Item("Foo")).render());
assertEquals("Foo", Templates.items$item(new Item("Foo")).render());
assertEquals("FooAndBar is a long name", Templates.items$item(new Item("FooAndBar")).render());
assertEquals("1. <1>, 2. <2>, 3. <3>, 4. <4>, 5. <5>", Templates.foos$foo().render());
}

@CheckedTemplate
public static class Templates {

@TemplateGlobal
static int bar = 5;

static native TemplateInstance items(List<Item> items);

static native TemplateInstance items$item(Item it);

static native TemplateInstance foos$foo();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,9 @@ protected String getScoreAsString(double score) {

final List<ScoredValue<V>> decodeAsListOfScoredValues(Response response) {
List<ScoredValue<V>> list = new ArrayList<>();
if (!response.iterator().hasNext()) {
return Collections.emptyList();
}
if (response.iterator().next().type() == ResponseType.BULK) {
// Redis 5
V current = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,12 @@ void zrevrange() {
.isEqualTo(List.of(Place.suze, Place.grignan, Place.crussol));
}

@Test
@RequiresRedis6OrHigher
void zrevrangeWithScoreEmpty() {
assertThat(ds.sortedSet(String.class).zrangeWithScores("top-products", 0, 2, new ZRangeArgs().rev())).isEmpty();
}

@Test
@RequiresRedis6OrHigher
void zrevrangeWithScores() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ public class RestClientConfig {
/**
* If set to false disables the keep alive completely.
*/
@ConfigItem(defaultValue = "true")
@ConfigItem
public Optional<Boolean> keepAliveEnabled;

/**
Expand Down
Loading