Add bits to release zaza as a python package#696
Merged
Conversation
The version of the python package is picked up automatically using setuptools-scm Usage: tox -e build tox -e upload The intention is to start releasing python packages of zaza through Pypi to enable consumers to pin ranges of zaza, e.g. `zaza<2024.2.0` to pull in any caracal compatible version of zaza. Signed-off-by: Felipe Reyes <felipe.reyes@canonical.com>
Signed-off-by: Felipe Reyes <felipe.reyes@canonical.com>
Member
Author
|
ntp is failing when trying to restart chrony |
Member
Author
|
I'm going to drop ntp from the testing bundles. It doesn't make sense to have it when running in a container, and we don't have the resources to switch to using VMs. |
63e2ea1 to
7b4c170
Compare
This will exercise the use of subordinate charms without having to deal with github runner issues when running chronny Signed-off-by: Felipe Reyes <felipe.reyes@canonical.com>
Wrap model.connect_model() in a tenacity.AsyncRetrying loop with up to
5 attempts and a 5-second wait between retries. On exhaustion a
ModelTimeout exception is raised instead of silently failing.
Fixes scenarios where the connection to the controller is unstable, like
resource constrained environments
websockets.exceptions.InvalidMessage: did not receive a valid HTTP response
Unit tests added to cover:
- Successful reconnect on first attempt
- Transient failures with eventual success
- ModelTimeout raised after all retries exhausted
- No reconnect attempted when model is already connected
Co-authored-by: GitHub Copilot <copilot@github.com>
Signed-off-by: Felipe Reyes <felipe.reyes@canonical.com>
Signed-off-by: Felipe Reyes <felipe.reyes@canonical.com>
Member
Author
|
dosaboy
approved these changes
May 7, 2026
dosaboy
left a comment
Contributor
There was a problem hiding this comment.
i think looks good. we'll know if the workflows work for sure when it lands...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces the necessary infrastructure to release zaza as a proper Python package on PyPI, enabling consumers to pin version ranges (e.g., zaza<2024.2.0) for better dependency management across OpenStack charm releases.
Key changes included:
Motivation:
As the OpenStack charm ecosystem matures, consumers need a reliable way to pin zaza to specific release series (e.g., Caracal). Publishing versioned packages to PyPI makes this straightforward and aligns zaza with standard Python packaging practices.
Please review and let me know if any adjustments are needed. CI is green (modulo the pre-existing ntp container issue, which this PR also fixes).