From f08b9b63225382e0d7082480dc75e39b42b8e49f Mon Sep 17 00:00:00 2001 From: Fedor Dudinskiy Date: Thu, 22 Jun 2023 16:42:52 +0200 Subject: [PATCH 1/2] Bump Quarkus to 3.2.0.CR1 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 85c4cb383..c7b546702 100644 --- a/pom.xml +++ b/pom.xml @@ -47,7 +47,7 @@ 1.9.0 quarkus-bom io.quarkus - 3.1.0.Final + 3.2.0.CR1 quarkus-cli **/*IT.java **/OpenShift*IT.java From 953d933b37fbf6a2d3a73ac328b7dad1cb88c120 Mon Sep 17 00:00:00 2001 From: Fedor Dudinskiy Date: Thu, 22 Jun 2023 17:13:27 +0200 Subject: [PATCH 2/2] Remove workaround Previous PR[1] added a workaround to address incompatibilitybetween different versions of fabiric8 Due to update of Quarkus version, it can now be removed [1] https://github.com/quarkus-qe/quarkus-test-framework/pull/814 --- .../bootstrap/inject/OpenShiftClient.java | 26 +------------------ 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/quarkus-test-openshift/src/main/java/io/quarkus/test/bootstrap/inject/OpenShiftClient.java b/quarkus-test-openshift/src/main/java/io/quarkus/test/bootstrap/inject/OpenShiftClient.java index 58d9b2ba6..c6844e1c0 100644 --- a/quarkus-test-openshift/src/main/java/io/quarkus/test/bootstrap/inject/OpenShiftClient.java +++ b/quarkus-test-openshift/src/main/java/io/quarkus/test/bootstrap/inject/OpenShiftClient.java @@ -17,9 +17,6 @@ import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; -import java.io.InputStream; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; import java.nio.file.Files; import java.nio.file.Path; import java.time.Duration; @@ -56,9 +53,7 @@ import io.fabric8.kubernetes.client.CustomResource; import io.fabric8.kubernetes.client.KubernetesClientBuilder; import io.fabric8.kubernetes.client.dsl.ContainerResource; -import io.fabric8.kubernetes.client.dsl.NamespaceListVisitFromServerGetDeleteRecreateWaitApplicable; import io.fabric8.kubernetes.client.dsl.PodResource; -import io.fabric8.kubernetes.client.impl.KubernetesClientImpl; import io.fabric8.kubernetes.client.utils.Serialization; import io.fabric8.openshift.api.model.DeploymentConfig; import io.fabric8.openshift.api.model.ImageStream; @@ -962,26 +957,7 @@ private boolean doCreateProject(String projectName) { } private List loadYaml(String template) { - NamespaceListVisitFromServerGetDeleteRecreateWaitApplicable metadata = loadUsingDarkArtsOfReflection( - client, new ByteArrayInputStream(template.getBytes())); - return metadata.items(); - } - - /* - * todo replace the only call of this method with client.load(new ByteArrayInputStream(...) - * when https://github.com/quarkusio/quarkus/pull/33767 got released (probably 3.2.0) - * verification: mvn clean install -Pframework \ - * && mvn clean verify -Popenshift,examples -pl examples/https/ -Dquarkus.platform.version=999-SNAPSHOT - */ - private NamespaceListVisitFromServerGetDeleteRecreateWaitApplicable loadUsingDarkArtsOfReflection( - OpenShiftClientImpl client, ByteArrayInputStream stream) { - try { - Method method = KubernetesClientImpl.class.getDeclaredMethod("load", InputStream.class); - Object metadata = method.invoke(client, stream); - return (NamespaceListVisitFromServerGetDeleteRecreateWaitApplicable) metadata; - } catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) { - throw new RuntimeException(e); - } + return client.load(new ByteArrayInputStream(template.getBytes())).items(); } private String generateRandomProjectName() {