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 #3141

Merged
merged 4 commits into from
Jul 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
1 change: 1 addition & 0 deletions .ci/environments/quarkus-3/before.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ ${mvn_cmd} org.openrewrite.maven:rewrite-maven-plugin:${rewrite_plugin_version}:
-Drewrite.recipeArtifactCoordinates=org.kie:jpmml-migration-recipe:"${drools_version}" \
-Denforcer.skip \
-fae \
-Dfull \
-Dexclusions=**/target \
-DplainTextMasks=**/kmodule.xml

Expand Down
17 changes: 17 additions & 0 deletions .ci/environments/quarkus-3/patches/0001_before_sh.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2572,6 +2572,23 @@ index 295de81ef7..e85b0f8c09 100644

import org.eclipse.microprofile.config.inject.ConfigProperty;
import org.kie.kogito.svg.AbstractProcessSvgService;
diff --git a/quarkus/addons/python/runtime/src/main/java/org/kie/kogito/quarkus/serverless/workflow/python/PythonWorkItemHandlerConfig.java b/quarkus/addons/python/runtime/src/main/java/org/kie/kogito/quarkus/serverless/workflow/python/PythonWorkItemHandlerConfig.java
index 9316ad12b6..fc98d52f66 100644
--- a/quarkus/addons/python/runtime/src/main/java/org/kie/kogito/quarkus/serverless/workflow/python/PythonWorkItemHandlerConfig.java
+++ b/quarkus/addons/python/runtime/src/main/java/org/kie/kogito/quarkus/serverless/workflow/python/PythonWorkItemHandlerConfig.java
@@ -15,9 +15,9 @@
*/
package org.kie.kogito.quarkus.serverless.workflow.python;

-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-import javax.enterprise.context.ApplicationScoped;
+import jakarta.annotation.PostConstruct;
+import jakarta.annotation.PreDestroy;
+import jakarta.enterprise.context.ApplicationScoped;

import org.kie.kogito.internal.process.runtime.KogitoWorkItemHandler;
import org.kie.kogito.process.impl.CachedWorkItemHandlerConfig;
diff --git a/quarkus/addons/rest-exception-handler/pom.xml b/quarkus/addons/rest-exception-handler/pom.xml
index d0ffa42730..abbc56828f 100644
--- a/quarkus/addons/rest-exception-handler/pom.xml
Expand Down
8 changes: 4 additions & 4 deletions .ci/environments/quarkus-3/patches/0013_kube_addon.patch
Original file line number Diff line number Diff line change
Expand Up @@ -465,15 +465,15 @@ index 8edc43c794..4e5c4aa457 100644
pod.getSpec().getContainers().get(0).getPorts()
.add(new ContainerPortBuilder()
diff --git a/quarkus/addons/fabric8-kubernetes-service-catalog/test-utils/src/main/java/org/kie/kogito/addons/quarkus/k8s/test/utils/KnativeResourceDiscoveryTestUtil.java b/quarkus/addons/fabric8-kubernetes-service-catalog/test-utils/src/main/java/org/kie/kogito/addons/quarkus/k8s/test/utils/KnativeResourceDiscoveryTestUtil.java
index 30f90e0927..8ab3ec6652 100644
index c156609e02..4b33ba5402 100644
--- a/quarkus/addons/fabric8-kubernetes-service-catalog/test-utils/src/main/java/org/kie/kogito/addons/quarkus/k8s/test/utils/KnativeResourceDiscoveryTestUtil.java
+++ b/quarkus/addons/fabric8-kubernetes-service-catalog/test-utils/src/main/java/org/kie/kogito/addons/quarkus/k8s/test/utils/KnativeResourceDiscoveryTestUtil.java
@@ -34,7 +34,7 @@ public final class KnativeResourceDiscoveryTestUtil {
@@ -38,7 +38,7 @@ public final class KnativeResourceDiscoveryTestUtil {
Service service = knativeClient.services()
.inNamespace(namespace)
.load(getResourceAsStream(knativeYaml))
- .get();
+ .item();

service.getStatus().setUrl(remoteServiceUrl);

if (remoteServiceUrl != null) {
service.getStatus().setUrl(remoteServiceUrl);
14 changes: 7 additions & 7 deletions .ci/environments/quarkus-3/quarkus3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ description: Update Quarkus version and refactor imports and resources if needed
type: specs.openrewrite.org/v1beta/recipe
recipeList:
- org.openrewrite.maven.ChangePropertyValue: {
key: version.io.quarkus,
newValue: 3.0.0.Final
newValue: 3.0.0.Final,
key: version.io.quarkus
}
- org.openrewrite.maven.ChangePropertyValue: {
key: version.org.kie,
newValue: 9.43.0-SNAPSHOT
newValue: 9.43.0-SNAPSHOT,
key: version.org.kie
}
- org.kie.kogito.Quarkus3Migration
- org.kie.ManagedDependencies
Expand Down Expand Up @@ -143,9 +143,6 @@ recipeList:
newArtifactId: infinispan-client-hotrod-jakarta
}
---
name: org.kie.ManagedDependencies
description: Update all managed dependencies based on dependency updates from Quarkus.
type: specs.openrewrite.org/v1beta/recipe
recipeList:
- org.openrewrite.maven.ChangeManagedDependencyGroupIdAndArtifactId: {
oldGroupId: javax.activation,
Expand Down Expand Up @@ -531,6 +528,9 @@ recipeList:
newArtifactId: keycloak-admin-client-jakarta
}
displayName: Update Managed Dependencies
name: org.kie.ManagedDependencies
description: Update all managed dependencies based on dependency updates from Quarkus.
type: specs.openrewrite.org/v1beta/recipe
---
type: specs.openrewrite.org/v1beta/recipe
name: io.quarkus.updates.core.quarkus30.UpgradeQuarkiverse
Expand Down
6 changes: 3 additions & 3 deletions .ci/jenkins/Jenkinsfile.quarkus-3.rewrite.pr
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ pipeline {
script {
dir('drools') {
githubscm.checkoutIfExists('drools', changeAuthor, changeBranch, 'kiegroup', changeTarget, true)
sh '.ci/environments/update.sh quarkus-3'
getMavenCommand().withProperty('quickly').run('clean install')
util.runWithPythonVirtualEnv('.ci/environments/update.sh quarkus-3', 'swf')
util.runWithPythonVirtualEnv(getMavenCommand().withProperty('quickly').getFullRunCommand('clean install'), 'swf')
}
}
}
Expand All @@ -54,7 +54,7 @@ pipeline {
env.BUILD_MVN_OPTS = "${env.BUILD_MVN_OPTS ?: ''} -s ${MAVEN_SETTINGS_FILE} -Dmaven.wagon.http.ssl.insecure=true -Dmaven.test.failure.ignore=true"
echo "BUILD_MVN_OPTS = ${BUILD_MVN_OPTS}"

sh '.ci/environments/quarkus-3/before.sh rewrite'
util.runWithPythonVirtualEnv('.ci/environments/quarkus-3/before.sh rewrite', 'swf')
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions .ci/jenkins/Jenkinsfile.quarkus-3.rewrite.standalone
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ pipeline {
script {
dir('drools') {
githubscm.checkoutIfExists('drools', getGitAuthor(), getBuildBranch(), getBaseAuthor(), getBaseBranch(), true)
sh '.ci/environments/update.sh quarkus-3'
getMavenCommand().withProperty('quickly').run('clean install')
util.runWithPythonVirtualEnv('.ci/environments/update.sh quarkus-3', 'swf')
util.runWithPythonVirtualEnv(getMavenCommand().withProperty('quickly').getFullRunCommand('clean install'), 'swf')
}
}
}
Expand All @@ -73,7 +73,7 @@ pipeline {
env.BUILD_MVN_OPTS = "${env.BUILD_MVN_OPTS ?: ''} -s ${MAVEN_SETTINGS_FILE} -Dmaven.wagon.http.ssl.insecure=true -Dmaven.test.failure.ignore=true"
echo "BUILD_MVN_OPTS = ${BUILD_MVN_OPTS}"

sh '.ci/environments/quarkus-3/before.sh rewrite'
util.runWithPythonVirtualEnv('.ci/environments/quarkus-3/before.sh rewrite', 'swf')
}
}
}
Expand Down
Loading