-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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 flower broker configuration #4631
Fix flower broker configuration #4631
Conversation
I thought about reporting a bug first, but it was easier to just make a PR with the fix. I'd appreciate if this PR could get a |
Codecov Report
@@ Coverage Diff @@
## master #4631 +/- ##
==========================================
- Coverage 71.25% 71.22% -0.04%
==========================================
Files 190 190
Lines 14916 14879 -37
Branches 1102 1098 -4
==========================================
- Hits 10629 10598 -31
+ Misses 4284 4278 -6
Partials 3 3
Continue to review full report at Codecov.
|
@leorochael thanks for also fixing the Pylint issue. If it's ok with you @michellethomas is going to incorporate your Pylint fix into her PR (#4632) to limit the scope of each PR. We'll merge it ASAP so you can rebase. |
e4a1e51
to
8835d74
Compare
@john-bodley, sure. It's rebased now. I took the opportunity to enhance the diff to not start Flower if no BROKER_URL present. I'd appreciate a second opinion on the error message presented. |
In terms of enforcing that the Note we're planning on deprecating wrapping of these external commands per #4451 as they're problematic. |
In case the celery broker is configured with transport options, these options would not be passed into flower with a --broker parameter. So now we pass the whole celery app to flower instead. Also, don't try to start Flower if no Celery broker URL present.
8835d74
to
b1f8b34
Compare
Before this PR, the behaviour of
Which resulted in the following output:
With this PR, but without the check, the resulting command on a missing broker config would be:
With the output:
In both cases I think it would be better to just fail early in this case. As for the deprecation of external command wrapping, if you believe that there is little value in fixing the flower invocation, feel free to close this PR, but as long as there is a |
@leorochael for context I just merged #4451. |
Ok so, #4451 is merged deprecating the
Rather than:
Is there a specific reason for preferring one over the other? I'm asking to decide whether to close this PR or to increment it with a fix the documentation of how to invoke It seems counter-intuitive to me that the one on |
@leorocheal the reason the documentation suggests using the sql_lab over cli is the cli one is an import from sql_lab and solely exists for the deprecated command. |
The If superset ever uses For now, I'll just close this PR. |
In case the celery broker is configured with transport options, these options would not be passed into flower with a --broker parameter.
A clear example is that, when launched with
superset flower
, thesuperset.sql_lab.get_sql_results
task was not reported by flower on startup:More importantly, flower could outright fail to work if a broker with less usual options was configured by superset, since these options were not passed at all into flower.