Bug 1908745 - Add ability to get MTV version from the web console
Summary: Add ability to get MTV version from the web console
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Migration Toolkit for Virtualization
Classification: Red Hat
Component: General
Version: 2.0.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 2.0.0
Assignee: Mike Turley
QA Contact: Nandini Chandra
Avital Pinnick
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-12-17 13:44 UTC by Md Nadeem
Modified: 2021-06-10 17:11 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-06-10 17:11:27 UTC
Target Upstream Version:
Embargoed:
vconzola: needinfo-


Attachments (Terms of Use)
screenshot of About modal (201.70 KB, image/png)
2021-04-22 22:52 UTC, Nandini Chandra
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github konveyor forklift-ui pull 484 0 None open Bug 1908745: Add Help dropdown with About modal and documentation link 2021-03-26 19:55:33 UTC
Github konveyor forklift-ui pull 503 0 None open Bug 1908745: Add cluster and operator versions to the About modal 2021-04-05 17:31:49 UTC
Github konveyor forklift-ui pull 555 0 None open Bug 1908745: Capture environment variables for version numbers at run time instead of build time 2021-04-26 17:56:54 UTC
Red Hat Product Errata RHEA-2021:2381 0 None None None 2021-06-10 17:11:37 UTC

Description Md Nadeem 2020-12-17 13:44:58 UTC
Description of problem:

It would be great if we can get the MTV version+build version directly from MTV UI. 

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

It would be easy for us to file any Bugzilla with build version and It would be easy for Dev Team to know for which build the issue has raised.

Comment 1 Mike Turley 2020-12-17 14:24:13 UTC
For the dev team, it might be nice to have the specific git commit sha1 hash so we can easily jump to the relevant version in the git log. Maybe redundant, but it would be pretty simple to have a `git rev-parse --short HEAD` run at build time and be injected into the UI somewhere.

Comment 2 Fabien Dupont 2021-03-10 15:19:26 UTC
AFAIK, the build number is not provided to to the builder, so we cannot inject it in the container images. Do you have it for other products?

Regarding the Git commit, we have it, so we could inject it. We could pass it as an environment variable. @mturley what name would you want: GIT_COMMIT ?

Comment 3 Mike Turley 2021-03-10 15:45:57 UTC
@fdupont that would work. As long as that env var is exported in the shell running webpack, I should be able to use it.

Comment 4 Fabien Dupont 2021-03-17 15:31:25 UTC
This should be addressed by https://code.engineering.redhat.com/gerrit/#/c/231289/

Comment 5 Mike Turley 2021-03-17 16:46:06 UTC
Thanks Fabien. I don't have access to that Gerrit URL, but I'll take your word for it :)

Now the question is ,@vconzola , where should we display the version? Should we add an About modal to the UI?

Comment 6 vconzola 2021-03-19 15:16:00 UTC
@mturley Yes, version and build numbers can be displayed in an About modal. I'll create a mockup. @fdupont Is this something we want to try to squeeze in for GA?

Comment 7 Mike Turley 2021-03-22 19:17:00 UTC
Opened a GH issue: https://github.com/konveyor/forklift-ui/issues/470

Comment 8 vconzola 2021-03-23 20:15:05 UTC
@fdupont @mnadeem @miguel Here are a couple mockups for showing the MTV version in an About modal (slides 4 and 5). https://docs.google.com/presentation/d/1eSywOXFByvQ2dtKDl-4QyaVv8OxY7xyHgQ6ZeIB3DwQ/edit?usp=sharing. I also added the OpenShift version. Not sure if that’s wanted or needed. As long as we’re adding the modal, is there other information that's available and would be useful to include?

Comment 9 Fabien Dupont 2021-03-25 16:09:48 UTC
In the mockup, there's only one Git commit hash, but we have one commit hash per component.
The environment variables passed to the UI pod are:

- FORKLIFT_CONTROLLER_GIT_COMMIT
- FORKLIFT_MUST_GATHER_GIT_COMMIT
- FORKLIFT_OPERATOR_GIT_COMMIT
- FORKLIFT_UI_GIT_COMMIT
- FORKLIFT_VALIDATION_GIT_COMMIT

Given the size of the modal, they should all fit.

I think that adding the OpenShift version is a good idea. MTV is not integrated in the OpenShift console, so it's a good way to find it without having to look into another tab/window.

Comment 10 Mike Turley 2021-03-25 17:39:01 UTC
Sounds good. I can get this in for GA with the git commits. @Fabien do you know how I can get the OpenShift version from the environment?

Comment 11 Miguel Perez Colino 2021-03-26 12:40:03 UTC
@vconzola Mockups look good.
@fdupont I agree we could add the 5 env vars in the modal as long as Vince also agrees.

Comment 12 vconzola 2021-03-26 13:54:48 UTC
Updated the mockups to include all five environment variable commit hashes.  https://docs.google.com/presentation/d/1eSywOXFByvQ2dtKDl-4QyaVv8OxY7xyHgQ6ZeIB3DwQ/edit?usp=sharing

Comment 13 Mike Turley 2021-03-26 21:03:16 UTC
Moving this back to ASSIGNED for now since we still need to add the OpenShift version. @fdupont do you know how I can get that version at build time?

Comment 14 Fabien Dupont 2021-04-02 06:21:36 UTC
The version would be provided at runtime by the operator. It's an Ansible playbook that deploys the UI pod, so it can retrieve the version of the cluster it runs on and feed it to the UI pod as an environment variable when it spawns it.

Comment 15 Fabien Dupont 2021-04-08 11:54:12 UTC
This fix should be part of build v2.0.0-14, iib:64369.

Comment 17 Nandini Chandra 2021-04-22 22:52:42 UTC
Created attachment 1774630 [details]
screenshot of About modal

Comment 18 Mike Turley 2021-04-22 23:43:07 UTC
This must mean the FORKLIFT_OPERATOR_VERSION and FORKLIFT_CLUSTER_VERSION environment variables are not being passed to the UI at build time. @fdupont can you verify?

Comment 19 Mike Turley 2021-04-26 18:31:40 UTC
Removing needinfo since we discussed offline. PR#555 should fix this by referencing these vars at run time instead of build time.

Comment 20 Fabien Dupont 2021-05-03 12:09:50 UTC
The fix should be part of build mtv-operator-bundle-container-2.0.0-4 / iib:72115.

Comment 22 Fabien Dupont 2021-05-10 09:33:25 UTC
When we say build 2.0.0-20, it refers to the mtv-operator-bundle build NVR, which is not available at build time and is not stored in the container image.
At run time, the operator only knows the SHA-256 that is part of the CSV and cannot link it to the build version.

So, the commit id is the most precise information we have. And that should be enough to identify the build from our build records.

Comment 23 Nandini Chandra 2021-05-11 05:00:31 UTC
Fabien, 

Thanks for the clarification.

Comment 24 Nandini Chandra 2021-05-11 05:01:29 UTC
Verified on 2.0.0-12.

Comment 27 errata-xmlrpc 2021-06-10 17:11:27 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 (MTV 2.0.0 images), 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/RHEA-2021:2381


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