Commit 4c43628
authored
Merge pull request #746 from cderici/fix-charmhub-series-deploy-3.0
#746
#### Description
This fixes the issue with `model.deploy` using charmhub, where we're trying to get the `series` field from the origin returned by resolving the charm. However, `CharmOrigin` no longer has the `series` field in Juju 3.0 (it's replaced with the `base` field), so the origin we get as a part of the result of calling the `ResolveCharms` function no longer has the `series` field.
Note that we gotta keep it in place for clients using older controllers (i.e. `2.9`).
This also fixes the issue where we apparently hardcoded the version of the `Resources` interface (to be 2). With this change, we get that info dynamically from the facade version.
#### QA Steps
Following should work with both `2.9` and `3.0/candidate` controllers.
```python
application = await model.deploy(
'ch:minio'
)
```
#### Notes & Discussion
We also need to focus on the `latest-edge` jenkins CI job, which is currently not working (for jenkins infra issues). I suspect that the change in the `CharmOrigin` is fundamental enough that a bunch more things will blow in libjuju. Therefore the CI test against the latest juju becomes critical, as we would've caught this issue way before it's raised if the jenkins job was working correctly.2 files changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
87 | | - | |
| 88 | + | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1739 | 1739 | | |
1740 | 1740 | | |
1741 | 1741 | | |
1742 | | - | |
| 1742 | + | |
| 1743 | + | |
1743 | 1744 | | |
1744 | 1745 | | |
1745 | 1746 | | |
| |||
0 commit comments