Bug 1989505

Summary: Enable back single oc observe test
Product: OpenShift Container Platform Reporter: Maciej Szulik <maszulik>
Component: ocAssignee: Filip Krepinsky <fkrepins>
Status: CLOSED ERRATA QA Contact: zhou ying <yinzhou>
Severity: high Docs Contact:
Priority: high    
Version: 4.9CC: aos-bugs, fkrepins, jokerman, mfojtik
Target Milestone: ---   
Target Release: 4.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-18 17:44:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Maciej Szulik 2021-08-03 11:13:34 UTC
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

Comment 1 Filip Krepinsky 2021-08-05 16:57:36 UTC
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

Comment 2 Filip Krepinsky 2021-08-05 17:04:32 UTC
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?

Comment 3 Maciej Szulik 2021-08-09 13:20:39 UTC
(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.

Comment 4 Filip Krepinsky 2021-08-17 10:37:37 UTC
waiting for upstream approval

Comment 5 Filip Krepinsky 2021-08-26 12:10:21 UTC
posted a downstream PR to get it sooner than upstream

Comment 10 zhou ying 2021-09-02 08:12:44 UTC
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''

Comment 13 errata-xmlrpc 2021-10-18 17:44:13 UTC
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