Fix upgrade charm revision for application resources #414
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fix update charm revision for an application resource as done in the juju client. Resolve the charm as if it's being created instead so that revision and channel do not conflict. There are potential issues written out in the code. However it's a better solution that the current breakage. Juju changes are needed to fix correctly.
Additional validation added for updating a charm such as ensuring the you cannot update the revision and channel are both updated and that the new charm revision supports the architecture and operating system of the current charm revision.
Included new acceptance test writing method introduce by @anvial in a PR which hasn't landed yet. This cherry picked commit also has the test needed to verify this change.
Fixes: #413
Type of change
QA steps
As documented in bug and in new acceptance test.
Additional notes
JUJU-5585