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.
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.
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 ?
@fdupont that would work. As long as that env var is exported in the shell running webpack, I should be able to use it.
This should be addressed by https://code.engineering.redhat.com/gerrit/#/c/231289/
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?
@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?
Opened a GH issue: https://github.com/konveyor/forklift-ui/issues/470
@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?
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.
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?
@vconzola Mockups look good. @fdupont I agree we could add the 5 env vars in the modal as long as Vince also agrees.
Updated the mockups to include all five environment variable commit hashes. https://docs.google.com/presentation/d/1eSywOXFByvQ2dtKDl-4QyaVv8OxY7xyHgQ6ZeIB3DwQ/edit?usp=sharing
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?
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.
This fix should be part of build v2.0.0-14, iib:64369.
Created attachment 1774630 [details] screenshot of About modal
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?
Removing needinfo since we discussed offline. PR#555 should fix this by referencing these vars at run time instead of build time.
The fix should be part of build mtv-operator-bundle-container-2.0.0-4 / iib:72115.
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.
Fabien, Thanks for the clarification.
Verified on 2.0.0-12.
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