-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request juju#17919 from amandahla/add-charm-rev-status
juju#17919 <!-- The PR title should match: <type>(optional <scope>): <description>. Please also ensure all commits in this PR comply with our conventional commits specification: https://docs.google.com/document/d/1SYUo9G7qZ_jdoVXpUVamS5VCgHmtZ0QA-wZxKoMS-C0 --> With this change will be possible get the revision from an Application. Note: I'm targeting 3.1 since per CONTRIBUTING it should be targeted at the lowest version affected. Please let me know if a different one should be targeted instead. ## Checklist <!-- If an item is not applicable, use `~strikethrough~`. --> - [x] Code style: imports ordered, good names, simple structure, etc - [ ] Comments saying why design decisions were made - [ ] Go unit tests, with comments saying what you're testing - [ ] [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 packages ## QA steps While creating a third-party client, is possible to get charm revision like this: ``` func (r *registry) parseStatus(status *params.FullStatus) { for applicationName, application := range status.Applications { r.jujuApplications.With(prometheus.Labels{ "name": applicationName, "status": application.Status.Status, "channel": application.CharmChannel, "revision": application.CharmRev, }).Set(checkStatus(application.Status.Status, []string{"active"})) ... ``` ## Documentation changes No changes. ## Links To be used in https://github.com/neoaggelos/juju_exporter **Launchpad bug:** https://bugs.launchpad.net/juju/+bug/ **Jira card:** JUJU-
- Loading branch information
Showing
5 changed files
with
15 additions
and
4 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
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
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