Bug 1715001 - oc and openshift-intall version show "dirty" no matter the rc.x clients or extracted from payload
Summary: oc and openshift-intall version show "dirty" no matter the rc.x clients or ex...
Keywords:
Status: ASSIGNED
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: 4.3.0
Assignee: Sally
QA Contact: zhou ying
URL:
Whiteboard:
Depends On:
Blocks: 1728714
TreeView+ depends on / blocked
 
Reported: 2019-05-29 11:04 UTC by Xingxing Xia
Modified: 2019-09-10 14:03 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Github openshift installer pull 1829 None None None 2019-08-09 20:07:54 UTC

Internal Links: 1728714

Description Xingxing Xia 2019-05-29 11:04:34 UTC
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:

Comment 1 Xingxing Xia 2019-05-29 13:11:06 UTC
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"}

Comment 5 W. Trevor King 2019-08-29 04:26:18 UTC
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.

Comment 6 Eric Rich 2019-09-05 20:21:16 UTC
(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.

Comment 7 W. Trevor King 2019-09-05 21:54:50 UTC
I am agnostic on "fix both" vs. "split bugs"; the oc folks can take whichever path they like.

Comment 8 Xingxing Xia 2019-09-06 02:26:53 UTC
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"}

Comment 9 W. Trevor King 2019-09-06 03:53:57 UTC
> 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.

Comment 10 Xingxing Xia 2019-09-06 04:57:38 UTC
Not sure which oc or ART release repo commit does it

Comment 11 Maciej Szulik 2019-09-06 08:24:39 UTC
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.

Comment 12 Sally 2019-09-10 14:03:24 UTC
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


Note You need to log in before you can comment on or make changes to this bug.