Feature #10659
closed
Show Klever version in Bridge
Added by Evgeny Novikov almost 4 years ago.
Updated over 3 years ago.
Description
At the moment users cannot find out a version of deployed Klever through GUI easily. It would be great if Bridge will show it, e.g. in the window title where it already shows "Klever". Most likely deployment scripts can generate a special file with Klever version for Bridge so that it will be able to find it out very easy and quickly.
Related issues
1 (1 open — 0 closed)
I think Bridge can get Klever version the same way it is implemented in Clade, by using pkg_resources
package. See get_clade_version()
function for example: utils.py#L79.
I guess that will be very non-optimal due to Bridge will perform this operation on every page since it does not aware when a Klever version changes. For implementing rarely used "--version" it is pretty well.
- Assignee set to Ilya Shchepetkov
- Target version set to 3.1
This is quite useful thing to have.
- Status changed from New to Open
I've implemented storing Klever version in the feature-10637
branch. Version is stored in the "version" file inside KLEVER_DEPLOYMENT_DIRECTORY folder:
debian@shchepetkov-klever-test:~$ tree -L 1 klever-inst/
klever-inst/
├── build bases/
├── klever-addons/
├── klever-conf/
├── klever-media/
├── klever-work/
├── klever.json
└── version
However, due to the usage of setuptools_scm in setup.py the same version of Klever is reported slightly differently during OpenStack and local deployments.
OpenStack:
debian@shchepetkov-klever-test:~$ cat klever-inst/version
3.1.dev4+gce17c3fd8
local:
~/w/git/klever feature-10637 ❯ cat ~/work/run/klever/version
v3.0-4-gce17c3fd8
I'm not yet sure how to make them look the same.
- Related to Feature #10637: Do not update Klever and restart services when it does not necessary added
Why not use the same setuptools_scm to obtain the same version? Besides, you suggested to use the pkg_resources package. It is pretty well to use it once during installation or update. Later Bridge will retrieve the version from file very fast.
- Status changed from Open to Resolved
I have switched from using pkg_resources
to setuptools_scm
, and now Klever version is reported the same during both local and open stack deployments.
- Status changed from Resolved to Open
Indeed, Vladimir should visualize this version in Bridge now.
Bridge now shows the version on every page (in the title) in branch "feature-10659".
- Status changed from Open to Resolved
Ilya finished the implementation. After all the proper version is shown, but it may be not too easy to find and to copy it.
- Status changed from Resolved to Open
This does not work for non-editable deployments.
- Status changed from Open to Resolved
Switched back to pkg_resources
, with slight modifications. Now version is displayed correctly for editable and non-editable deployments, locally and in OpenStack.
- Status changed from Resolved to Closed
Looks great! I merged the branch to master in 6e80c6731.
Also available in: Atom
PDF