To land https://github.com/openshift/oc/pull/890 I disable the following test: https://github.com/openshift/origin/blob/93a0377347707b04dcfee502625977b22439c9b0/test/extended/cli/observe.go#L77-L79 this is because in https://github.com/kubernetes/kubernetes/pull/98057/ the fix is causing template processing end when it can't find results. I tried switching that break statement into continue but that on the other hand doesn't pass units. We need to figure out a way to properly address this so that both above test and the unit are passing See my last comment in https://github.com/kubernetes/kubernetes/pull/98057/#issuecomment-891758807
the original problem in https://bugzilla.redhat.com/show_bug.cgi?id=1900755 doesn't seem like a bug because it is using incorrect jsonpath syntax. It is missing the {end} element. Please see https://kubernetes.io/docs/reference/kubectl/jsonpath/. I have posted a PR for reverting the original fix
to re-enable the test we have to wait for this change to get back to oc which could take some time @maszulik would it make sense to bring this patch to oc sooner?
(In reply to Filip Krepinsky from comment #2) > to re-enable the test we have to wait for this change to get back to oc > which could take some time > > @maszulik would it make sense to bring this patch to oc sooner? We'll definitely need to get that into oc.
waiting for upstream approval
posted a downstream PR to get it sooner than upstream
Checked with latest origin repo, could see the code , and run pass: [root@localhost origin]# ./openshift-tests run-test "[sig-cli] oc observe works as expected [Suite:openshift/conformance/parallel]" [BeforeEach] [Top Level] github.com/openshift/origin/test/extended/util/framework.go:1453 [BeforeEach] [Top Level] github.com/openshift/origin/test/extended/util/framework.go:1453 [BeforeEach] [Top Level] github.com/openshift/origin/test/extended/util/test.go:61 [BeforeEach] [sig-cli] oc observe github.com/openshift/origin/test/extended/util/client.go:142 STEP: Creating a kubernetes client [It] works as expected [Suite:openshift/conformance/parallel] github.com/openshift/origin/test/extended/cli/observe.go:17 ..... STEP: argument templates Sep 2 16:06:14.146: INFO: Running 'oc --kubeconfig=/root/kubeconfig observe services --once --all-namespaces --template='{ .spec.clusterIP }'' Sep 2 16:06:14.985: INFO: Running 'oc --kubeconfig=/root/kubeconfig observe services --once --all-namespaces --template='{{ .spec.clusterIP }}' --output=go-template' Sep 2 16:06:15.648: INFO: Running 'oc --kubeconfig=/root/kubeconfig observe services --once --all-namespaces --template='bad{ .missingkey }key''
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.9.0 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:3759