-
Bug
-
Resolution: Unresolved
-
Normal
-
4.15.0, 4.16.0, 4.17.0, 4.18.0, 4.19.0
-
Quality / Stability / Reliability
-
False
-
-
None
-
Moderate
-
No
-
None
-
None
-
Rejected
-
Horsea OLM Sprint 268, Ivysaur OLM Sprint 269
-
2
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Description of problem:
For the user, it's important to know which version is used. But from the current version output, I couldn't identify the exact code version I used. The version info does not represent the source code, but the image.
MacBook-Pro:~ jianzhang$ oc project
Using project "openshift-catalogd" on server "https://api.qe-daily-415-1108.qe.devcluster.openshift.com:6443".
MacBook-Pro:~ jianzhang$ oc get pods
NAME READY STATUS RESTARTS AGE
catalogd-controller-manager-68598bcc99-c8sgc 2/2 Running 0 5h45m
MacBook-Pro:~ jianzhang$ oc exec catalogd-controller-manager-68598bcc99-c8sgc -- ./manager --version
version.Info{Major:"4", Minor:"15", GitVersion:"v4.15.0-202311032149.p0.gd9fa05d.assembly.stream-dirty", GitCommit:"3a3c6da7f4d2873536fcf29db1b7fcf386718488", GitTreeState:"dirty", BuildDate:"2023-11-03T21:56:36Z", GoVersion:"go1.20.10 X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}
Version-Release number of selected component (if applicable):
4.15.0-0.nightly-2023-11-07-091937
How reproducible:
always
Steps to Reproduce:
1. Install OCP 4.15
2. Enable TP
$ oc patch featuregate cluster -p '{"spec": {"featureSet": "TechPreviewNoUpgrade"}}' --type=merge
3. Check the catalogd's version.
Actual results:
The version info is incorrect. It doesn't represent the source code.
MacBook-Pro:~ jianzhang$ oc exec catalogd-controller-manager-68598bcc99-c8sgc -- ./manager --version version.Info{Major:"4", Minor:"15", GitVersion:"v4.15.0-202311032149.p0.gd9fa05d.assembly.stream-dirty", GitCommit:"3a3c6da7f4d2873536fcf29db1b7fcf386718488", GitTreeState:"dirty", BuildDate:"2023-11-03T21:56:36Z", GoVersion:"go1.20.10 X:strictfipsruntime", Compiler:"gc", Platform:"linux/amd64"}
Expected results:
The `–version` should output the source code commit ID. Such as "d9fa05d7a2881e7cd93d2f13630dfdcec8f65afd", not the "3a3c6da7f4d2873536fcf29db1b7fcf386718488".
MacBook-Pro:~ jianzhang$ oc adm release info --commits registry.ci.openshift.org/ocp/release:4.15.0-0.nightly-2023-11-07-091937 |grep catalogd olm-catalogd https://github.com/openshift/operator-framework-catalogd d9fa05d7a2881e7cd93d2f13630dfdcec8f65afd
Additional info:
The version info should refer to the "io.openshift.build.commit.id" instead of the "vcs-ref".
[cloud-user@preserve-olm-env2 ~]$ podman inspect quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:a37dea0121d61e63018cf3425fe1bd471a75da327dffed33c435d01b993c154e
[
{
"Id": "b92b4150678c0a60986193d8253126505dca0452c594a9d9050fb11063bcfcf1",
"Digest": "sha256:a37dea0121d61e63018cf3425fe1bd471a75da327dffed33c435d01b993c154e",
"RepoTags": [],
"RepoDigests": [
"quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:a37dea0121d61e63018cf3425fe1bd471a75da327dffed33c435d01b993c154e"
],
...
...
"io.k8s.description": "This is a component of OpenShift Container Platform that provides operator catalog support.",
"io.k8s.display-name": "OpenShift Operator Lifecycle Manager Catalog Controller",
"io.openshift.build.commit.id": "d9fa05d7a2881e7cd93d2f13630dfdcec8f65afd",
"io.openshift.build.commit.url": "https://github.com/openshift/operator-framework-catalogd/commit/d9fa05d7a2881e7cd93d2f13630dfdcec8f65afd",
"io.openshift.build.source-location": "https://github.com/openshift/operator-framework-catalogd",
"io.openshift.expose-services": "",
"io.openshift.maintainer.component": "OLM / Registry",
"io.openshift.maintainer.project": "OCPBUGS",
"io.openshift.tags": "openshift,base",
"maintainer": "Red Hat, Inc.",
"name": "openshift/ose-olm-catalogd-rhel8",
"release": "202311032149.p0.gd9fa05d.assembly.stream",
"summary": "Provides the latest release of the Red Hat Extended Life Base Image.",
"url": "https://access.redhat.com/containers/#/registry.access.redhat.com/openshift/ose-olm-catalogd-rhel8/images/v4.15.0-202311032149.p0.gd9fa05d.assembly.stream",
"vcs-ref": "3a3c6da7f4d2873536fcf29db1b7fcf386718488",
"vcs-type": "git",
"vendor": "Red Hat, Inc.",
"version": "v4.15.0"
- clones
-
OCPBUGS-23055 [OLMv1] the --version of catalogd and operator-controller don't output the right code commit
-
- Closed
-
- is blocked by
-
OCPBUGS-23055 [OLMv1] the --version of catalogd and operator-controller don't output the right code commit
-
- Closed
-