oc installed by RPM-packed still has this issue: [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 .... [root@dhcp-140-138 ~]# rpm -q openshift-clients openshift-clients-4.4.0-202001170700.git.1.35f9dad.el7.x86_64
Shiyang, Yuxiang, Luke and Vikas, Since QE's auto test slaves extract latest oc automatically from latest above RPM, retrieve client version from that oc to run tests for the versioned cases, now QE's 4.4 auto test failed and is blocked due to this bug. So adding this needinfo request to you, please help address it by making the oc in above RPM include the fix of bug 1788357 ASAP. Thank you in advance.
@lmeyer has created tag https://github.com/openshift/oc/tree/openshift-clients-4.4. Succeeding builds should have correct version.
In https://github.com/openshift/oc/pull/250 we fixed the ld flags injected into the command, I have a PR also for 4.3 fixing the same issue. All the data are read from current git, this includes the gitVersion, gitCommit and gitTreeState. If those cannot be read properly from repository then can be injected into build system through these 3 variables: SOURCE_GIT_TAG, SOURCE_GIT_COMMIT, SOURCE_GIT_TREE_STATE. I hope the above will help unstick ART.
Not there yet, still missing one final PR.
Confirmed with latest oc clients, the issue still can reproduce: [root@dhcp-140-138 ~]# rpm -q openshift-clients openshift-clients-4.4.0-202002052231.git.1.3433f68.el7.x86_64 [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
This was merged into oc on Feb 6th, so the build with a fix must be older than Feb 7th, at least. Moving back to modified.
The issue has fixed: [root@localhost ~]# oc version -o yaml clientVersion: buildDate: "2020-02-10T17:21:47Z" compiler: gc gitCommit: ee05f83cb8f0bee84c0a1516591437cd71befdc8 gitTreeState: clean gitVersion: v4.4.0 goVersion: go1.13.4 major: "" minor: "" platform: linux/amd64
Fixed in latest releases.