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

Merge master to 3.1 #845

Merged
merged 28 commits into from
May 5, 2023

Conversation

juanmanuel-tirado
Copy link
Contributor

Description

Merge master into 3.1 after releasing 3.1.2.0

juanmanuel-tirado and others added 28 commits March 8, 2023 12:30
* Add facades for 3.1.1.

* Update secrets backend test.
juju#812

#### Description

This brings back the separate `model.destroy_units(*units)` as a quality of life feature. 

Fixes juju#811 

#### QA Steps

All the regular tests should pass. Additionally, this also adds a separate integration test for `destroy_units`, so the following should be passing (I tried it on juju 3.1).

```
tox -e integration -- tests/integration/test_model.py::test_destroy_units
```
#### Notes & Discussion

As a future reference, this was changed in juju#791.
The main change here is that we no longer raise an exception in the
case of an unknown facade.
…ta1_facades

juju#828

#### Description

Add missing facades for 3.1.2 and 3.2-beta schemas.

#### QA Steps

Bootstrap a 3.2-beta2 controller, connect to it, and check that all the facades are known.
by passing the revision info through the ResolveCharm api call.

fixes juju#690
that deploys juju-qa-test --channel 2.0/stable --revision 22
Note that --revision is only used for charmhub charms, so we're not
passing this info into the CharmOrigin for local charms.
This is needed because in libjuju we default to latest/stable if no
channel is specified. It is dangerous if we don't add this check
because without it the libjuju would deploy the wrong revision without
an exception if --revision is used but no --channel is given.
Otherwise fail early without making any additional API calls.
flags are validated before deploying charms or bundles
* Propagate force parameter to resolve function to enable force for remote bundles.
Without the series the ResolveCharm will select the latest base for
the charm. E.g. even if we want focal, the ResolveCharm will return
22.04 (jammy) for the base channel in the resulting origin if the
charm supports both jammy and focal.

This communicates the series info with the ResolveCharm via the
inputted origin so the resulting origin will have the correct base
channel.

Fixes juju#822
That are accidentally introduced in juju#825.

* _resolve_charm's force parameter is made optional
* fixed the _resolve_charm calls in bundle.py to have less number of
variables to unpack onto
This selector will be used after the ResolveCharms api call, and use
the supported series and the base information returned to select the
appropriate series to construct the correct base for the charm. Then
it's given to the AddCharm in normal the deploy process.
The main change is in the _resolve_charm that's used in the model and
bundle deploy code path. We pass in the series info whenever we can
into the ResolveCharm call, then use its result to run the series
selector, then construct the base using that and finally pass the
origin to the AddCharm. Note that the ResolveCharm API call is made no
more than once.
…t revision

This is basically testing what is manually reported by
@juanmanuel-tirado in the following review:

juju#830 (comment)
juju#830

#### Description

This adds the feature that allows deploying by revision, by passing through the revision info into the `ResolveCharms` API call. 

Fixes juju#690 


#### QA Steps

An example is added, so it should work:

```
 $ python examples/deploywithrevision.py
```

- [x] Along with that example, I need to write some integration tests for this before landing (see discussion below).

```
tox -e integration -- tests/integration/test_model.py::test_deploy_by_revision
```

```
tox -e integration -- tests/integration/test_model.py::test_deploy_by_revision_validate_flags
```

All CI tests need to pass.


#### Notes & Discussion

- [x] Before landing, we need to make sure that the input validation is being handled gracefully. For regular charms, `--revision` requires `--channel`, however for bundles, `--channel` and `--revision` are mutually exclusive. The `ResolveCharms` call should be getting us the right errors for those, we just need to make sure those errors are passed through correctly. (there should be integration tests for these validations)
* Add juju 3.1.2 missing facades. 
* Fix secrets-bakend-lifecycle test.
* Increase testing timeouts.
* Revisit postgresql charm to be downloaded.
---------

Co-authored-by: Juju bot <[email protected]>
Co-authored-by: Caner Derici <[email protected]>
* Prepare release notes for 3.1.2.0.
@juanmanuel-tirado juanmanuel-tirado changed the base branch from master to 3.1 May 5, 2023 09:57
@juanmanuel-tirado juanmanuel-tirado merged commit 228922c into juju:3.1 May 5, 2023
@juanmanuel-tirado juanmanuel-tirado deleted the Merge-master-to-3.1 branch May 5, 2023 09:58
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