Uploaded image for project: 'Quarkus'
  1. Quarkus
  2. QUARKUS-1247

Regression: Knative deployments not working

XMLWordPrintable

    • False
    • False
    • +
    • Hide

      1. Login to a OCP cluster with Knative installed (RH Serverless operator)
      2. Create a new OCP project `oc new-project reproduce`
      3. Generate the quarkus application: `mvn io.quarkus:quarkus-maven-plugin:2.2.1.Final:create -DprojectGroupId=org.acme -DprojectArtifactId=getting-started -DclassName="org.acme.quickstart.GreetingResource" -Dpath="/hello" -Dextensions="resteasy,openshift"`
      4. `mvn clean package -Dquarkus.kubernetes.deploy=true -Dquarkus.openshift.route.expose=true -Dquarkus.kubernetes-client.trust-certs=true -Dquarkus.kubernetes.deployment-target=knative`

      Show
      1. Login to a OCP cluster with Knative installed (RH Serverless operator) 2. Create a new OCP project `oc new-project reproduce` 3. Generate the quarkus application: `mvn io.quarkus:quarkus-maven-plugin:2.2.1.Final:create -DprojectGroupId=org.acme -DprojectArtifactId=getting-started -DclassName="org.acme.quickstart.GreetingResource" -Dpath="/hello" -Dextensions="resteasy,openshift"` 4. `mvn clean package -Dquarkus.kubernetes.deploy=true -Dquarkus.openshift.route.expose=true -Dquarkus.kubernetes-client.trust-certs=true -Dquarkus.kubernetes.deployment-target=knative`

      Reported in upstream: https://github.com/quarkusio/quarkus/issues/19950

      Deployments using Knative: https://quarkus.io/guides/deploying-to-kubernetes#knative, are failing with the following exception:

      [INFO] [io.quarkus.kubernetes.deployment.KubernetesDeployer] Deploying to knative server: https://api.ocp48.dynamic.quarkus:6443/ in namespace: jose-test.
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time:  01:43 min
      [INFO] Finished at: 2021-09-07T06:50:29+02:00
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:2.2.1.Final:build (default) on project getting-started: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
      [ERROR] 	[error]: Build step io.quarkus.kubernetes.deployment.KubernetesDeployer#deploy threw an exception: io.fabric8.kubernetes.client.KubernetesClientException: Cannot edit io.fabric8.knative.serving.v1.EditableService with visitors, no builder was found
      [ERROR] 	at io.fabric8.kubernetes.client.ResourceHandlerImpl.edit(ResourceHandlerImpl.java:52)
      [ERROR] 	at io.fabric8.kubernetes.client.dsl.internal.NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableImpl.acceptVisitors(NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableImpl.java:246)
      [ERROR] 	at io.fabric8.kubernetes.client.dsl.internal.NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableImpl.inNamespace(NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableImpl.java:130)
      [ERROR] 	at io.fabric8.kubernetes.client.dsl.internal.NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableImpl.inNamespace(NamespaceVisitFromServerGetWatchDeleteRecreateWaitApplicableImpl.java:64)
      [ERROR] 	at io.quarkus.kubernetes.deployment.KubernetesDeployer.lambda$deploy$4(KubernetesDeployer.java:179)
      [ERROR] 	at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
      [ERROR] 	at io.quarkus.kubernetes.deployment.KubernetesDeployer.deploy(KubernetesDeployer.java:177)
      [ERROR] 	at io.quarkus.kubernetes.deployment.KubernetesDeployer.deploy(KubernetesDeployer.java:102)
      [ERROR] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [ERROR] 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      [ERROR] 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      [ERROR] 	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      [ERROR] 	at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:820)
      [ERROR] 	at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
      [ERROR] 	at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
      [ERROR] 	at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
      [ERROR] 	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
      [ERROR] 	at java.base/java.lang.Thread.run(Thread.java:829)
      [ERROR] 	at org.jboss.threads.JBossThread.run(JBossThread.java:501)
      

      This is reproduced for the Quarkus versions: 999-SNAPSHOT, 2.2.1.Final, 2.2.0.Final.
      It works using Quarkus 2.1.0.Final.

              mnurisan Marc Nuri
              jcarvaja@redhat.com Jose Carvajal Hilario
              Kyrylo Shpak Kyrylo Shpak (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: