Project

General

Profile

Feature #10659

Show Klever version in Bridge

Added by Evgeny Novikov 3 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
High
Category:
-
Target version:
Start date:
01/12/2021
Due date:
% Done:

0%

Estimated time:
Published in build:

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

Related to Klever - Feature #10637: Do not update Klever and restart services when it does not necessaryNewIlya Shchepetkov12/22/2020

Actions
#1

Updated by Ilya Shchepetkov 3 months 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.

#2

Updated by Evgeny Novikov 3 months 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.

#3

Updated by Evgeny Novikov 3 months ago

  • Target version set to 3.1
  • Assignee set to Ilya Shchepetkov

This is quite useful thing to have.

#4

Updated by Ilya Shchepetkov 3 months 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.

#5

Updated by Ilya Shchepetkov 3 months ago

  • Related to Feature #10637: Do not update Klever and restart services when it does not necessary added
#6

Updated by Evgeny Novikov 3 months 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.

#7

Updated by Ilya Shchepetkov about 2 months 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.

#8

Updated by Evgeny Novikov about 2 months ago

  • Status changed from Resolved to Open

Indeed, Vladimir should visualize this version in Bridge now.

#9

Updated by Vladimir Gratinskiy about 2 months ago

Bridge now shows the version on every page (in the title) in branch "feature-10659".

#10

Updated by Evgeny Novikov about 2 months 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.

#11

Updated by Evgeny Novikov about 2 months ago

  • Status changed from Resolved to Open

This does not work for non-editable deployments.

#12

Updated by Ilya Shchepetkov about 2 months 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.

#13

Updated by Evgeny Novikov about 2 months ago

  • Status changed from Resolved to Closed

Looks great! I merged the branch to master in 6e80c6731.

Also available in: Atom PDF