Bug 2101885

Summary: The bash completion doesn't work for get subcommand
Product: OpenShift Container Platform Reporter: Alexander Chuzhoy <sasha>
Component: ocAssignee: Arda Guclu <aguclu>
oc sub component: oc QA Contact: zhou ying <yinzhou>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: mfojtik, srozen
Version: 4.11   
Target Milestone: ---   
Target Release: 4.12.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-01-17 19:50:54 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:
Bug Depends On:    
Bug Blocks: 2107003    

Description Alexander Chuzhoy 2022-06-28 15:59:54 UTC
4.11.0-fc.0

With bash completion enabled, we're unable to complete the command for "oc get".

Bash completion does work for other sub-commands like describe.

Comment 2 zhou ying 2022-07-05 08:35:23 UTC
[root@localhost ~]# ./oc version --client
Client Version: 4.11.0-fc.0
Kustomize Version: v4.5.4
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# ./oc get 
Display all 192 possibilities? (y or n)
alertmanagerconfigs.monitoring.coreos.com                        kubecontrollermanagers.operator.openshift.io
alertmanagers.monitoring.coreos.com                              kubeletconfigs.machineconfiguration.openshift.io
apirequestcounts.apiserver.openshift.io                          kubeschedulers.operator.openshift.io
apiservers.config.openshift.io                                   kubestorageversionmigrators.operator.openshift.io
apiservices.apiregistration.k8s.io                               leases.coordination.k8s.io
appliedclusterresourcequotas.quota.openshift.io                  limitranges
....

Comment 3 zhou ying 2022-07-05 13:07:52 UTC
with latest oc version , can't reproduce the issue now:


source <(./oc  completion bash)
[root@localhost ~]# ./oc version --client
Client Version: 4.12.0-0.nightly-2022-07-05-122228
Kustomize Version: v4.5.4
[root@localhost ~]# ./oc get 
Display all 192 possibilities? (y or n)
alertmanagerconfigs.monitoring.coreos.com                        kubeapiservers.operator.openshift.io
alertmanagers.monitoring.coreos.com                              kubecontrollermanagers.operator.openshift.io
apirequestcounts.apiserver.openshift.io                          kubeletconfigs.machineconfiguration.openshift.io
apiservers.config.openshift.io                                   kubeschedulers.operator.openshift.io
apiservices.apiregistration.k8s.io                               kubestorageversionmigrators.operator.openshift.io

Comment 4 Arda Guclu 2022-08-03 09:48:11 UTC
*** Bug 2110359 has been marked as a duplicate of this bug. ***

Comment 5 Arda Guclu 2022-08-03 10:00:24 UTC
I set duplicate id of 4.12.

This is 4.11 https://bugzilla.redhat.com/show_bug.cgi?id=2107003
and thishttps://github.com/openshift/oc/pull/1206  is the patch waiting to be approved.

Comment 9 errata-xmlrpc 2023-01-17 19:50:54 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.12.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-2022:7399