Feature #10659
closedShow Klever version in Bridge
0%
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.
Updated by Ilya Shchepetkov almost 4 years ago
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.
Updated by Evgeny Novikov almost 4 years ago
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.
Updated by Evgeny Novikov almost 4 years ago
- Assignee set to Ilya Shchepetkov
- Target version set to 3.1
This is quite useful thing to have.
Updated by Ilya Shchepetkov almost 4 years ago
- 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.
Updated by Ilya Shchepetkov almost 4 years ago
- Related to Feature #10637: Do not update Klever and restart services when it does not necessary added
Updated by Evgeny Novikov almost 4 years ago
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.
Updated by Ilya Shchepetkov almost 4 years ago
- 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.
Updated by Evgeny Novikov almost 4 years ago
- Status changed from Resolved to Open
Indeed, Vladimir should visualize this version in Bridge now.
Updated by Vladimir Gratinskiy almost 4 years ago
Bridge now shows the version on every page (in the title) in branch "feature-10659".
Updated by Evgeny Novikov almost 4 years ago
- 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.
Updated by Evgeny Novikov almost 4 years ago
- Status changed from Resolved to Open
This does not work for non-editable deployments.
Updated by Ilya Shchepetkov almost 4 years ago
- 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.
Updated by Evgeny Novikov almost 4 years ago
- Status changed from Resolved to Closed
Looks great! I merged the branch to master in 6e80c6731.