Bug 1798315 - gitCommit and gitVersion is invalid for openshift-console-operator
Summary: gitCommit and gitVersion is invalid for openshift-console-operator
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.4.0
Assignee: bpeterse
QA Contact: Junqi Zhao
URL:
Whiteboard:
: 1791003 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-02-05 05:54 UTC by Junqi Zhao
Modified: 2020-05-04 11:34 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1798305
Environment:
Last Closed: 2020-05-04 11:33:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console-operator pull 377 0 None closed Bug 1798315: Console operator should provide valid gitCommit and gitVersion versions 2020-03-25 14:28:17 UTC
Github openshift console-operator pull 378 0 None closed Bug 1798315: Bump deps 2020-03-25 14:28:18 UTC
Github openshift console-operator pull 380 0 None closed Bug 1798315: Bump deps 2020-03-25 14:28:20 UTC
Red Hat Product Errata RHBA-2020:0581 0 None None None 2020-05-04 11:34:25 UTC

Description Junqi Zhao 2020-02-05 05:54:00 UTC
+++ This bug was initially created as a clone of Bug #1798305 +++

Description of problem:
search in Prometheus
count(kubernetes_build_info{job!~"kube-dns|coredns",gitVersion="v0.0.0-master+$Format:%h$"}) by (gitCommit, gitVersion,namespace)

result is
Element 	Value
{gitCommit="$Format:%H$",gitVersion="v0.0.0-master+$Format:%h$",namespace="openshift-service-catalog-apiserver-operator"}	1
{gitCommit="$Format:%H$",gitVersion="v0.0.0-master+$Format:%h$",namespace="openshift-console-operator"}	1
{gitCommit="$Format:%H$",gitVersion="v0.0.0-master+$Format:%h$",namespace="openshift-service-catalog-controller-manager-operator"}	1

Please fix the issue for your component

Version-Release number of selected component (if applicable):
4.4.0-0.nightly-2020-02-04-171905

How reproducible:
Always

Steps to Reproduce:
1. See the description
2.
3.

Actual results:
gitCommit and gitVersion is invalid

Expected results:
gitCommit and gitVersion should get the correct version

Additional info:

Comment 2 bpeterse 2020-02-07 03:55:25 UTC
*** Bug 1791003 has been marked as a duplicate of this bug. ***

Comment 3 Yadan Pei 2020-02-07 09:03:32 UTC
$ oc adm release info registry.svc.ci.openshift.org/ocp/release:4.4.0-0.nightly-2020-02-07-001901 --pullspecs | grep console
  console                                        quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:744f6c645fbb455b7f10ad209f49e8a77251f48f9b3dcec34ba01ccf66ad07f2
  console-operator                               quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:aa3942a361374b3addfd29ff58b450403271af0eb266664bee7913b052214a91


$ oc image info quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:aa3942a361374b3addfd29ff58b450403271af0eb266664bee7913b052214a91 | grep -i commit
Environment: SOURCE_GIT_COMMIT=59dd82da10e641899cd0c1038e641d3dc16d8c06
             io.openshift.build.commit.id=59dd82da10e641899cd0c1038e641d3dc16d8c06
             io.openshift.build.commit.url=https://github.com/openshift/console-operator/commit/59dd82da10e641899cd0c1038e641d3dc16d8c06

[yapei@New_Mac console-operator]$ git log 59dd82da10e641899cd0c1038e641d3dc16d8c06 | grep '#377'
    Merge pull request #377 from jhadvig/bz1798315

When search in prometheus
count(kubernetes_build_info{job!~"kube-dns|coredns",gitVersion="v0.0.0-master+$Format:%h$"}) by (gitCommit, gitVersion,namespace)

It still returns 
{gitCommit="$Format:%H$",gitVersion="v0.0.0-master+$Format:%h$",namespace="openshift-console-operator"}	1
{gitCommit="$Format:%H$",gitVersion="v0.0.0-master+$Format:%h$",namespace="openshift-service-catalog-controller-manager-operator"}	1
{gitCommit="$Format:%H$",gitVersion="v0.0.0-master+$Format:%h$",namespace="openshift-service-catalog-apiserver-operator"}	1


This is checked against 4.4.0-0.nightly-2020-02-07-001901

Comment 11 Jakub Hadvig 2020-02-24 16:34:22 UTC
We expose `openshift_console_operator_build_info` metrics for the console-operator.
Tried to query `openshift_console_operator_build_info{namespace="openshift-console-operator"}"` but without any result.

Also tried to query the authentication operator with:
`openshift_cluster_authentication_operator_build_info{namespace="openshift-authentication-operator"}`
but without any result, which comes to question if you are using a valid query?

Comment 12 Junqi Zhao 2020-02-25 02:58:24 UTC
(In reply to Jakub Hadvig from comment #11)
> We expose `openshift_console_operator_build_info` metrics for the
> console-operator.
> Tried to query
> `openshift_console_operator_build_info{namespace="openshift-console-
> operator"}"` but without any result.
> 
> Also tried to query the authentication operator with:
> `openshift_cluster_authentication_operator_build_info{namespace="openshift-
> authentication-operator"}`
> but without any result, which comes to question if you are using a valid
> query?

we don't need to check with "kubernetes_build_info{namespace="openshift-console-operator"}" now,
according to the comment,`openshift_console_operator_build_info` metrics should be exposed for console-operator, 
but it is not, tracked in Bug 1806787

Comment 14 errata-xmlrpc 2020-05-04 11:33:43 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, 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:0581


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