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

[incubator-kie-issues#1575] Upgrade quarkus to 3.15 #3750

Open
wants to merge 31 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
99674ba
Upgrade quarkus to 3.15
RishiRajAnand Oct 22, 2024
75c0c41
Fix errors due to flyway 10 upgrade
RishiRajAnand Nov 21, 2024
1a773b8
Fix infinispan protostream errors due to upgrade
RishiRajAnand Nov 21, 2024
fed06df
Align kubernetes-client version to quarkus supported version 6.13.3
RishiRajAnand Nov 22, 2024
25e5c22
Upgrade quarkus to 3.15.2
RishiRajAnand Nov 25, 2024
c46863c
Updating jandex and quarkus camel
RishiRajAnand Nov 28, 2024
7b534b5
Upgrading h2 version to 2.3.232 and aligning other library versions
RishiRajAnand Dec 2, 2024
0d5f39f
replacing quarkus-smallrye-reactive-messaging-kafka with new name
RishiRajAnand Dec 3, 2024
41ed0fa
fix DevMojoIT test failures
RishiRajAnand Dec 10, 2024
0102846
Upgrade openapi-generator to 2.6.0 lts
RishiRajAnand Dec 18, 2024
040296c
Upgrading h2 version to 2.3.232 and aligning other library versions
RishiRajAnand Dec 2, 2024
14e3e66
- Upgrade `quarkus-openapi-generator` to `2.7.0-lts`
pefernan Dec 18, 2024
2fb2b8a
Reverting postgresql fly way dependency
RishiRajAnand Jan 2, 2025
907e588
Fixing sanity verification tests
RishiRajAnand Jan 2, 2025
5fb9960
Reverting flyway postgres changes
RishiRajAnand Jan 2, 2025
16424d4
- Fix formatting
pefernan Jan 7, 2025
a8b3d08
- Fix typo
pefernan Jan 7, 2025
9803e43
- Fix tests
pefernan Jan 8, 2025
e36f972
Disable analytics
RishiRajAnand Jan 7, 2025
d0e3c23
Disable analytics
RishiRajAnand Jan 7, 2025
7edec05
Fixing Dev Mojo IT
RishiRajAnand Jan 10, 2025
59126dd
Minor refactoring as per migration guide 3.9
RishiRajAnand Jan 17, 2025
30564c1
Update quarkus version to 3.15.3 LTS
RishiRajAnand Jan 22, 2025
216eb79
Update vertx and grpc
RishiRajAnand Jan 22, 2025
aeeac5b
Align maven compiler version with quarkus
RishiRajAnand Jan 22, 2025
8938adc
- Upgrade `io.quarkiverse.embedded.postgresql:quarkus-embedded-postgr…
pefernan Jan 22, 2025
676aa02
- Upgrade `io.quarkiverse.openapi.generator:quarkus-openapi-generator…
pefernan Jan 22, 2025
a7a3fd0
- fix `integration-tests-quarkus-openapi-client`
pefernan Jan 23, 2025
ef13c20
Minor renames as per migration guide 3.9
RishiRajAnand Jan 24, 2025
8b31bb0
Updating quarkus.package.type as per migration guide
RishiRajAnand Jan 27, 2025
9ea3944
- Remove unnecessary `xstream` dependency
pefernan Jan 27, 2025
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
6 changes: 5 additions & 1 deletion addons/common/flyway/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
</dependency>

<dependency>
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmmm, here we are adding a flyway dependency intended for a particular db in a common addon. I do not think thats the way to go. Im afraid this has to be moved somewhere else

Copy link
Contributor

Choose a reason for hiding this comment

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

@fjtirado the problem here is that flyway has changed a bit between v9 and v10. In v9 the core module was including the support for almost all db like pgsql, h2, mysql... but other propietary db'a (like sql server) had its own flyway-database-<vendor> maven module that should be manually included in the application pom.xml. In v10 they trimmed a bit more the flyway-core module, leaving only H2 and SQL Lite. So to allow Flyway work with any specific DB that isn't H2/SQL Lite it will be required adding the specific supporting database module.

In this module we had to include the flyway-database-postgresql to allow the tests pass.

<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand All @@ -67,6 +66,11 @@
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-database-postgresql</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion addons/common/persistence/infinispan/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<dependencies>
<!--~~(No version provided)~~>--><dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-client-hotrod-jakarta</artifactId>
<artifactId>infinispan-client-hotrod</artifactId>
</dependency>
<dependency>
<groupId>org.kie.kogito</groupId>
Expand Down
5 changes: 5 additions & 0 deletions addons/common/persistence/jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@
<type>pom</type>
<scope>test</scope>
</dependency>
<dependency>
Copy link
Contributor

Choose a reason for hiding this comment

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

@fjtirado same here, adding it for testing purposes.

<groupId>org.flywaydb</groupId>
<artifactId>flyway-database-postgresql</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
Expand Down
6 changes: 5 additions & 1 deletion addons/common/persistence/postgresql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,14 @@
<artifactId>kie-addons-flyway</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-database-postgresql</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${version.org.postgresql}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ private FieldDescriptorProto buildFieldDescriptor(FieldDescriptor descriptor) {
}
}
fieldBuilder.setLabel(descriptor.getLabel() == Label.ONE_OF ? FieldDescriptorProto.Label.LABEL_OPTIONAL : FieldDescriptorProto.Label.valueOf("LABEL_" + descriptor.getLabel().name()));
fieldBuilder.setProto3Optional(!descriptor.isRequired());
fieldBuilder.setProto3Optional(descriptor.getLabel() != Label.REQUIRED);
return fieldBuilder.build();
}

Expand Down
12 changes: 6 additions & 6 deletions kogito-build/kogito-build-no-bom-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,17 @@
<version.asciidoctor.plugin>1.5.2.1</version.asciidoctor.plugin>
<version.build.helper.plugin>3.0.0</version.build.helper.plugin>
<version.clean.plugin>3.1.0</version.clean.plugin>
<version.compiler.plugin>3.8.1</version.compiler.plugin>
<version.compiler.plugin>3.13.0</version.compiler.plugin>
<version.copyrename.plugin>1.0</version.copyrename.plugin>
<version.dependency.plugin>3.5.0</version.dependency.plugin>
<version.de.skuzzle.enforcer>1.1.0</version.de.skuzzle.enforcer>
<version.enforcer.plugin>3.0.0-M2</version.enforcer.plugin>
<version.enforcer.plugin>3.3.0</version.enforcer.plugin>
<version.exec.plugin>3.1.1</version.exec.plugin>
<version.findbugs.plugin>3.0.5</version.findbugs.plugin>
<version.install.plugin>2.5.2</version.install.plugin>
<version.invoker.plugin>3.2.2</version.invoker.plugin>
<version.install.plugin>3.1.1</version.install.plugin>
<version.invoker.plugin>3.7.0</version.invoker.plugin>
<version.jacoco.plugin>0.8.11</version.jacoco.plugin>
<version.jandex.plugin>3.1.6</version.jandex.plugin>
<version.jandex.plugin>3.2.3</version.jandex.plugin>
<version.jar.plugin>3.2.0</version.jar.plugin>
<version.javancss.plugin>2.0</version.javancss.plugin>
<version.jdocbook.plugin>2.3.9</version.jdocbook.plugin>
Expand All @@ -111,7 +111,7 @@
<version.shade.plugin>3.0.0</version.shade.plugin>
<version.sonar.plugin>3.6.1.1688</version.sonar.plugin>
<version.source.plugin>3.2.1</version.source.plugin>
<version.surefire.plugin>3.1.2</version.surefire.plugin> <!-- minimum required by JUnit 5 -->
<version.surefire.plugin>3.3.1</version.surefire.plugin> <!-- minimum required by JUnit 5 -->
<version.surefire.report.plugin>3.1.2</version.surefire.report.plugin>
<version.taglist.plugin>2.4</version.taglist.plugin>
<!-- Versions plugin should stay on version 2.5
Expand Down
66 changes: 31 additions & 35 deletions kogito-build/kogito-dependencies-bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

<properties>
<!-- this version property is used in plugins but also in dependencies too -->
<version.io.quarkus>3.8.6</version.io.quarkus>
<version.io.quarkus>3.15.3</version.io.quarkus>
<version.io.quarkus.quarkus-test>${version.io.quarkus}</version.io.quarkus.quarkus-test>
<version.org.springframework.boot>3.2.6</version.org.springframework.boot>
<version.org.apache.kafka>3.7.1</version.org.apache.kafka>
Expand All @@ -51,20 +51,20 @@
<version.net.minidev.jsonsmart>2.4.10</version.net.minidev.jsonsmart>
<version.net.thisptr.jackson-jq>1.0.0-preview.20240207</version.net.thisptr.jackson-jq>
<version.io.quarkiverse.jackson-jq>2.0.2</version.io.quarkiverse.jackson-jq>
<version.io.quarkiverse.openapi.generator>2.4.1</version.io.quarkiverse.openapi.generator>
<version.io.quarkiverse.openapi.generator>2.8.0-lts</version.io.quarkiverse.openapi.generator>
<version.io.quarkiverse.asyncapi>0.3.0</version.io.quarkiverse.asyncapi>
<version.io.quarkiverse.reactivemessaging.http>2.4.1</version.io.quarkiverse.reactivemessaging.http>
<version.io.quarkiverse.embedded.postgresql>0.2.3</version.io.quarkiverse.embedded.postgresql>
<version.io.quarkiverse.embedded.postgresql>0.3.0</version.io.quarkiverse.embedded.postgresql>
<version.com.github.haifengl.smile>1.5.2</version.com.github.haifengl.smile>
<version.com.github.javaparser>3.25.8</version.com.github.javaparser>
<version.com.github.javaparser>3.26.1</version.com.github.javaparser>
<version.com.fasterxml.jackson.datatype>2.17.2</version.com.fasterxml.jackson.datatype>
<version.com.github.victools>4.31.0</version.com.github.victools>
<version.com.github.tomakehurst.wiremock>2.35.1</version.com.github.tomakehurst.wiremock>
<version.com.github.tomakehurst.wiremock>2.35.2</version.com.github.tomakehurst.wiremock>
<version.com.google.protobuf>3.25.5</version.com.google.protobuf>
<!-- We don't use gson directly. This is just to align versions of transitive dependencies -->
<version.com.google.gson>2.10.1</version.com.google.gson>
<!-- currently required for integration test only -->
<version.com.sun.xml.bind.core>4.0.4</version.com.sun.xml.bind.core>
<version.com.sun.xml.bind.core>4.0.5</version.com.sun.xml.bind.core>
<version.com.sun.activation>2.0.1</version.com.sun.activation>
<version.javax.inject>2.0.1</version.javax.inject>
<version.org.eclipse.microprofile.openapi>3.1.1</version.org.eclipse.microprofile.openapi>
Expand All @@ -79,22 +79,21 @@
Don't add as a management dependency because it will break SpringBoot and Quarkus
Kubernetes addons since they use a different version.
-->
<version.io.fabric8.kubernetes-client>6.10.0</version.io.fabric8.kubernetes-client>
<version.io.fabric8.kubernetes-client>6.13.3</version.io.fabric8.kubernetes-client>
<version.io.micrometer>1.12.2</version.io.micrometer>
<version.org.flywaydb>9.22.3</version.org.flywaydb>
<version.org.postgresql>42.7.2</version.org.postgresql>
<version.com.h2>2.2.220</version.com.h2>
<version.org.flywaydb>10.17.3</version.org.flywaydb>
<version.org.postgresql>42.7.4</version.org.postgresql>
<version.com.h2>2.3.232</version.com.h2> <!-- Overriding version 2.3.230 to fix https://github.com/h2database/h2database/issues/4079 -->
<version.io.serverlessworkflow>4.0.5.Final</version.io.serverlessworkflow>
<!-- Aligned with Quarkus 2.7 (LTS) - see https://issues.redhat.com/browse/KOGITO-7971 -->
<version.io.smallrye-open-api>3.10.0</version.io.smallrye-open-api>
<version.org.awaitility>4.2.0</version.org.awaitility>

<version.io.smallrye.reactive.mutiny-vertx-web-client>3.11.0</version.io.smallrye.reactive.mutiny-vertx-web-client>

<version.io.vertx>4.5.7</version.io.vertx>
<version.io.grpc>1.59.1</version.io.grpc>
<version.io.vertx>4.5.11</version.io.vertx>
<version.io.grpc>1.65.1</version.io.grpc>

<version.io.quarkus.camel>3.9.0</version.io.quarkus.camel> <!-- TODO: quarkus version mismatch -->
<version.io.quarkus.camel>3.15.1</version.io.quarkus.camel> <!-- TODO: quarkus version mismatch -->

<version.io.swagger.parser.v3>2.1.19</version.io.swagger.parser.v3>
<version.io.swagger.core.v3>2.2.19</version.io.swagger.core.v3>
Expand All @@ -103,16 +102,16 @@

<version.org.graalvm.nativeimage>23.1.2</version.org.graalvm.nativeimage>

<version.org.infinispan>14.0.27.Final</version.org.infinispan>
<version.org.infinispan.protostream>4.6.5.Final</version.org.infinispan.protostream>
<version.org.infinispan>15.0.11.Final</version.org.infinispan>
<version.org.infinispan.protostream>5.0.8.Final</version.org.infinispan.protostream>

<version.org.rocksdb>7.10.2</version.org.rocksdb>
<!-- consider migrating to 3.x JDK 9: https://jakarta.ee/specifications/restful-ws/ -->
<version.jakarta.ws.rs>3.1.0</version.jakarta.ws.rs>
<version.jakarta.persistence-api>3.1.0</version.jakarta.persistence-api>

<version.org.jboss.resteasy>6.2.7.Final</version.org.jboss.resteasy>
<version.org.keycloak>24.0.4</version.org.keycloak>
<version.org.keycloak>25.0.6</version.org.keycloak>
<!-- It seems that the confluent kafka cannot replace wurstmeister/kafka so easily. See FAI-729 -->
<version.wurstmeister.kafka>2.12-2.2.1</version.wurstmeister.kafka>
<version.org.mongo>4.11.1</version.org.mongo>
Expand All @@ -121,7 +120,7 @@
<version.org.redis>2.0.4</version.org.redis>
<version.org.postgres>15.9-alpine3.20</version.org.postgres>
<!-- we align to version used by quarkus -->
<version.org.apache.avro>1.11.4</version.org.apache.avro>
<version.org.apache.avro>1.12.0</version.org.apache.avro>
<version.org.assertj>3.24.2</version.org.assertj>
<version.org.glassfish.jaxb>4.0.4</version.org.glassfish.jaxb>
<version.org.json-unit-assertj>2.9.0</version.org.json-unit-assertj>
Expand All @@ -131,11 +130,11 @@
<version.org.junit.vintage>5.10.2</version.org.junit.vintage>
<version.org.junit.platform>1.10.2</version.org.junit.platform> <!-- otherwise Quarkus brings its own, silently disabling some tests -->
<version.org.mockito>5.8.0</version.org.mockito>
<version.org.testcontainers>1.19.6</version.org.testcontainers>
<version.org.testcontainers>1.20.1</version.org.testcontainers>
<version.org.xmlunit-core>2.10.0</version.org.xmlunit-core>
<version.io.rest-assured>5.4.0</version.io.rest-assured>
<version.io.rest-assured>5.5.0</version.io.rest-assured>

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

<version.org.mvel>2.5.2.Final</version.org.mvel>
<version.org.reactivestreams>1.0.4</version.org.reactivestreams>
Expand All @@ -156,9 +155,6 @@
<version.com.google.collections>1.0</version.com.google.collections>
<version.com.google.guava>33.0.0-jre</version.com.google.guava>
<version.apache.commons.commons-compress>1.26.1</version.apache.commons.commons-compress>
<!-- Temporary declaring xstream dependency, a version (1.4.20) is transitively imported by Quarkus 3.8 affected by CVE
When upgrading Quarkus (> 3.15.x) to a new version, please evaluate if this exclusion can be removed -->
<version.com.thoughtworks.xstream>1.4.21</version.com.thoughtworks.xstream>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -455,14 +451,6 @@
<version>${version.jakarta.persistence-api}</version>
</dependency>

<!-- Temporary declaring xstream dependency, a version (1.4.20) is transitively imported by Quarkus 3.8 affected by CVE
When upgrading Quarkus (> 3.15.x) to a new version, please evaluate if this exclusion can be removed -->
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>${version.com.thoughtworks.xstream}</version>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
Expand Down Expand Up @@ -738,7 +726,11 @@
<artifactId>flyway-core</artifactId>
<version>${version.org.flywaydb}</version>
</dependency>

<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-database-postgresql</artifactId>
<version>${version.org.flywaydb}</version>
</dependency>
<!-- infinispan -->
<dependency>
<groupId>org.infinispan</groupId>
Expand All @@ -747,7 +739,7 @@
</dependency>
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-client-hotrod-jakarta</artifactId>
<artifactId>infinispan-client-hotrod</artifactId>
<version>${version.org.infinispan}</version>
</dependency>
<dependency>
Expand All @@ -765,7 +757,11 @@
<artifactId>protostream</artifactId>
<version>${version.org.infinispan.protostream}</version>
</dependency>

<dependency>
<groupId>org.infinispan.protostream</groupId>
<artifactId>protostream-processor</artifactId>
<version>${version.org.infinispan.protostream}</version>
</dependency>
<!--rockdb-->
<dependency>
<groupId>org.rocksdb</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ public List<CompilationUnit> generate(FileDescriptorSource proto) throws IOExcep
}

if (customTypeName.equals(Serializable.class.getName())) {
String fieldClazz = (String) field.getOptionByName(KOGITO_JAVA_CLASS_OPTION);
String fieldClazz = (String) field.getOptionByName(KOGITO_JAVA_CLASS_OPTION).getValue();
if (fieldClazz == null) {
throw new IllegalArgumentException(format("Serializable proto field '%s' is missing value for option %s", field.getName(), KOGITO_JAVA_CLASS_OPTION));
} else {
Expand Down Expand Up @@ -317,7 +317,11 @@ public List<CompilationUnit> generate(FileDescriptorSource proto) throws IOExcep
}

protected String packageFromOption(FileDescriptor d, Descriptor msg) {
return packageFromOption(d, msg.getOption(JAVA_PACKAGE_OPTION));
Option option = msg.getOptions().stream()
.filter(o -> JAVA_PACKAGE_OPTION.equals(o.getName()))
.findAny()
.orElse(null);
return packageFromOption(d, option);
}

protected String packageFromOption(FileDescriptor d, EnumDescriptor msg) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ protected ProtoMessage messageFromClass(Proto proto, Set<String> alreadyGenerate
ProtoField protoField = message.addField(computeCardinalityModifier(fieldTypeString), protoType, pd.getName());
protoField.setComment(completeFieldComment);
if (KOGITO_SERIALIZABLE.equals(protoType)) {
protoField.setOption(format("[(%s) = \"%s\"]", KOGITO_JAVA_CLASS_OPTION, pd.getPropertyType().getCanonicalName()));
protoField.setOption(format("[%s = \"%s\"]", KOGITO_JAVA_CLASS_OPTION, pd.getPropertyType().getCanonicalName()));
}
}
message.setComment(messageComment);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ void testPersonMarshallers() throws Exception {
assertThat(proto.getMessages()).hasSize(1);

MarshallerGenerator marshallerGenerator = withGenerator(Person.class);

List<CompilationUnit> classes = marshallerGenerator.generate(proto.serialize());
assertThat(classes).isNotNull().hasSize(1);

Expand Down
Loading
Loading