Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Pipelines 1.8.0
-
False
-
None
-
False
-
If Release Note Needed, Set a Value
-
Set a Value
Description
Currently, OpenShift Pipelines are defining their own version of kn to be used in a given Pipelines release. As of today, upcoming Pipelines 1.8 kn task version lags behind Serverless substantially. Pipelines 1.8 will be shipping version 1.2, when Serverless will have 1.4 is next week. This could lead to unexpected behavior, mostly with incompatibilities in API between kn client and Serverless installation. Our customers would expect to have the same version of kn, as they have installed on the cluster though Serverless Operator.
Installing the latest released version of kn could also lead to incompatibilities in API, between kn client and Serverless installation.
Pipelines should reconcile the state of the cluster and always use the same version of kn, that is currently installed on the cluster via Serverless Operator. When Serverless Operator is not installed on the cluster, the kn task is meaningless and should raise an error when used.
You can get the download link in this way:
arch="amd64" machine=$(uname -m) case ${machine} in ppc|ppc64) arch="ppc64le" ;; s390|s390x) arch="s390x" ;; esac download_url="$(oc get ConsoleCLIDownload kn -o json | jq -r ".spec.links[] | select(.href|test(\"linux-${arch}\")).href")"
See example task for possible solution: https://gist.github.com/jrangelramos/302e4f983dbfb7bda7a5869b2329bdeb
Execution:
[deploy : func-deploy] % Total % Received % Xferd Average Speed Time Time Time Current [deploy : func-deploy] Dload Upload Total Spent Left Speed 100 19.7M 100 19.7M 0 0 548M 0 --:--:-- --:--:-- --:--:-- 548M [deploy : func-deploy] Version: v1.4.1 [deploy : func-deploy] Build Date: 2022-09-19 10:07:16 [deploy : func-deploy] Git Revision: 9b8e317a [deploy : func-deploy] Supported APIs: [deploy : func-deploy] * Serving [deploy : func-deploy] - serving.knative.dev/v1 (knative-serving v1.4.1) [deploy : func-deploy] * Eventing [deploy : func-deploy] - sources.knative.dev/v1 (knative-eventing v1.4.0) [deploy : func-deploy] - eventing.knative.dev/v1 (knative-eventing v1.4.0) [deploy : func-deploy] v1.7.0 [deploy : func-deploy] Deploying image 'image-registry.openshift-image-registry.svc:5000/test-jeramos/node-fn:latest' with digest ''. Build and push are disabled. [deploy : func-deploy] ⬆️ Deploying function to the cluster [deploy : func-deploy] ✅ Function updated in namespace "test-jeramos" and exposed at URL: [deploy : func-deploy] https://node-fn-test-jeramos.apps.jeramos-182.ci-psi.rhocf-dev.net