Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JUJU-1439] Initial fixes for test_model to pass with juju 3.0 #689

Merged
merged 13 commits into from
Jul 19, 2022

Conversation

cderici
Copy link
Contributor

@cderici cderici commented Jul 15, 2022

Description

This PR is the first of a bunch of PRs to enable pylibjuju to support Juju 3.0.
In particular, the aim of this PR is to have all the tests in the test_model.py to pass, which constitutes a significant portion of libjuju's operational logic.

Includes 12 commits. The summary of the changes is:

  • Facade versions are updated with the new schema, and the new clients are generated.
  • Changed incorrect uses of ClientFacade for a bunch of functions to use their respective correct Facades.
  • Update the tests/bundles that are using charmstore charms to use the charmhub instead.
  • There's a couple of spots where we needed CharmHub.Info() to get some basic charm info to deploy stuff, however, since CharmHub facade doesn't exist anymore in juju 3.0, I replaced it with a simple api call to the charmhub itself to get the necessary info.

QA Steps

All the tests in test_model.py should pass on a juju 3.0 controller.
So bootstrap from juju's develop branch (or snap install juju --channel=latest/beta) and run the following in libjuju:

tox -e integration -- tests/integration/test_model.py

Notes & Discussion

  • This PR targets the juju-3.0-compatibility branch, not the main branch.
  • Currently the tests in the CI don't make much sense, since the CI is being run against the latest stable juju (which is still 2.9). I expect most of them to fail until we address the problem of supporting both 2.9 and 3.0 at the same time.

@cderici cderici added the hint/do-not-merge requires additional efforts, no merge label Jul 15, 2022
@cderici cderici removed the hint/do-not-merge requires additional efforts, no merge label Jul 18, 2022
Copy link
Contributor

@juanmanuel-tirado juanmanuel-tirado left a comment

Choose a reason for hiding this comment

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

LG2M 👍

@cderici
Copy link
Contributor Author

cderici commented Jul 19, 2022

/merge

@jujubot jujubot merged commit 8b7e7b8 into juju:juju-3.0-compatibility Jul 19, 2022
jujubot added a commit that referenced this pull request Aug 9, 2022
#704

Tuesday August 9 2022

## What's Changed

Switching to semantic versioning. From this release on, at least the major release number matches
the most recent Juju supported. Hence the jump to `3.0.0` since this release supports `Juju 3.0`.
(This also means that `python-libjuju <= 2.9.11` only support up to `Juju 2.x`)

* [JUJU-1439] Initial fixes for `test_model` to pass with juju 3.0 by @cderici in #689
* [JUJU-1464] More fixes for 3.0 compatibility by @cderici in #691
* [JUJU-1457] Merge 3.0 compatibility branch onto master by @cderici in #692
* Fix conditional by @sed-i in #696
* [JUJU-1534] Fix `model.connect_current()` by @cderici in #697
* [JUJU-1542] Fix run actions on units by @cderici in #698
* [JUJU-1577] Replace k8s bundles with machine bundles for tests by @cderici in #703
* [JUJU-1528] Add storage implementation by @cderici in #701

[JUJU-1439]: https://warthogs.atlassian.net/browse/JUJU-1439?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[JUJU-1464]: https://warthogs.atlassian.net/browse/JUJU-1464?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[JUJU-1457]: https://warthogs.atlassian.net/browse/JUJU-1457?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[JUJU-1534]: https://warthogs.atlassian.net/browse/JUJU-1534?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[JUJU-1542]: https://warthogs.atlassian.net/browse/JUJU-1542?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[JUJU-1577]: https://warthogs.atlassian.net/browse/JUJU-1577?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
[JUJU-1528]: https://warthogs.atlassian.net/browse/JUJU-1528?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
@cderici cderici deleted the 3.0-compat branch August 9, 2022 21:52
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.

3 participants