Remove dependency to juju-cli for controller_name#1009
Merged
Conversation
controllers.yaml is read for the controller_name after a connection is established, and this creates a depends on the juju-cli to be installed in the system, which is not required for pylibjuju.
jack-w-shaw
approved these changes
Jan 23, 2024
Contributor
Author
|
/merge |
Merged
jujubot
added a commit
that referenced
this pull request
Feb 13, 2024
#1023 ## What's Changed * Drop use of walrus operator by @freyes in #993 * No controller model access needed for connection with a non-admin user by @cderici in #1003 * Password resolution in connector by @cderici in #1002 * Remove dependency to juju-cli for controller_name by @cderici in #1009 #### Notes & Discussion JUJU-5413
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.
Description
controllers.yamlis read for thecontroller_nameafter a connection is established, and this creates a dependency on the juju-cli to be installed in the system, which is not required for pylibjuju.Fixes #996
QA Steps
Testing this requires a bit of stateful actions. I see two easy ways to test:
Add
import pdb;pdb.set_trace()right before thenew_cont.connect(line, and run the integration test with--pdbas follows:Before continuing, go find the
controllers.yamland rename it to something else (sort of easier than removing juju-cli etc):Now continue in the pdb (
c) to see if the new connection will be established without a problem.Stop at this point to rename the
controllers.yamlfile.This should succeed.
Don't forget to rename your controllers.yaml back:
Notes & Discussion
JUJU-5317