-
Notifications
You must be signed in to change notification settings - Fork 103
fix: creating offer when connecting to existing model, fixes #1264 #1265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: creating offer when connecting to existing model, fixes #1264 #1265
Conversation
|
Nevermind all integration tests failing, that's the case in the main branch too: https://github.com/juju/python-libjuju/commits/main/ |
|
Asking @benhoyt to review while @james-garner-canonical is away. |
benhoyt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me. Couple of nit comments. Let's just ensure we've tested this code path in real life (manually is okay).
|
I've merged #1268 into this PR. |
gfouillet
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's cleaner, LGTM.
…when-connecting-to-existing-model
|
/build |
|
I've confirmed that the fix works manually. |
|
/merge |
|
/build |
|
/merge |
Description
#1044 fixed proxy object reuse some time ago
I accidentally undid that change in #1186 as I didn't realise that multiple connect/close calls were expected on a given instance.
This PR re-applies the change, and cleans up init.
(I've rearranged the initialisation order, because
__del__()is run on a partially-initialised instance if__init__()fails half-way through. That's something that happens in unit tests, although unlikely to affect legitimate use.)Fixes: #1264 creating offer fails when connecting to existing model
QA Steps
All CI tests need to pass.
Fixes #1264