Repository navigation
Conversation
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)
(cherry picked from commit a9d37af)
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)
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.
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.