Skip to content

Quarkus LTS 3.20.0 upgrade #6296

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
42 changes: 30 additions & 12 deletions build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
<version.commons-logging>1.1.1</version.commons-logging>
<version.commons-io>2.15.1</version.commons-io>
<version.common-text>1.11.0</version.common-text>
<version.com.fasterxml.jackson>2.17.2</version.com.fasterxml.jackson>
<version.com.fasterxml.jackson.databind>2.17.2</version.com.fasterxml.jackson.databind>
<version.com.fasterxml.jackson.annotations>2.17.2</version.com.fasterxml.jackson.annotations>
<version.com.github.victools>4.31.0</version.com.github.victools> <!-- victools should align with Jackson if possible -->
<version.com.fasterxml.jackson>2.18.2</version.com.fasterxml.jackson>
<version.com.fasterxml.jackson.databind>2.18.2</version.com.fasterxml.jackson.databind>
<version.com.fasterxml.jackson.annotations>2.18.2</version.com.fasterxml.jackson.annotations>
<version.com.github.victools>4.37.0</version.com.github.victools> <!-- victools should align with Jackson if possible -->
<version.com.miglayout>3.7.4</version.com.miglayout>
<version.domino-slf4j-logger>1.0.1</version.domino-slf4j-logger>
<version.com.google.protobuf>3.25.5</version.com.google.protobuf>
Expand All @@ -73,10 +73,12 @@
<version.com.thoughtworks.xstream>1.4.21</version.com.thoughtworks.xstream>
<version.guru.nidi>0.18.0</version.guru.nidi>
<version.info.picocli>4.7.5</version.info.picocli>
<version.io.micrometer>1.12.2</version.io.micrometer>
<version.io.quarkus>3.15.3.1</version.io.quarkus>
<version.io.micrometer>1.14.5</version.io.micrometer>
<version.io.quarkus>3.20.0</version.io.quarkus>
<version.io.netty>4.1.118.Final</version.io.netty>
<version.io.smallrye.openapi.core>3.10.0</version.io.smallrye.openapi.core>
<version.io.smallrye.openapi.core>4.0.8</version.io.smallrye.openapi.core>
<version.io.smallrye.config.core>3.11.4</version.io.smallrye.config.core>

<version.it.unimi.dsi.fastutil>8.5.11</version.it.unimi.dsi.fastutil>
<version.junit>4.13.1</version.junit>
<version.net.java.dev.glazedlists>1.8.0</version.net.java.dev.glazedlists>
Expand All @@ -100,11 +102,11 @@
<!--This needs to be in sync with JUnit-->
<version.org.hamcrest>2.2</version.org.hamcrest>
<version.org.hsqldb>2.3.0</version.org.hsqldb>
<version.org.infinispan>15.0.11.Final</version.org.infinispan>
<version.org.infinispan.protostream>5.0.8.Final</version.org.infinispan.protostream>
<version.org.infinispan>15.0.14.Final</version.org.infinispan>
<version.org.infinispan.protostream>5.0.13.Final</version.org.infinispan.protostream>
<version.org.javassist>3.26.0-GA</version.org.javassist>
<version.org.jboss.narayana.tomcat>7.0.2.Final</version.org.jboss.narayana.tomcat>
<version.org.jboss.logging>3.5.3.Final</version.org.jboss.logging>
<version.org.jboss.logging>3.6.1.Final</version.org.jboss.logging>
<version.org.jboss.transaction.spi>8.0.0.Final</version.org.jboss.transaction.spi>
<version.org.jboss.weld.weld>3.1.6.Final</version.org.jboss.weld.weld>
<version.org.eclipse.microprofile.config>3.1</version.org.eclipse.microprofile.config>
Expand Down Expand Up @@ -194,10 +196,10 @@

<version.net.byte-buddy>1.14.11</version.net.byte-buddy>

<version.org.postgresql>42.7.4</version.org.postgresql>
<version.org.postgresql>42.7.5</version.org.postgresql>

<version.ch.obermuhlner>2.0.1</version.ch.obermuhlner>
<version.io.smallrye.jandex>3.2.3</version.io.smallrye.jandex>
<version.io.smallrye.jandex>3.2.7</version.io.smallrye.jandex>
<version.org.eclipse.yasson>3.0.3</version.org.eclipse.yasson>

<version.com.github.javaparser>3.25.8</version.com.github.javaparser>
Expand Down Expand Up @@ -412,6 +414,22 @@
<version>${version.io.smallrye.openapi.core}</version>
</dependency>

<dependency>
<groupId>io.smallrye.config</groupId>
<artifactId>smallrye-config</artifactId>
<version>${version.io.smallrye.config.core}</version>
<exclusions>
<exclusion>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.annotation.versioning</artifactId>
</exclusion>
<exclusion>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>org.eclipse.parsson</groupId>
<artifactId>parsson</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-quarkus-util-deployment</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-rest</artifactId>
<scope>test</scope>
</dependency>

</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-quarkus-util-deployment</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-rest</artifactId>
<scope>test</scope>
</dependency>

</dependencies>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

<dependency> <!-- enable REST endpoint as hook point for E2E opaque testing -->
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive</artifactId>
<artifactId>quarkus-rest</artifactId>
</dependency>
<dependency> <!-- enable assertions in REST endpoint as hook point for E2E opaque testing -->
<groupId>org.assertj</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

<dependency> <!-- enable REST endpoint as hook point for E2E opaque testing -->
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive</artifactId>
<artifactId>quarkus-rest</artifactId>
</dependency>
<dependency> <!-- enable assertions in REST endpoint as hook point for E2E opaque testing -->
<groupId>org.assertj</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@

<dependency> <!-- enable REST endpoint as hook point for E2E opaque testing -->
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive</artifactId>
<artifactId>quarkus-rest</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-reactive-jackson</artifactId>
<artifactId>quarkus-rest-jackson</artifactId>
</dependency>
<dependency> <!-- enable assertions in REST endpoint as hook point for E2E opaque testing -->
<groupId>org.assertj</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,19 @@

-->
<infinispan
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:14.0 https://infinispan.org/schemas/infinispan-config-14.0.xsd
urn:infinispan:server:14.0 https://infinispan.org/schemas/infinispan-server-14.0.xsd"
xmlns="urn:infinispan:config:14.0"
xmlns:server="urn:infinispan:server:14.0">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:15.0 https://infinispan.org/schemas/infinispan-config-15.0.xsd
urn:infinispan:server:15.0 https://infinispan.org/schemas/infinispan-server-15.0.xsd"
xmlns="urn:infinispan:config:15.0"
xmlns:server="urn:infinispan:server:15.0">

<cache-container name="default" statistics="true">
<!-- no transport = local cache -->
<security>
<authorization/>
</security>
</cache-container>

<server xmlns="urn:infinispan:server:14.0">
<server xmlns="urn:infinispan:server:15.0">
<interfaces>
<interface name="public">
<inet-address value="${infinispan.bind.address:127.0.0.1}"/>
Expand All @@ -41,33 +40,24 @@

<socket-bindings default-interface="public" port-offset="${infinispan.socket.binding.port-offset:0}">
<socket-binding name="default" port="${infinispan.bind.port:11222}"/>
<socket-binding name="memcached" port="11221"/>
</socket-bindings>

<security>
<credential-stores>
<credential-store name="credentials" path="credentials.pfx">
<clear-text-credential clear-text="secret"/>
</credential-store>
</credential-stores>
<security-realms>
<security-realm name="default">
<!-- Uncomment to enable TLS on the realm -->
<!-- server-identities>
<ssl>
<keystore path="application.keystore"
<keystore path="server.pfx"
password="password" alias="server"
generate-self-signed-certificate-host="localhost"/>
</ssl>
</server-identities-->
<properties-realm groups-attribute="Roles">
<user-properties path="users.properties"/>
<group-properties path="groups.properties"/>
</properties-realm>
<properties-realm/>
</security-realm>
</security-realms>
</security>

<endpoints socket-binding="default" security-realm="default" />
</server>
</infinispan>
</infinispan>
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* After running this example, you can run RemoteCacheManagerExampleAfterFailOver to see the results.
* <p>
* So the steps are:
* docker run -p 11222:11222 -e USER="admin" -e PASS="secret" quay.io/infinispan/server:14.0
* docker run -p 11222:11222 -e USER="admin" -e PASS="secret" quay.io/infinispan/server:15.0
* Run RemoteCacheManagerExample
* Run RemoteCacheManagerExampleAfterFailOver
*/
Expand Down
6 changes: 6 additions & 0 deletions kie-dmn/kie-dmn-openapi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@
<scope>provided</scope>
</dependency>

<dependency>
<groupId>io.smallrye.config</groupId>
<artifactId>smallrye-config</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@

public class DMNOASConstants {

public static final String X_NULLABLE = "nullable";
public static final String X_DMN_TYPE = "x-dmn-type";
public static final String X_DMN_ALLOWED_VALUES = "x-dmn-allowed-values";
public static final String X_DMN_TYPE_CONSTRAINTS = "x-dmn-type-constraints";
public static final String X_DMN_DESCRIPTIONS = "x-dmn-descriptions";
public static final String X_DMN_MINIMUM_VALUE = "x-dmn-minimum-value";
public static final String X_DMN_MAXIMUM_VALUE = "x-dmn-maximum-value";
public static final String X_DMN_EXCLUSIVE_MINIMUM_VALUE = "x-dmn-exclusive-minimum-value";
public static final String X_DMN_EXCLUSIVE_MAXIMUM_VALUE = "x-dmn-exclusive-maximum-value";
Comment on lines +30 to +31
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gitgabrio @yesamer @baldimir the semantics of exclusive-maximum and exclusive-minimum has changed.


private DMNOASConstants() {
// no constructor for contants/utility classes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@
*/
package org.kie.dmn.openapi.impl;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import io.smallrye.openapi.runtime.io.JsonUtil;
import io.smallrye.openapi.runtime.io.schema.SchemaWriter;
import io.smallrye.openapi.api.OpenApiConfig;
import io.smallrye.openapi.runtime.io.IOContext;
import io.smallrye.openapi.runtime.io.JsonIO;
import io.smallrye.openapi.runtime.io.media.SchemaIO;
import org.eclipse.microprofile.config.ConfigProvider;
import org.eclipse.microprofile.openapi.models.media.Schema;
import org.kie.dmn.api.core.DMNModel;
import org.kie.dmn.api.core.DMNType;
Expand Down Expand Up @@ -54,10 +59,14 @@ public class DMNOASGeneratorImpl implements DMNOASGenerator {
private NamingPolicy namingPolicy;
private final Map<DMNType, Schema> schemas = new HashMap<>();
private ObjectNode jsonSchema;
private JsonIO<JsonNode, ArrayNode, ObjectNode, ArrayNode, ObjectNode> jsonIO;
private SchemaIO<JsonNode, ArrayNode, ObjectNode, ArrayNode, ObjectNode> schemaIO;

public DMNOASGeneratorImpl(Collection<DMNModel> models, String refPrefix) {
this.dmnModels = new ArrayList<>(models);
this.refPrefix = refPrefix;
this.jsonIO = JsonIO.newInstance(OpenApiConfig.fromConfig(ConfigProvider.getConfig()));
this.schemaIO = new SchemaIO<>(IOContext.forJson(jsonIO));
}

@Override
Expand All @@ -79,14 +88,14 @@ private void indexModels() {
}

private void prepareSerializaton() {
ObjectNode tree = JsonUtil.objectNode();
ObjectNode definitions = JsonUtil.objectNode();
ObjectNode tree = jsonIO.createObject();
ObjectNode definitions = jsonIO.createObject();
tree.set("definitions", definitions);
// It would be better if the map is a TreeMap, however that breaks test ProcessItemTest.test_together
// For some reason, it looks like there is some reliance on the map being a HashMap, which should be investigated later as that should never happen.
final List<Entry<DMNType, Schema>> sortedEntries = schemas.entrySet().stream().sorted(Map.Entry.comparingByKey(Comparator.comparing(DMNType::getName))).toList();
for (Entry<DMNType, Schema> kv : sortedEntries) {
SchemaWriter.writeSchema(definitions, kv.getValue(), namingPolicy.getName(kv.getKey()));
definitions.set(namingPolicy.getName(kv.getKey()), schemaIO.write(kv.getValue()).get());
}
jsonSchema = tree;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ private Optional<Map<String, String>> ioSetDoc(DMNType t) {
}

private Schema schemaFromCompositeType(CompositeTypeImpl ct) {
Schema schema = OASFactory.createObject(Schema.class).type(SchemaType.OBJECT);
Schema schema = OASFactory.createObject(Schema.class).addType(SchemaType.OBJECT);
if (ct.getBaseType() == null) { // main case
for (Entry<String, DMNType> fkv : ct.getFields().entrySet()) {
schema.addProperty(fkv.getKey(), refOrBuiltinSchema(fkv.getValue()));
Expand All @@ -170,7 +170,7 @@ private void processIoSetDoc(final Schema schema, final DMNType type) {

private Schema nestAsItemIfCollection(Schema original, DMNType t) {
if (t.isCollection()) {
return OASFactory.createObject(Schema.class).type(SchemaType.ARRAY).items(original);
return OASFactory.createObject(Schema.class).addType(SchemaType.ARRAY).items(original);
} else {
return original;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import org.slf4j.LoggerFactory;

import static java.util.stream.Collectors.groupingBy;
import static org.kie.dmn.openapi.impl.DMNOASConstants.X_NULLABLE;
import static org.kie.dmn.openapi.impl.RangeNodeSchemaMapper.populateSchemaFromListOfRanges;

public class DMNUnaryTestsMapper {
Expand All @@ -64,7 +65,7 @@ public static void populateSchemaFromUnaryTests(Schema toPopulate, List<DMNUnary
throw new IllegalArgumentException("At most one null value is allowed for enum definition");
}
// If there is a NullNode, the item is nullable
toPopulate.setNullable(!nullNodes.isEmpty());
toPopulate.addExtension(X_NULLABLE, !nullNodes.isEmpty());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gitgabrio @yesamer @baldimir this also changed, no more native nullable

if (enumBaseNodes.size() > nullNodes.size()) {
// Let's create enum only if there is at least one node != NullNode
enumBaseNodes.forEach(unaryEvaluationNode -> populateSchemaFromBaseNode(toPopulate, unaryEvaluationNode));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
import org.kie.dmn.feel.lang.types.BuiltInType;
import org.kie.dmn.typesafe.DMNTypeUtils;

import java.util.List;

public class FEELBuiltinTypeSchemaMapper {

public static Schema from(DMNType t) {
Expand All @@ -41,10 +43,10 @@ private static Schema convertDurationToSchema(DMNType t) {
switch (t.getName()) {
case SimpleType.YEARS_AND_MONTHS_DURATION:
case "yearMonthDuration":
return OASFactory.createObject(Schema.class).addExtension(DMNOASConstants.X_DMN_TYPE, "FEEL:years and months duration").type(SchemaType.STRING).format("years and months duration").example("P1Y2M");
return OASFactory.createObject(Schema.class).addExtension(DMNOASConstants.X_DMN_TYPE, "FEEL:years and months duration").addType(SchemaType.STRING).format("years and months duration").examples(List.of("P1Y2M"));
case SimpleType.DAYS_AND_TIME_DURATION:
case "dayTimeDuration":
return OASFactory.createObject(Schema.class).addExtension(DMNOASConstants.X_DMN_TYPE, "FEEL:days and time duration").type(SchemaType.STRING).format("days and time duration").example("P1D");
return OASFactory.createObject(Schema.class).addExtension(DMNOASConstants.X_DMN_TYPE, "FEEL:days and time duration").addType(SchemaType.STRING).format("days and time duration").examples(List.of("P1D"));
default:
throw new IllegalArgumentException();
}
Expand All @@ -55,17 +57,17 @@ private static Schema convertBuiltInToJavaClass(BuiltInType builtin) {
case UNKNOWN:
return OASFactory.createObject(Schema.class).addExtension(DMNOASConstants.X_DMN_TYPE, "FEEL:Any"); // intentional, do NOT add .type(SchemaType.OBJECT), the JSONSchema to represent FEEL:Any is {}
case DATE:
return OASFactory.createObject(Schema.class).type(SchemaType.STRING).format("date").addExtension(DMNOASConstants.X_DMN_TYPE, "FEEL:date");
return OASFactory.createObject(Schema.class).addType(SchemaType.STRING).format("date").addExtension(DMNOASConstants.X_DMN_TYPE, "FEEL:date");
case TIME:
return OASFactory.createObject(Schema.class).type(SchemaType.STRING).format("time").addExtension(DMNOASConstants.X_DMN_TYPE, "FEEL:time");
return OASFactory.createObject(Schema.class).addType(SchemaType.STRING).format("time").addExtension(DMNOASConstants.X_DMN_TYPE, "FEEL:time");
case DATE_TIME:
return OASFactory.createObject(Schema.class).type(SchemaType.STRING).format("date-time").addExtension(DMNOASConstants.X_DMN_TYPE, "FEEL:date and time");
return OASFactory.createObject(Schema.class).addType(SchemaType.STRING).format("date-time").addExtension(DMNOASConstants.X_DMN_TYPE, "FEEL:date and time");
case BOOLEAN:
return OASFactory.createObject(Schema.class).type(SchemaType.BOOLEAN).addExtension(DMNOASConstants.X_DMN_TYPE, "FEEL:boolean");
return OASFactory.createObject(Schema.class).addType(SchemaType.BOOLEAN).addExtension(DMNOASConstants.X_DMN_TYPE, "FEEL:boolean");
case NUMBER:
return OASFactory.createObject(Schema.class).type(SchemaType.NUMBER).addExtension(DMNOASConstants.X_DMN_TYPE, "FEEL:number");
return OASFactory.createObject(Schema.class).addType(SchemaType.NUMBER).addExtension(DMNOASConstants.X_DMN_TYPE, "FEEL:number");
case STRING:
return OASFactory.createObject(Schema.class).type(SchemaType.STRING).addExtension(DMNOASConstants.X_DMN_TYPE, "FEEL:string");
return OASFactory.createObject(Schema.class).addType(SchemaType.STRING).addExtension(DMNOASConstants.X_DMN_TYPE, "FEEL:string");
case CONTEXT:
return OASFactory.createObject(Schema.class).addExtension(DMNOASConstants.X_DMN_TYPE, "FEEL:context"); // intentional, do NOT add .type(SchemaType.OBJECT), the JSONSchema to represent FEEL:context is {}
case DURATION:
Expand Down
Loading
Loading