-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We are incorrectly refreshing charms. The current method queries the controller for the charm's current origin and charm url In pylibjuju, we then just overwrite the appropriate fields. However, this leaves behind id_ and hash_ This means when we later refresh, we are always returned the most recent revision by charmhub, no matter what revision we specify. The way we handle this in the Juju CLI is by reconstructing the charm origin using MakeOrigin: https://github.com/juju/juju/blob/a03ade4d358b1b0f135374b15b1bcd6b46d0ba0f/cmd/juju/application/utils/origin.go#L20-L75 This ensures only the fields we expect are present. Replicate this method, ensuring we behave the same as the CLI. Fixes: #1057
- Loading branch information
1 parent
b569634
commit 5482461
Showing
2 changed files
with
32 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters