Bug 1788357

Summary: `oc version -o yaml` does not show the oc detailed version infomation
Product: OpenShift Container Platform Reporter: zhou ying <yinzhou>
Component: ocAssignee: Maciej Szulik <maszulik>
Status: CLOSED ERRATA QA Contact: zhou ying <yinzhou>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.4CC: aos-bugs, jokerman, lxia, mfojtik, xtian, xxia
Target Milestone: ---Keywords: Regression, Reopened, TestBlocker
Target Release: 4.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1793267 (view as bug list) Environment:
Last Closed: 2020-05-04 11:23:07 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: 1793267    

Description zhou ying 2020-01-07 02:36:29 UTC
Description of problem:
Install the latest oc from the repo, use `oc version -o yaml` command to check version info, the buildDate/gitCommit/gitTreeState/gitVersion are all empty.

Version-Release number of selected component (if applicable):
4.4.0-202001061648.git.1.a1c3e4d.el7

How reproducible:
Always

Steps to Reproduce:
1. Install oc from repo: http://download.eng.bos.redhat.com/rcm-guest/puddles/RHAOS/AtomicOpenShift/4.4/latest/x86_64/os/
2. Check the oc version
    `oc version -o yaml`

Actual results:
2. [root@dhcp-140-138 ~]# oc version -o yaml 
clientVersion:
  buildDate: ""
  compiler: gc
  gitCommit: ""
  gitTreeState: ""
  gitVersion: unknown
  goVersion: go1.13.4
  major: ""
  minor: ""
  platform: linux/amd64

Expected results:
2. Show correct infomation of the oc version.

Additional info:

Comment 1 Maciej Szulik 2020-01-07 12:50:00 UTC

*** This bug has been marked as a duplicate of bug 1780779 ***

Comment 2 Xingxing Xia 2020-01-16 09:06:17 UTC
This bug is different symptom from bug 1780779. Even if same, that bug's Target Release is 4.2.z, but this bug is for 4.4, need separate bugs.

Comment 4 Maciej Szulik 2020-01-17 14:54:51 UTC
This might have been fixed in https://github.com/openshift/oc/pull/250

Comment 6 zhou ying 2020-01-19 01:14:31 UTC
Confirmed with oc extraced from payload: 4.4.0-0.nightly-2020-01-18-210238, the issue has fixed:

[root@localhost home]# ./oc version  --client -o yaml
clientVersion:
  buildDate: "2020-01-17T09:20:02Z"
  compiler: gc
  gitCommit: e17af88a81bab82a47aa161fb0db99f6e9424661
  gitTreeState: dirty
  gitVersion: openshift-clients-4.3.0-201910250623-168-ge17af88a
  goVersion: go1.13.4
  major: ""
  minor: ""
  platform: linux/amd64
releaseClientVersion: 4.4.0-0.nightly-2020-01-18-210238

Comment 8 errata-xmlrpc 2020-05-04 11:23:07 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, 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/RHBA-2020:0581