Project

General

Profile

Actions

Feature #10659

closed

Show Klever version in Bridge

Added by Evgeny Novikov almost 4 years ago. Updated almost 4 years 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 1 (1 open0 closed)

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

Actions
Actions #1

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.

Actions #2

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.

Actions #3

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.

Actions #4

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.

Actions #5

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
Actions #6

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.

Actions #7

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.

Actions #8

Updated by Evgeny Novikov almost 4 years ago

  • Status changed from Resolved to Open

Indeed, Vladimir should visualize this version in Bridge now.

Actions #9

Updated by Vladimir Gratinskiy almost 4 years ago

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

Actions #10

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.

Actions #11

Updated by Evgeny Novikov almost 4 years ago

  • Status changed from Resolved to Open

This does not work for non-editable deployments.

Actions #12

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.

Actions #13

Updated by Evgeny Novikov almost 4 years ago

  • Status changed from Resolved to Closed

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

Actions

Also available in: Atom PDF