Description of problem: oc extracted from payload show: gitTreeState: dirty,gitVersion: openshift-clients-4.4-57-g9353dc46 Version-Release number of selected component (if applicable): Payload: 4.4.0-0.nightly-2020-02-25-015247 clientVersion: buildDate: "2020-02-21T09:20:36Z" compiler: gc gitCommit: 9353dc4631653a8de08d4b2508f1820a1fd0f15e gitTreeState: dirty gitVersion: openshift-clients-4.4-57-g9353dc46 goVersion: go1.13.4 major: "" minor: "" platform: linux/amd64 How reproducible: Always Steps to Reproduce: 1. Extract oc from payload: `oc adm release extract --command='oc' registry.svc.ci.openshift.org/ocp/release:4.4.0-0.nightly-2020-02-25-015247` 2. Check oc version Actual results: 2. Show : clientVersion: buildDate: "2020-02-21T09:20:36Z" compiler: gc gitCommit: 9353dc4631653a8de08d4b2508f1820a1fd0f15e gitTreeState: dirty gitVersion: openshift-clients-4.4-57-g9353dc46 goVersion: go1.13.4 major: "" minor: "" platform: linux/amd64 2. Show : clientVersion: buildDate: "2020-02-21T09:20:36Z" compiler: gc gitCommit: 9353dc4631653a8de08d4b2508f1820a1fd0f15e gitTreeState: dirty gitVersion: openshift-clients-4.4-57-g9353dc46 goVersion: go1.13.4 major: "" minor: "" platform: linux/amd64 Expected results: 2. Should show : gitTreeState: clean Additional info: oc installed from yum works well
This is a problem coming from ART, if you check http://download.eng.bos.redhat.com/brewroot/packages/ose-cli-artifacts-container/v4.4.0/202002260631/data/logs/x86_64-build.log you'll notice that only OS_GIT_TREE_STATE=clean is set at the top, but not SOURCE_GIT_TREE_STATE. The former is used when producing rpms, the latter is being used for binaries. We should ensure that both are set to clean, iow: SOURCE_GIT_TREE_STATE=clean and OS_GIT_TREE_STATE=clean should be set by ART. Having said this, I'm sending this to ART team.
PR https://github.com/openshift/doozer/pull/234 should be able to fix this.
Checked with the latest oc extracted from payload: 4.6.0-0.nightly-2020-07-03-010217, the issue still could reproduce : [root@dhcp-140-138 ~]# ./oc version --client -o yaml clientVersion: buildDate: "2020-07-02T09:44:24Z" compiler: gc gitCommit: ad8b00fb56b2e0263a08404df252ba9a87b0b872 gitTreeState: dirty gitVersion: openshift-clients-4.6.0-202006250705.p0-2-gad8b00fb5 goVersion: go1.14.4 major: "" minor: "" platform: linux/amd64 releaseClientVersion: 4.6.0-0.nightly-2020-07-03-010217
The fix hasn't been deployed to ART's build system. We expect this will be fixed in next week's release.
The issue has fixed: oc extracted from payload: [root@dhcp-140-138 ~]# ./oc version --client -o yaml clientVersion: buildDate: "2020-07-05T15:35:18Z" compiler: gc gitCommit: fdc10d05ca16e71b8b1ae8b99fc4e257600787c5 gitTreeState: clean gitVersion: openshift-clients-4.6.0-202006250705.p0-6-gfdc10d05c goVersion: go1.14.4 major: "" minor: "" platform: linux/amd64 releaseClientVersion: 4.6.0-0.nightly-2020-07-06-033705 oc installed from yum repo [root@dhcp-140-138 ~]# oc version --client -o yaml clientVersion: buildDate: "2020-07-05T15:05:22Z" compiler: gc gitCommit: fdc10d05ca16e71b8b1ae8b99fc4e257600787c5 gitTreeState: clean gitVersion: 4.6.0-202007051425.p0-fdc10d0 goVersion: go1.13.4 major: "" minor: "" platform: linux/amd64
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 (OpenShift Container Platform 4.6 GA Images), 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:4196