Commit d4f6677
authored
Merge pull request #1043 from Thanhphan1147/add_missing_revision_params_in_bundle_add_charms
#1043
#### Description
Fixes #1042.
When deploying a bundle, although the plan is properly generated with the correct revision for the charms in the bundle, and the change steps are generated with the correct parameter. I believe that the `addCharm` step does not take into account the specified "revision" of the charm to deploy, as a result the revision deployed is the latest revision instead of the specified revision. ref: https://github.com/juju/python-libjuju/blob/5ed5ae461514feb84dc0f96c2e46b6fab9f35861/juju/bundle.py#L709-L713
This PR simply adds the missing parameter to the `AddCharmChange` step and propagate the value to `client.CharmOrigin` to add the correct revision.
#### QA Steps
1. Create a bundle containing one or more charms with revision
2. Deploy the bundle with `model.deploy`
3. The deployed charms in the bundle should have the revision specified in the bundle.
- [x] Code style: imports ordered, good names, simple structure, etc
- [x] Comments saying why design decisions were made
- [x] Go unit tests, with comments saying what you're testing
- [x] [Integration tests](https://github.com/juju/juju/tree/main/tests), with comments saying what you're testing
- ~~[doc.go](https://discourse.charmhub.io/t/readme-in-packages/451) added or updated in changed package~~ (I think this is too small of a change to warrant a doc update)4 files changed
Lines changed: 32 additions & 0 deletions
File tree
- juju
- tests
- integration
- bundle
- unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
659 | 659 | | |
660 | 660 | | |
661 | 661 | | |
| 662 | + | |
662 | 663 | | |
663 | 664 | | |
664 | 665 | | |
| |||
675 | 676 | | |
676 | 677 | | |
677 | 678 | | |
| 679 | + | |
678 | 680 | | |
679 | 681 | | |
680 | 682 | | |
| |||
710 | 712 | | |
711 | 713 | | |
712 | 714 | | |
| 715 | + | |
713 | 716 | | |
714 | 717 | | |
715 | 718 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
181 | 182 | | |
182 | 183 | | |
183 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
184 | 204 | | |
185 | 205 | | |
186 | 206 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
| 315 | + | |
315 | 316 | | |
316 | 317 | | |
317 | 318 | | |
318 | 319 | | |
319 | 320 | | |
320 | 321 | | |
| 322 | + | |
321 | 323 | | |
322 | 324 | | |
323 | 325 | | |
| |||
328 | 330 | | |
329 | 331 | | |
330 | 332 | | |
| 333 | + | |
331 | 334 | | |
332 | 335 | | |
333 | 336 | | |
| |||
0 commit comments