Description of problem: oc and openshift-intall version show dirty no matter the RC.x clients or extracted from payload Version-Release number of selected component (if applicable): rc.7 4.1.0-0.nightly-2019-05-24-040103 How reproducible: Always Steps to Reproduce: 1. Download oc and openshift-intall from https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.1.0-rc.7/, run `./oc version` and `./openshift-intall version` 2. Extract them from payload by oc adm release extract --command=oc/openshift-install ...payload..., run `./oc version` and `./openshift-intall version` Actual results: Show "dirty": ./oc version Client Version: version.Info{Major:"4", Minor:"1+", GitVersion:"v4.1.0-201905191700+7bd2e5b-dirty", GitCommit:"7bd2e5b", GitTreeState:"dirty", BuildDate:"2019-05-19T23:52:43Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"} $ ./openshift-install version ./openshift-install v4.1.0-201905212232-dirty built from commit 71d8978039726046929729ad15302973e3da18ce release image registry.svc.ci.openshift.org/ocp/release@sha256:28217ed180a85572ddeb8a6ea0dba18d25432e1a566960314380daa225e1519b Expected results: As clients to customer, should not show "dirty" Additional info:
oc from repo http://download-node-02.eng.bos.redhat.com/rcm-guest/puddles/RHAOS/AtomicOpenShift/4.1/latest/x86_64/os/Packages/openshift-clients-4.1.0-201905191700.git.0.cb455d6.el7.x86_64.rpm doesn't have dirty oc version --client Client Version: version.Info{Major:"4", Minor:"1+", GitVersion:"v4.1.0", GitCommit:"cb455d664", GitTreeState:"clean", BuildDate:"2019-05-19T21:13:58Z", GoVersion:"go1.11.5", Compiler:"gc", Platform:"linux/amd64"}
Installer PR landed, which means future 4.2 installer builds will no longer contain "dirty". I'm moving this over to 'oc' so they can address their side of this (likely through version injection when extracting tools from the release image). Then we'll hop on and use the same code to get extraction-time version injection in the installer.
(In reply to W. Trevor King from comment #5) > Installer PR landed, which means future 4.2 installer builds will no longer > contain "dirty". I'm moving this over to 'oc' so they can address their > side of this (likely through version injection when extracting tools from > the release image). Then we'll hop on and use the same code to get > extraction-time version injection in the installer. If half of this is fixed we should someone denote this! We either need to mark this for 4.2 (what I am doing) and fix both parts (preferred) or isolate this bug to the 'openshift-installer' parts and create an 'oc' bug to track when 'oc' will fix this.
I am agnostic on "fix both" vs. "split bugs"; the oc folks can take whichever path they like.
The issue for oc is also fixed in 4.2.0-0.nightly-2019-09-05-234433. Could move to VERIFIED once ON_QA oc adm release extract --command=oc registry.svc.ci.openshift.org/ocp/release:4.2.0-0.nightly-2019-09-05-234433 ./oc version --client Client Version: version.Info{Major:"", Minor:"", GitVersion:"openshift-clients-4.2.0-201909020729", GitCommit:"9ff96feb1aea1217938e2f1aeaf0be091cc59728", GitTreeState:"clean", BuildDate:"2019-09-02T15:22:22Z", GoVersion:"go1.12.8", Compiler:"gc", Platform:"linux/amd64"}
> Could move to VERIFIED once ON_QA Do we need to track down the oc commit that fixed this? If not, we could just move this back to MODIFIED and the ART sweeper will pull it into ON_QA the next time it runs.
Not sure which oc or ART release repo commit does it
The oc version just go an upgrade to how it prints version, current output is: $ oc version Client Version: v4.2.0-alpha.0-58-g71775b7 Server Version: 4.2.0-0.ci-2019-09-05-164031 Kubernetes Version: v1.14.0+56982c1 which is oc from latest payload. It's clean and simple, dirty I'm assuming is coming from ART and we should not quite worry about it. We will work with art to figure this out in the next release, for now I'm lowering the priority and pushing this to 4.3.
wrt reporting payload version rather than built version when extracting tools with 'oc adm release extract --tools', this PR is open: https://github.com/openshift/oc/pull/88
Confirmed with latest version, the issue has fixed: oc from yum repo: [root@dhcp-140-138 ~]# oc version -o yaml clientVersion: buildDate: "2019-10-24T01:16:52Z" compiler: gc gitCommit: 8bf0a6cf35883df6e739e4b5e36c2d185e88d46e gitTreeState: clean gitVersion: v4.3.0 goVersion: go1.12.8 major: "" minor: "" platform: linux/amd64 openshiftVersion: 4.3.0-0.nightly-2019-10-23-150053 oc extracted from payload: [root@dhcp-140-138 ~]# ./oc version -o yaml clientVersion: buildDate: "2019-10-18T17:47:34Z" compiler: gc gitCommit: 3780d2dee116713bde709485b22ec6eed2c242ce gitTreeState: clean gitVersion: openshift-clients-4.3.0-201910181317 goVersion: go1.12.8 major: "" minor: "" platform: linux/amd64 openshiftVersion: 4.3.0-0.nightly-2019-10-23-150053 releaseClientVersion: 4.3.0-0.nightly-2019-10-23-150053
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:0062