Bug 1989505 - Enable back single oc observe test
Summary: Enable back single oc observe test
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.9
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.9.0
Assignee: Filip Krepinsky
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-08-03 11:13 UTC by Maciej Szulik
Modified: 2021-10-18 17:44 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-10-18 17:44:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubernetes kubernetes pull 104172 0 None None None 2021-08-05 16:57:35 UTC
Github openshift kubernetes-client-go pull 29 0 None None None 2021-08-26 17:41:44 UTC
Github openshift oc pull 909 0 None None None 2021-08-31 13:01:38 UTC
Github openshift origin pull 26436 0 None None None 2021-08-31 08:37:12 UTC
Red Hat Product Errata RHSA-2021:3759 0 None None None 2021-10-18 17:44:29 UTC

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


Note You need to log in before you can comment on or make changes to this bug.