Commit a01c820
authored
Merge pull request #671 from cderici/get-series-from-app-instead-of-metadata
[JUJU-981] Get series from deployed app instead of metadata when charm upgrade
#### Description
Charmhub is modeling the charm data separately from where the charm is deployed, therefore the series is not a part of the metadata anymore. So instead of getting the series from the metadata we now get it from the deployed application first, then we try the model config, if everything fails then we look at the metadata as a last resort (mostly to keep backwards ompatibility).
Fixes #668
#### QA Steps
The charm used for the integration test `test_upgrade_local_charm` has been updated to simulate what's happening in #668 (now it has multiple series where the first one is not the one that the charm was initially deployed on), so along with the rest of the CI tests, the following should pass with this change (which fails without the change):
```sh
tox -e integration -- tests/integration/test_application.py::test_upgrade_local_charm
```
#### Notes & Discussion
I initially thought that this would be a breaking change (needs a version bump), however, we're still keeping the old way of getting the series in case the new ways fail, so this shouldn't break anything.5 files changed
Lines changed: 31 additions & 21 deletions
File tree
- juju
- tests
- charm-folder-symlink
- integration
- bundle
- upgrade-charm
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
342 | 354 | | |
343 | 355 | | |
344 | 356 | | |
| |||
728 | 740 | | |
729 | 741 | | |
730 | 742 | | |
731 | | - | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
732 | 748 | | |
733 | | - | |
734 | 749 | | |
735 | 750 | | |
736 | 751 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | | - | |
4 | | - | |
| 2 | + | |
| 3 | + | |
5 | 4 | | |
6 | | - | |
7 | | - | |
| 5 | + | |
| 6 | + | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | | - | |
12 | | - | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
169 | | - | |
170 | | - | |
| 168 | + | |
| 169 | + | |
171 | 170 | | |
172 | 171 | | |
173 | | - | |
| 172 | + | |
174 | 173 | | |
175 | 174 | | |
176 | | - | |
| 175 | + | |
177 | 176 | | |
178 | 177 | | |
179 | 178 | | |
180 | 179 | | |
181 | | - | |
| 180 | + | |
182 | 181 | | |
183 | 182 | | |
184 | 183 | | |
| |||
187 | 186 | | |
188 | 187 | | |
189 | 188 | | |
190 | | - | |
| 189 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
0 commit comments