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

Quarkus 3: Fix patches #1851

Merged
merged 2 commits into from
Aug 31, 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
69 changes: 45 additions & 24 deletions .ci/environments/quarkus-3/patches/0002_hibernate_changes.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/AbstractProcessDataIndexIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/AbstractProcessDataIndexIT.java
index 3b29157b6..5ecd962a4 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/AbstractProcessDataIndexIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/main/java/org/kie/kogito/index/AbstractProcessDataIndexIT.java
diff --git a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/test/java/org/kie/kogito/index/AbstractProcessDataIndexIT.java b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/test/java/org/kie/kogito/index/AbstractProcessDataIndexIT.java
index 1e20eccb9..23450b07f 100644
--- a/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/test/java/org/kie/kogito/index/AbstractProcessDataIndexIT.java
+++ b/apps-integration-tests/integration-tests-data-index-service/integration-tests-data-index-service-common/src/test/java/org/kie/kogito/index/AbstractProcessDataIndexIT.java
@@ -107,7 +107,7 @@ public abstract class AbstractProcessDataIndexIT {
.get("/approvals/{processId}/tasks")
.then()
Expand All @@ -11,7 +11,7 @@ index 3b29157b6..5ecd962a4 100644
.body("[0].name", is("firstLineApproval"))
.body("[0].id", notNullValue())
.extract()
@@ -189,7 +189,7 @@ public abstract class AbstractProcessDataIndexIT {
@@ -200,7 +200,7 @@ public abstract class AbstractProcessDataIndexIT {
.get("/approvals/{processId}/tasks")
.then()
.statusCode(200)
Expand All @@ -20,7 +20,7 @@ index 3b29157b6..5ecd962a4 100644
.body("[0].name", is("secondLineApproval"))
.body("[0].id", notNullValue())
.extract()
@@ -447,7 +447,7 @@ public abstract class AbstractProcessDataIndexIT {
@@ -458,7 +458,7 @@ public abstract class AbstractProcessDataIndexIT {
.get("/approvals/{id}/firstLineApproval/{taskId}/comments")
.then()
.statusCode(200)
Expand All @@ -29,7 +29,7 @@ index 3b29157b6..5ecd962a4 100644
.body("[0].content", is(commentContent)));

Map<String, String> commentMap = given().spec(dataIndexSpec()).contentType(ContentType.JSON)
@@ -545,7 +545,7 @@ public abstract class AbstractProcessDataIndexIT {
@@ -556,7 +556,7 @@ public abstract class AbstractProcessDataIndexIT {
.get("/approvals/{id}/firstLineApproval/{taskId}/attachments")
.then()
.statusCode(200)
Expand All @@ -39,10 +39,10 @@ index 3b29157b6..5ecd962a4 100644

Map<String, String> attachmentMap = given().spec(dataIndexSpec()).contentType(ContentType.JSON)
diff --git a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/GraphQLUtils.java b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/GraphQLUtils.java
index 6026abaf5..d7be19727 100644
index 99c322de0..aae30d88d 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/GraphQLUtils.java
+++ b/data-index/data-index-service/data-index-service-common/src/test/java/org/kie/kogito/index/service/GraphQLUtils.java
@@ -42,11 +42,27 @@ import com.fasterxml.jackson.databind.node.ObjectNode;
@@ -43,11 +43,28 @@ import com.fasterxml.jackson.databind.node.ObjectNode;

import static java.lang.String.format;
import static java.util.stream.Collectors.joining;
Expand All @@ -52,6 +52,7 @@ index 6026abaf5..d7be19727 100644
public class GraphQLUtils {

+ private static final String ID = "id";
+ private static final String VERSION = "version";
+ private static final String STATE = "state";
+ private static final String START = "start";
+ private static final String PROCESS_ID = "processId";
Expand All @@ -71,7 +72,12 @@ index 6026abaf5..d7be19727 100644
private static final Logger LOGGER = LoggerFactory.getLogger(GraphQLUtils.class);
private static final Map<Class, String> QUERY_FIELDS = new HashMap<>();
private static final Map<String, String> QUERIES = new HashMap<>();
@@ -72,103 +88,103 @@ public class GraphQLUtils {
@@ -74,107 +91,107 @@ public class GraphQLUtils {
}

public static String getProcessDefinitionByIdAndVersion(String id, String version) {
- return getProcessDefinitionQuery("ProcessDefinitionByIdAndVersion", id, version);
+ return getProcessDefinitionQuery("ProcessDefinitionByIdAndVersion", Map.of(ID, id, VERSION, version));
}

public static String getProcessInstanceById(String id) {
Expand Down Expand Up @@ -106,7 +112,7 @@ index 6026abaf5..d7be19727 100644

public static String getProcessInstanceByIdAndNullParentProcessInstanceId(String id, Boolean isNull) {
- return getProcessInstanceQuery("ProcessInstanceByIdAndNullParentProcessInstanceId", id, isNull.toString());
+ return getProcessInstanceQuery("ProcessInstanceByIdAndNullParentProcessInstanceId", Map.of(ID, id, IS_NULL, isNull));
+ return getProcessInstanceQuery("ProcessInstanceByIdAndNullParentProcessInstanceId", Map.of(ID, id, IS_NULL, isNull));
}

public static String getProcessInstanceByIdAndNullRootProcessInstanceId(String id, Boolean isNull) {
Expand Down Expand Up @@ -201,7 +207,7 @@ index 6026abaf5..d7be19727 100644
}

public static String getTravelsByUserTaskId(String id) {
@@ -191,10 +207,10 @@ public class GraphQLUtils {
@@ -197,10 +214,10 @@ public class GraphQLUtils {
return getQuery("DealsByTaskIdNoActualOwner", id);
}

Expand All @@ -214,7 +220,7 @@ index 6026abaf5..d7be19727 100644
values.forEach(g -> pg.add(g));
return jsonNode.toString();
}
@@ -203,20 +219,30 @@ public class GraphQLUtils {
@@ -209,25 +226,35 @@ public class GraphQLUtils {
return format(QUERIES.get(name), args);
}

Expand All @@ -223,6 +229,11 @@ index 6026abaf5..d7be19727 100644
return getQuery(name, ProcessInstance.class, args);
}

- private static String getProcessDefinitionQuery(String name, String... args) {
+ private static String getProcessDefinitionQuery(String name, Map<String, Object> args) {
return getQuery(name, ProcessDefinition.class, args);
}

- private static String getUserTaskInstanceQuery(String name, String... args) {
+ private static String getUserTaskInstanceQuery(String name, Map<String, Object> args) {
return getQuery(name, UserTaskInstance.class, args);
Expand All @@ -235,6 +246,7 @@ index 6026abaf5..d7be19727 100644

- private static String getQuery(String name, Class clazz, String... args) {
- return format(QUERIES.get(name), insert(0, args, QUERY_FIELDS.get(clazz)));
- }
+ private static String getQuery(String name, Class clazz, Map<String, Object> args) {
+ try {
+ String query = format(QUERIES.get(name), QUERY_FIELDS.get(clazz));
Expand All @@ -247,15 +259,24 @@ index 6026abaf5..d7be19727 100644
+ } catch (Exception e) {
+ throw new RuntimeException(e);
+ }
}
+ }

private static Stream<Field> getAllFieldsList(Class clazz) {
return FieldUtils.getAllFieldsList(clazz).stream().filter(f -> getJacocoPredicate().test(f));
diff --git a/data-index/data-index-service/data-index-service-common/src/test/resources/graphql_queries.json b/data-index/data-index-service/data-index-service-common/src/test/resources/graphql_queries.json
index 6f0f72396..4b22aa924 100644
index 8da0f683d..0825ff420 100644
--- a/data-index/data-index-service/data-index-service-common/src/test/resources/graphql_queries.json
+++ b/data-index/data-index-service/data-index-service-common/src/test/resources/graphql_queries.json
@@ -1,200 +1,122 @@
@@ -1,207 +1,126 @@
{
"ProcessDefinitionByIdAndVersion": {
"query": "query ($id: String, $version: String) { ProcessDefinitions( where: { id: { equal : $id }, version: { equal : $version } }, orderBy: { version: ASC }, pagination : { limit: 10, offset: 0 } ){ %s } }",
- "variables": {
- "id": "%s",
- "version": "%s"
- }
+ "variables": {}
},
"ProcessInstanceById": {
"query": "query ($id: String) { ProcessInstances( where: { id: { equal : $id } }, orderBy: { lastUpdate: ASC }, pagination : { limit: 10, offset: 0 } ){ %s } }",
- "variables": {
Expand Down Expand Up @@ -587,12 +608,12 @@ index d848509ae..f698d913a 100644
return ((List<AttributeFilter<?>>) filter.getValue())
.stream()
diff --git a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/schema/DDLSchemaExporter.java b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/schema/DDLSchemaExporter.java
index c2fe8a6a8..10f4e88b6 100644
index 7f2bf10f9..420d0ee8a 100644
--- a/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/schema/DDLSchemaExporter.java
+++ b/data-index/data-index-storage/data-index-storage-oracle/src/test/java/org/kie/kogito/index/oracle/schema/DDLSchemaExporter.java
@@ -44,7 +44,7 @@ public class DDLSchemaExporter {
@@ -43,7 +43,7 @@ public class DDLSchemaExporter {
public static void main(String[] args) {
try (KogitoOracleSqlContainer oracleSql = new KogitoOracleSqlContainer()) {
oracleSql.waitingFor(Wait.forListeningPort());
oracleSql.start();
- Map<String, String> settings = new HashMap<>();
+ Map<String, Object> settings = new HashMap<>();
Expand Down Expand Up @@ -658,7 +679,7 @@ index 2e28ef813..3a709e6a8 100644
private ObjectNode outputs;
private String endpoint;
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/PostgreSqlQuery.java b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/PostgreSqlQuery.java
index 10b132749..8952b9486 100644
index 74fd17bd9..e2c373f78 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/PostgreSqlQuery.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/main/java/org/kie/kogito/index/postgresql/storage/PostgreSqlQuery.java
@@ -26,8 +26,8 @@ import jakarta.persistence.criteria.Order;
Expand All @@ -671,7 +692,7 @@ index 10b132749..8952b9486 100644
import org.kie.kogito.index.postgresql.model.AbstractEntity;
import org.kie.kogito.persistence.api.query.AttributeFilter;
import org.kie.kogito.persistence.api.query.AttributeSort;
@@ -132,10 +132,10 @@ public class PostgreSqlQuery<E extends AbstractEntity, T> implements Query<T> {
@@ -132,10 +132,10 @@ public class PostgreSqlQuery<K, E extends AbstractEntity, T> implements Query<T>
return builder.equal(getAttributePath(root, filter.getAttribute()), filter.getValue());
case IS_NULL:
Path pathNull = getAttributePath(root, filter.getAttribute());
Expand All @@ -684,7 +705,7 @@ index 10b132749..8952b9486 100644
case BETWEEN:
List<Object> value = (List<Object>) filter.getValue();
return builder
@@ -176,6 +176,12 @@ public class PostgreSqlQuery<E extends AbstractEntity, T> implements Query<T> {
@@ -176,6 +176,12 @@ public class PostgreSqlQuery<K, E extends AbstractEntity, T> implements Query<T>
return join.get(split[split.length - 1]);
}

Expand All @@ -698,10 +719,10 @@ index 10b132749..8952b9486 100644
return ((List<AttributeFilter<?>>) filter.getValue())
.stream()
diff --git a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/schema/DDLSchemaExporter.java b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/schema/DDLSchemaExporter.java
index 485218875..58b366a3e 100644
index 4f0d95a71..15b2ad7cc 100644
--- a/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/schema/DDLSchemaExporter.java
+++ b/data-index/data-index-storage/data-index-storage-postgresql/src/test/java/org/kie/kogito/index/postgresql/schema/DDLSchemaExporter.java
@@ -44,7 +44,7 @@ public class DDLSchemaExporter {
@@ -45,7 +45,7 @@ public class DDLSchemaExporter {
try (KogitoPostgreSqlContainer postgresql = new KogitoPostgreSqlContainer()) {
postgresql.waitingFor(Wait.forListeningPort());
postgresql.start();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
commit 2dffd8637aba3a41e2a0184496a0ba10d270463e
Author: radtriste <[email protected]>
Date: Tue May 9 16:41:46 2023 +0200

patch: data index reactive streams

diff --git a/data-index/data-index-common/pom.xml b/data-index/data-index-common/pom.xml
index 672d4d350..cf73e37d2 100644
index b744de020..cea2bd368 100644
--- a/data-index/data-index-common/pom.xml
+++ b/data-index/data-index-common/pom.xml
@@ -41,6 +41,10 @@
<groupId>com.graphql-java</groupId>
<artifactId>graphql-java-extended-scalars</artifactId>
@@ -29,6 +29,10 @@
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>
+ <dependency>
+ <groupId>io.smallrye.reactive</groupId>
+ <artifactId>mutiny-zero-flow-adapters</artifactId>
+ <groupId>io.smallrye.reactive</groupId>
+ <artifactId>mutiny-zero-flow-adapters</artifactId>
+ </dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
diff --git a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/graphql/GraphQLSchemaManagerImpl.java b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/graphql/GraphQLSchemaManagerImpl.java
index ca80a4a63..ff458fadc 100644
index b0d1086ae..b386b0ab2 100644
--- a/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/graphql/GraphQLSchemaManagerImpl.java
+++ b/data-index/data-index-service/data-index-service-common/src/main/java/org/kie/kogito/index/service/graphql/GraphQLSchemaManagerImpl.java
@@ -23,7 +23,7 @@ import java.util.concurrent.CompletableFuture;
Expand All @@ -32,7 +26,7 @@ index ca80a4a63..ff458fadc 100644
import jakarta.annotation.PostConstruct;
import org.kie.kogito.index.graphql.AbstractGraphQLSchemaManager;
import org.kie.kogito.index.graphql.query.GraphQLQueryParserRegistry;
@@ -319,11 +319,11 @@ public class GraphQLSchemaManagerImpl extends AbstractGraphQLSchemaManager {
@@ -327,11 +327,11 @@ public class GraphQLSchemaManagerImpl extends AbstractGraphQLSchemaManager {
}

private DataFetcher<Publisher<ObjectNode>> objectCreatedPublisher(Supplier<Storage> cache) {
Expand All @@ -46,7 +40,7 @@ index ca80a4a63..ff458fadc 100644
}

private Supplier<DataIndexServiceException> cacheNotFoundException(String processId) {
@@ -331,11 +331,11 @@ public class GraphQLSchemaManagerImpl extends AbstractGraphQLSchemaManager {
@@ -339,11 +339,11 @@ public class GraphQLSchemaManagerImpl extends AbstractGraphQLSchemaManager {
}

protected DataFetcher<Publisher<ObjectNode>> getDomainModelUpdatedDataFetcher(String processId) {
Expand All @@ -61,10 +55,10 @@ index ca80a4a63..ff458fadc 100644

protected DataFetcher<Collection<ObjectNode>> getDomainModelDataFetcher(String processId) {
diff --git a/kogito-apps-build-parent/pom.xml b/kogito-apps-build-parent/pom.xml
index 816e42955..031600e8e 100644
index 29bf514bf..f28b1f42c 100644
--- a/kogito-apps-build-parent/pom.xml
+++ b/kogito-apps-build-parent/pom.xml
@@ -52,7 +52,7 @@
@@ -51,7 +51,7 @@
<version.org.apache.opennlp>1.9.2</version.org.apache.opennlp>
<version.org.apache.commons.csv>1.8</version.org.apache.commons.csv>
<version.org.jredisearch>2.0.0</version.org.jredisearch>
Expand Down
Loading