Skip to content

Conversation

@kanterov
Copy link
Collaborator

@kanterov kanterov commented Apr 8, 2025

Changes

Update the databricks-bundles package version during the CLI release process.

Flit normally supports reading the version.py file directly, but in our setup, it doesn't work. We have a parent databricks package with a shared __init__.py. Flit expects the version.py to be placed directly alongside the parent package, which would set the version for any Databricks package.

version property in .codegen.json is handled through replacement. Any additional content in the file remains intact. Therefore, this method works for updating the pyproject.toml without the need to inline the entire content.

Why

We want to keep the CLI version in sync with the Python code.

Tests

I've tested manually by commenting out parts of tagging.py

@kanterov kanterov temporarily deployed to test-trigger-is April 8, 2025 09:16 — with GitHub Actions Inactive
@kanterov kanterov temporarily deployed to test-trigger-is April 8, 2025 09:24 — with GitHub Actions Inactive
@kanterov kanterov temporarily deployed to test-trigger-is April 8, 2025 09:27 — with GitHub Actions Inactive
@kanterov kanterov temporarily deployed to test-trigger-is April 8, 2025 11:07 — with GitHub Actions Inactive
@kanterov kanterov marked this pull request as ready for review April 8, 2025 11:40
Copy link
Contributor

@pietern pietern left a comment

Choose a reason for hiding this comment

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

This LGTM, but I'm not familiar with the "version" stanza.

It also loses the ability to disambiguate dev versions from the released one. Any way we could address that and retain a +dev suffix, or some other indicator that a built wheel is a development copy?

@andrewnester Can you TAL as well?

@kanterov
Copy link
Collaborator Author

kanterov commented Apr 8, 2025

Databricks SDK for Python doesn't use +dev suffix. There is no support for that in genkit. We can write an extended build backend based on flit, but I doesn't seem to be a good idea. One option is to change the version string in pyproject.toml straight after we release. We can even make it a part of release workflow

@kanterov kanterov temporarily deployed to test-trigger-is April 15, 2025 13:24 — with GitHub Actions Inactive
@kanterov kanterov enabled auto-merge April 15, 2025 13:27
@kanterov kanterov added this pull request to the merge queue Apr 15, 2025
Merged via the queue into main with commit 9bc236f Apr 15, 2025
9 checks passed
@kanterov kanterov deleted the experimental-python-versioning branch April 15, 2025 13:58
github-merge-queue bot pushed a commit that referenced this pull request Apr 15, 2025
## Changes
Add release workflow to publish `databricks-bundles` PyPi package

Should be merged after #2676

## Why
It publishes PyPi package that is co-versioned with CLI
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.

4 participants