-
Notifications
You must be signed in to change notification settings - Fork 657
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 bridging authorization #3395
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3395 +/- ##
==========================================
+ Coverage 88.63% 88.67% +0.04%
==========================================
Files 252 253 +1
Lines 13949 13993 +44
==========================================
+ Hits 12363 12408 +45
+ Misses 1586 1585 -1 ☔ View full report in Codecov by Sentry. |
2bbffc2
to
bd4eabe
Compare
94be183
to
2e3fb9d
Compare
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.
Hi @luis4a0! Thanks for this!
It appears the output is not quite correct when it prompts for allowing to create the bridge. Here is what I see:
$ multipass set local.test-issue-1.bridged=true
Multipass needs to create a bridge to connect to true.
This will temporarily disrupt connectivity on that interface.
Do you want to continue (yes/no)?
The first line says Multipass needs to create a bridge to connect to true.
and notice that it ends with true
which is not correct.
Also, I really feel this is overloading generic commands/RPC in a very specific way which is kind of changing this interface to bend to the needs of asking for bridging authorization. I feel the asking for bridging authorization should somehow be decoupled somewhat from all of this or at least make it to where the prompting could be more generalized. I think we need to give this some more thought and I would also like @ricab's opinion on this as well.
I will add that aside from the wrong string that I pointed out, it does work as intended. 🙂 |
I agree with @townsend2010. The handling for the bridging prompt is too specific for the generic set code. I would rather see a generic scheme to accommodate generic confirmation prompts, ideally applying to all commands and covering other cases of confirmation/choice prompts (e.g. auto snapshot prompt in restore). That said, I am not sure that this is the right time and place for that... Maybe there's a more accessible middle ground for now? I wouldn't mind seeing a proposal for what shape that could take. WDYT @luis4a0? |
Hey @townsend2010, @ricab! You are both right, we can do better in the prompt. Something which comes to my mind is to change the OTOH, @townsend2010, that Thanks to both for the comments and the review! |
I think a more generic Also, I'm thinking instead of the "custom" failure handling, using the |
2e3fb9d
to
b23431d
Compare
@townsend2010, fixed the |
3e4b35d
to
3cd1d86
Compare
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.
Hi @luis4a0!
Thanks for the changes you've done. I have one request below and then I think we are good pending your investigation as to why the test coverage fell so much.
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.
Hey @luis4a0!
Thanks for this. Just one more comment below regarding test coverage. I'll await your reply 🙂
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.
Hey @luis4a0,
I answered your reply about more coverage and have some more questions below regarding the tests.
1ef67ea
to
6f9f601
Compare
6f9f601
to
cee21ad
Compare
Hey @townsend2010! I addressed your comments and improved testing. This is ready for a new review! |
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.
Hey @luis4a0!
This looks much better! Thanks! I'm approving, but I will wait on CI to complete before adding it to the merge queue.
The prompt asking the user for authorization to disrupt networking to create a bridge was not working. This PR fixes issue 1 of this review.