refactor: don't get the storage details from --help#2172
Merged
tonyandrewmeyer merged 2 commits intocanonical:mainfrom Nov 16, 2025
Merged
refactor: don't get the storage details from --help#2172tonyandrewmeyer merged 2 commits intocanonical:mainfrom
tonyandrewmeyer merged 2 commits intocanonical:mainfrom
Conversation
james-garner-canonical
approved these changes
Nov 14, 2025
Contributor
james-garner-canonical
left a comment
There was a problem hiding this comment.
Looks good to me, nice cleanup.
Do you know how well covered this code path is in our tests?
Collaborator
Author
Contributor
|
Thanks for checking that! |
benhoyt
approved these changes
Nov 16, 2025
Collaborator
benhoyt
left a comment
There was a problem hiding this comment.
Nice to get rid of this nastiness!
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Remove the private
_ModelBackend._storage_event_detailsmethod (and the_ModelBackend.STORAGE_KEY_REonly used in that method), which was only used in_main, and retrieved the storage index and location by parsingstorage-get --help.In
_main, get the storage index from theJujuContextobjects (so from the environment variable provided by Juju), and call_ModelBackend.storage_getdirectly to get the storage location.Fixes #2109