Skip to content

Simplify version management and update for next release#267

Merged
dbutenhof merged 5 commits intocloud-bulldozer:mainfrom
dbutenhof:nver
Aug 21, 2025
Merged

Simplify version management and update for next release#267
dbutenhof merged 5 commits intocloud-bulldozer:mainfrom
dbutenhof:nver

Conversation

@dbutenhof
Copy link
Copy Markdown
Collaborator

Type of change

  • Refactor
  • New feature
  • Bug fix
  • Optimization
  • Documentation Update

Description

As a general principle, it makes sense to update the internal version number as soon as we've completed a release so that dashboard-dev is clearly distinguished from dashboard. So having released v0.2.1, I'm updating the version to v0.2.2.

When I created the version.py build script, I'd envisioned reading the version directly from the pyproject.toml file, but for "simplicity" (of implementation) I ended up creating a separate VERSION file with the base version string. While easy to write, this is harder to manage over time.

Python 3.11 includes a built-in tomllib package, but as we're still depending on 3.9 I experimented with several alternatives -- toml can't parse our pyproject.toml and was difficult to debug; but tomlkit is recommended by Python documentation (for pre-3.11 and for writing toml files), and that works.

So we now have [project] version = "v0.2.2" as our only source of version truth in the repo, and the version.py script is now able to read that and generate our live version information from that.

Related Tickets & Documents

PANDA-1014 version update

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.

Testing

Local unit tests, frontend & backend functional tests, plus black, isort and flake8 checks.

@dbutenhof dbutenhof self-assigned this Aug 21, 2025
As a general principle, it makes sense to update the internal version number as soon as we've completed a release so that dashboard-dev is clearly distinguished from dashboard. So having released v0.2.1, I'm updating the version to v0.2.2.

When I created the version.py build script, I'd envisioned reading the version directly from the pyproject.toml file, but for "simplicity" (of implementation) I ended up creating a separate VERSION file with the base version string. While easy to write, this is harder to manage over time.

Python 3.11 includes a built-in tomllib package, but as we're still depending on 3.9 I experimented with several alternatives -- toml can't parse our pyproject.toml and was difficult to debug; but tomlkit is recommended by Python documentation (for pre-3.11 and for writing toml files), and that works.

So we now have [project] version = "v0.2.2" as our only source of version truth in the repo, and the version.py script is now able to read that and generate our live version information from that.
Apparently, `version.py` was (successfully) relying on having all dependencies installed in the current context, whereas they might not be (and `tomlkit` is not).

So run `version.py` inside a `poetry run` command.
MVarshini
MVarshini previously approved these changes Aug 21, 2025
Copy link
Copy Markdown
Collaborator

@MVarshini MVarshini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

I'm now relying on `poetry` earlier in order to generate the version  information outside the target container, and this affects all of the GitHub Action environments that build the backend.

These are harder to test, too, so we'll see ...
@dbutenhof dbutenhof requested a review from MVarshini August 21, 2025 14:39
@dbutenhof
Copy link
Copy Markdown
Collaborator Author

Had some problem setting up the GitHub runner for poetry, which I now need in any action that builds. I only hope I didn't mess up the push actions that build "real" containers for quay.io; since I can't really test those until I merge to main and then (eventually) cut a release.

@dbutenhof dbutenhof merged commit 73d8fc2 into cloud-bulldozer:main Aug 21, 2025
10 checks passed
@dbutenhof dbutenhof deleted the nver branch August 21, 2025 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants