Skip to content

[ussuri] Use zaza 2024.x and Juju 3 - #1447

Closed
quanchobi wants to merge 6 commits into
openstack-charmers:stable/ussurifrom
quanchobi:ussuri-zaza-pypi
Closed

quanchobi wants to merge 6 commits into
openstack-charmers:stable/ussurifrom
quanchobi:ussuri-zaza-pypi

Conversation

@quanchobi

Copy link
Copy Markdown

Problem:

zaza stable/ussuri crashes on Python ≥3.10 (collections.Mapping) and pins juju<3.0, so ussuri functional tests can't run against a Juju 3.x controller.

Fix:

libjuju is no longer pinned to 2.x, so OSCI's Juju 2.9 ussuri jobs would get a client that can't talk to their controller. It's a trade off, but yoga and zed already do this. This fixes functional tests for all ussuri charms.

ajkavanagh and others added 6 commits November 5, 2026 19:29
This is to remove the need to sync the __init__.py file between zaza and
zaza.openstack.tests.  This PR is to enable zaza.openstack to be a
properly namespaces module.

(cherry picked from commit 703c4a9)
(cherry picked from commit 07ffb7d)
(cherry picked from commit 8ada03a)
Existing code uses the python libjuju unit.run in order to execute
a wait check for ca readiness across the units. The behavior of libjuju
changed between 2.x and 3.x and causes this functionality to break. This
is abstracted and handled in the zaza library, so use that code instead
as it properly handles the differences.

Signed-off-by: Billy Olsen <billy.olsen@canonical.com>
(cherry picked from commit a64d2c6)
(cherry picked from commit d405619)
(cherry picked from commit 3b7dbbf)
zaza normally runs libjuju async functions in a background thread
to enable zaza to be blocking, but keep the libjuju async functions
'ticking over' between blocking calls.

This can break unit tests as starting the zaza background thread will
hang unless it is cleaned up.  A simple solution is just to use zaza in
non-threaded mode in the unit tests, and zaza provides a mechanism for
this via zaza.RUN_LIBJUJU_IN_THREAD = False.

(cherry picked from commit 7c8a190)
(cherry picked from commit a1b6b9addcd581ff7b62a11036e45a981298bfb5)
(cherry picked from commit f8de018)
get_urllib_opener only set an http proxy from TEST_HTTP_PROXY. Image
downloads start on http://download.cirros-cloud.net but the server now
redirects to https://github.com, and with an http-only ProxyHandler the
https request bypasses the proxy and connects directly. Where external
access is only reachable through a proxy this times out.

Also set an https proxy from TEST_HTTPS_PROXY (falling back to
TEST_HTTP_PROXY) so the redirected https request goes through the proxy.

Signed-off-by: Seyeong Kim <seyeong.kim@canonical.com>
(cherry picked from commit a3b9cc1)
(cherry picked from commit f9a5ce8)
If TEST_{NO,HTTP,HTTPS}_PROXY are provided, convert them to
http_proxy etc so that code will use them. This will apply
to all code under zaza.openstack.

(cherry picked from commit 4b4ecec)
(cherry picked from commit 135a083)
@quanchobi quanchobi closed this Nov 6, 2026
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.

5 participants