-
Notifications
You must be signed in to change notification settings - Fork 192
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
CLI: Remove the RabbitMQ options from verdi profile setup
#6480
CLI: Remove the RabbitMQ options from verdi profile setup
#6480
Conversation
19be86c
to
a55bc60
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.
Logic for setting up rabbitmq when user sets it to False seems a bit weird to me.
a55bc60
to
e22eb76
Compare
Thanks @agoscinski . I misunderstood your comment and thought you wanted to have the hint for Anyway I have refactored it in the vein of your suggestion being extra clear of the three different pathways. All branches still reference the configure-rabbitmq command, but in the case of |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6480 +/- ##
==========================================
+ Coverage 77.51% 77.76% +0.26%
==========================================
Files 560 561 +1
Lines 41444 41795 +351
==========================================
+ Hits 32120 32499 +379
+ Misses 9324 9296 -28 ☔ View full report in Codecov by Sentry. |
broker_config = detect_rabbitmq_config() | ||
|
||
if broker_config is None: | ||
echo.echo_warning(f'RabbitMQ server not reachable with default connection parameters: {broker_config}.') |
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.
Note that I was quickly testing this in the field, and got the following
Warning: RabbitMQ server not reachable with default connection parameters: None.
Since if the connection fails, the detect_rabbitmq_config()
command returns None
. Maybe it should actually return a tuple
of the full config and if the connection was successful?
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.
Yeah, very sloppy on my part, apologies. I blame trying to fix these things while on holiday. I am not a fan of communicating success/error through return values, so I refactored to use exceptions instead.
4d89e48
to
2678213
Compare
For the vast majority of use cases, users will have a default setup for RabbitMQ and so the default configuration will be adequate and so they will not need the options in the command. On the flipside, showing the options by default can makes the command harder to use as users will take pause to think what value to pass. Since there is the `verdi profile configure-rabbitmq` command now that allows to configure or reconfigure the RabbitMQ connection parameters for an existing profile, it is fine to remove these options from the profile setup. Advanced users that need to customize the connection parameters can resort to that separate command.
2678213
to
835053e
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.
Thanks for the work, looks fine for me now!
You understood me correctly the first time, it was just a shallow review and I did not look at the logic carefully till the second review. I like the current solution.
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.
Did some more field testing, LGTM! 🚀 Thanks again @sphuber
…m#6480) For the vast majority of use cases, users will have a default setup for RabbitMQ and so the default configuration will be adequate and so they will not need the options in the command. On the flipside, showing the options by default can makes the command harder to use as users will take pause to think what value to pass. Since there is the `verdi profile configure-rabbitmq` command now that allows to configure or reconfigure the RabbitMQ connection parameters for an existing profile, it is fine to remove these options from the profile setup. Advanced users that need to customize the connection parameters can resort to that separate command.
For the vast majority of use cases, users will have a default setup for RabbitMQ and so the default configuration will be adequate and so they will not need the options in the command. On the flipside, showing the options by default can makes the command harder to use as users will take pause to think what value to pass.
Since there is the
verdi profile configure-rabbitmq
command now that allows to configure or reconfigure the RabbitMQ connection parameters for an existing profile, it is fine to remove these options from the profile setup. Advanced users that need to customize the connection parameters can resort to that separate command.