Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1873004

Summary: [downstream] Should indicate the version info instead of the commit info
Product: OpenShift Container Platform Reporter: Jian Zhang <jiazha>
Component: Operator SDKAssignee: Jesus M. Rodriguez <jesusr>
Status: CLOSED ERRATA QA Contact: Jian Zhang <jiazha>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.6CC: aos-bugs, jlanford
Target Milestone: ---Keywords: Reopened
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-08 13:50:49 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:

Description Jian Zhang 2020-08-27 06:20:37 UTC
Description of problem:
Should indicate the version info as the upstream did. 0.19.0 1.0.0, etc.

mac:bin jianzhang$ operator-sdk  version
operator-sdk version: "550e9947", commit: "550e9947d23e122f36f6159167b2e670b2430a05", kubernetes version: "v1.18.2", go version: "go1.14.3 darwin/amd64"


Version-Release number of selected component (if applicable):
Downsream repo: https://github.com/openshift/ocp-release-operator-sdk
The master branch

How reproducible:
always

Steps to Reproduce:

1. Clone the downstream repo.
mac:openshift jianzhang$ git clone git:openshift/ocp-release-operator-sdk.git

2. Compile the operator-sdk binary.
mac:ocp-release-operator-sdk jianzhang$ make tidy
...

3. Check the version.
mac:ocp-release-operator-sdk jianzhang$ make install
mac:bin jianzhang$ ls -l /usr/local/Cellar/go/1.14.3/libexec/bin/operator-sdk
-rwxr-xr-x  1 jianzhang  staff  73616640 Aug 27 14:10 /usr/local/Cellar/go/1.14.3/libexec/bin/operator-sdk


Actual results:
The version info is the same as the commit info. The user doesn't its exact veersion.
mac:bin jianzhang$ operator-sdk  version
operator-sdk version: "550e9947", commit: "550e9947d23e122f36f6159167b2e670b2430a05", kubernetes version: "v1.18.2", go version: "go1.14.3 darwin/amd64"

Expected results:
Display the version info as the upstream did. For example, v1.0.0-37-xxx

[root@preserve-olm-env data]# operator-sdk version
operator-sdk version: "v1.0.0-37-g01df5b3", commit: "01df5b3ba66cb6fe3ba0feb21367f87653ef5716", kubernetes version: "v1.18.2", go version: "go1.14 linux/amd64", GOOS: "linux", GOARCH: "amd64"

Additional info:
The same issue for the release-4.6 branch.

Comment 1 Joe Lanford 2020-08-27 13:06:19 UTC
The operator-sdk binary is (currently) only built and released upstream. The openshift/ocp-release-operator-sdk repo is (currently) only being used to produced the ansible and helm operator base images, which should be being tagged based on the openshift release version.

Building and releasing the operator-sdk binary downstream is on our roadmap, so I think I would currently classify this behavior as "working as intended"

Comment 4 Jian Zhang 2020-08-31 08:01:13 UTC
Hi Joe,

Thank you very much! I'm clear now. Verify it.

Comment 7 errata-xmlrpc 2021-02-08 13:50:49 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 (Important: OpenShift Container Platform 4.6.16 security and bug fix update), 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/RHSA-2021:0308