Skip to content

Add support for uv based charm builds#406

Open
wilkmar wants to merge 1 commit into
canonical:mainfrom
wilkmar:add_uv_support_for_build
Open

Add support for uv based charm builds#406
wilkmar wants to merge 1 commit into
canonical:mainfrom
wilkmar:add_uv_support_for_build

Conversation

@wilkmar

@wilkmar wilkmar commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Zaza functional tests require Python 3.10, while some charm branches
require Python 3.12 to build. This means functional tests must run on
Jammy (Python 3.10), but the func runner would fail to build charms
that require Python 3.12.

To work around this, add support for building charms with uv, which
allows running the 'build' tox target with an arbitrary Python version.
The required Python version is detected from the charm repo's tox.ini
using 'tox --showconfig -e build', falling back to 3.12 on failure.

uv-based builds are currently not supported with '--remote-build'

@wilkmar wilkmar requested review from arif-ali and pponnuvel June 18, 2026 08:58

@pponnuvel pponnuvel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good

@brianphaley brianphaley left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm, but i'll let others comment

@raineszm raineszm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for this. I've definitely run into issues with python version incompatibility when trying to use the functest runner script.

Comment thread openstack/tools/charmed_openstack_functest_runner.sh Outdated
Comment thread openstack/tools/charmed_openstack_functest_runner.sh Outdated
@wilkmar wilkmar force-pushed the add_uv_support_for_build branch from 5861136 to 01da2b4 Compare June 19, 2026 08:26
Zaza functional tests require Python 3.10, while some charm branches
require Python 3.12 to build. This means functional tests must run on
Jammy (Python 3.10), but the func runner would fail to build charms
that require Python 3.12.

To work around this, add support for building charms with uv, which
allows running the 'build' tox target with an arbitrary Python version.
The required Python version is detected from the charm repo's tox.ini
using 'tox --showconfig -e build', falling back to 3.12 on failure.

uv-based builds are currently not supported with '--remote-build'

Signed-off-by: Marcin Wilk <marcin.wilk@canonical.com>
@wilkmar wilkmar force-pushed the add_uv_support_for_build branch from 01da2b4 to 14cc4d8 Compare June 19, 2026 08:31
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