Skip to content

Fix versioning in flask dashboard, fix inconsistent versions for main

This MR fixes the version numbering that show old git tag when the deployment is done from main. The model of getting the version from the "last" tag with a distance does not work now that we have release tags in different release branches.

After this MR, the versions on main branch we will be versioned using 0.0.0 followed by commit hash. E.g.

$ python -m build --wheel
* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
  - poetry-dynamic-versioning
  - poetry_core>=1.0.0
* Getting build dependencies for wheel...
* Building wheel...
Successfully built gwcelery-0.0.0+a5da2dbd-py3-none-any.whl

The Flask dashboard will display this version linking to the commit hash

On release branch where the last commit is tagged, this gives the existing behavior

(release/v2.5)$ python -m build --wheel
* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
  - poetry-dynamic-versioning
  - poetry_core>=1.0.0
* Getting build dependencies for wheel...
* Building wheel...
Successfully built gwcelery-2.5.1-py3-none-any.whl

The link on the flask dashboard will point to the tag.

Finally if the project is installed in editable mode, the version is just 0.0.0, in which case the link on the dashboard will point to the commits on the main branch.

This will prevent incorrect versions shown on dashboard.

Edited by Deep Chatterjee

Merge request reports