Commit d6e9ca5
authored
Merge pull request #706 from cderici/fix-facade-issues-1
#706
#### Description
This change attempts to fix the `Unit.run_actions` issue where the resulting object is different based on the used Facade (which is based on whether the `2.9` or `3.0` juju client is being used). With this change both ways will return the same type of object as a result of running the action on the unit. It's also a continuation/possible-regression-fix of #698.
Also adding the `EnvironUpgrader` facade that's introduced in `Juju 3.0`, so we shouldn't get the "unexpected facade" warning anymore.
Also updating the clients with the latest schema from juju 3.0. In particuılar the Application facade version is bumped up `13` -> `14`.
With this #705 should be fixed too.
#### QA Steps
QA steps for this is sort of a simulation of one of the real world libjuju uses in a function on [mongodb-operator](https://github.com/canonical/mongodb-operator/blob/8796be02e10b84f990da0426ad1cff5922dc506a/tests/integration/helpers.py#L39).
Get a controller on a k8s cloud (I did it on `microk8s`). The following then should work fine.
Full QA should be done with 2 separate controllers (at least that's what I did): one bootstrapped with `juju 2.9` and another with `juju 3.0`.
```python
async def _get_password():
model = Model()
await model.connect()
await model.deploy('zinc-k8s')
await model.wait_for_idle(status="active")
unit = model.applications['zinc-k8s'].units[0]
action = await unit.run_action("get-admin-password")
action = await action.wait()
print(action.results["admin-password"])
await model.disconnect()
```
#### Notes & Discussion
This is also related (and most likely a fix) to:
* openstack-charmers/zaza#545
* openstack-charmers/zaza#546
* https://github.com/canonical/mongodb-operator/runs/7761747331?check_suite_focus=true20 files changed
Lines changed: 66725 additions & 76467 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
5 | 10 | | |
6 | 11 | | |
7 | 12 | | |
8 | 13 | | |
9 | 14 | | |
10 | | - | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | 17 | | |
21 | | - | |
| 18 | + | |
22 | 19 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 20 | + | |
| 21 | + | |
29 | 22 | | |
30 | 23 | | |
31 | 24 | | |
| |||
127 | 120 | | |
128 | 121 | | |
129 | 122 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | 123 | | |
135 | 124 | | |
136 | 125 | | |
| |||
247 | 236 | | |
248 | 237 | | |
249 | 238 | | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | 239 | | |
255 | 240 | | |
256 | 241 | | |
| |||
455 | 440 | | |
456 | 441 | | |
457 | 442 | | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | 443 | | |
463 | 444 | | |
464 | 445 | | |
| |||
467 | 448 | | |
468 | 449 | | |
469 | 450 | | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | 451 | | |
475 | 452 | | |
476 | 453 | | |
| |||
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | 219 | | |
229 | 220 | | |
230 | 221 | | |
| |||
799 | 790 | | |
800 | 791 | | |
801 | 792 | | |
802 | | - | |
803 | | - | |
804 | | - | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | 793 | | |
809 | 794 | | |
810 | 795 | | |
| |||
853 | 838 | | |
854 | 839 | | |
855 | 840 | | |
856 | | - | |
857 | | - | |
858 | | - | |
859 | | - | |
860 | | - | |
861 | | - | |
862 | | - | |
863 | 841 | | |
864 | 842 | | |
865 | 843 | | |
866 | 844 | | |
867 | | - | |
868 | | - | |
869 | | - | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
870 | 848 | | |
871 | 849 | | |
872 | 850 | | |
| |||
908 | 886 | | |
909 | 887 | | |
910 | 888 | | |
911 | | - | |
912 | | - | |
913 | | - | |
914 | | - | |
915 | 889 | | |
916 | 890 | | |
917 | 891 | | |
| |||
1350 | 1324 | | |
1351 | 1325 | | |
1352 | 1326 | | |
1353 | | - | |
1354 | | - | |
1355 | | - | |
1356 | | - | |
1357 | | - | |
1358 | | - | |
1359 | | - | |
1360 | | - | |
1361 | | - | |
1362 | | - | |
1363 | | - | |
1364 | | - | |
1365 | | - | |
1366 | | - | |
1367 | | - | |
1368 | | - | |
1369 | | - | |
1370 | | - | |
1371 | | - | |
1372 | | - | |
1373 | | - | |
1374 | | - | |
1375 | | - | |
1376 | | - | |
1377 | | - | |
1378 | | - | |
1379 | | - | |
1380 | | - | |
1381 | | - | |
1382 | 1327 | | |
1383 | 1328 | | |
1384 | 1329 | | |
| |||
1557 | 1502 | | |
1558 | 1503 | | |
1559 | 1504 | | |
1560 | | - | |
1561 | | - | |
1562 | | - | |
1563 | | - | |
1564 | | - | |
1565 | | - | |
1566 | | - | |
1567 | | - | |
1568 | | - | |
1569 | | - | |
1570 | | - | |
1571 | | - | |
1572 | | - | |
1573 | | - | |
1574 | | - | |
1575 | | - | |
1576 | | - | |
1577 | | - | |
1578 | | - | |
1579 | | - | |
1580 | | - | |
1581 | | - | |
1582 | | - | |
1583 | | - | |
1584 | | - | |
1585 | | - | |
1586 | | - | |
1587 | | - | |
1588 | | - | |
1589 | | - | |
1590 | | - | |
1591 | | - | |
1592 | | - | |
1593 | | - | |
1594 | | - | |
1595 | 1505 | | |
1596 | 1506 | | |
1597 | 1507 | | |
| |||
1678 | 1588 | | |
1679 | 1589 | | |
1680 | 1590 | | |
1681 | | - | |
| 1591 | + | |
1682 | 1592 | | |
1683 | 1593 | | |
1684 | 1594 | | |
| |||
1827 | 1737 | | |
1828 | 1738 | | |
1829 | 1739 | | |
1830 | | - | |
1831 | | - | |
1832 | | - | |
1833 | | - | |
1834 | | - | |
1835 | | - | |
1836 | | - | |
1837 | | - | |
1838 | | - | |
1839 | | - | |
1840 | | - | |
1841 | | - | |
1842 | | - | |
1843 | | - | |
1844 | | - | |
1845 | | - | |
1846 | | - | |
1847 | | - | |
1848 | | - | |
1849 | | - | |
1850 | | - | |
1851 | | - | |
1852 | | - | |
1853 | | - | |
1854 | | - | |
1855 | | - | |
1856 | | - | |
1857 | | - | |
1858 | | - | |
1859 | | - | |
1860 | | - | |
1861 | | - | |
1862 | | - | |
1863 | 1740 | | |
1864 | 1741 | | |
1865 | 1742 | | |
| |||
0 commit comments