Enable celery command in any environment#7902
Conversation
|
What would you say to write a nice message in case of |
@turbaszek Thanks! How about this one? |
Definitely better! What about "celery command works only with CeleryExecutor, your current executor: ExecutorName. For more information check the help above" Also, would you mind to extend current desription of |
|
@turbaszek your suggestion is more clear! I've changed help message and changed |
3fa0f1f to
5b6fdfc
Compare
airflow/cli/cli_parser.py
Outdated
There was a problem hiding this comment.
| 'Start celery components. Works only when using CeleryExecutor. for more information, see ' | |
| 'Start celery components. Works only when using CeleryExecutor. For more information, see ' |
|
BTW, code LGTM |
|
Hi @zeroam Travis is sad due to some static checks. Please take a look at our pre-commits: |
Set celery command visible even if the executor is not CeleryExecutor Instead, raise ArgumentError and display help message when the executor is not CeleryExecutor reference from: apache#7873, apache#7070 reviewed from: @mik-laj, @turbaszek
|
@turbaszek Thanks for the advice! I will fix it up |
Codecov Report
@@ Coverage Diff @@
## master #7902 +/- ##
==========================================
- Coverage 87.16% 86.52% -0.64%
==========================================
Files 931 932 +1
Lines 45155 45191 +36
==========================================
- Hits 39358 39101 -257
- Misses 5797 6090 +293
Continue to review full report at Codecov.
|
potiuk
left a comment
There was a problem hiding this comment.
Great change. I think it's better to show all commands and do not make it depend on the current configuration. It's much better for discovery.

Set celery command visible even if the executor is not CeleryExecutor
Instead, raise ArgumentError and display help message when the executor is
not CeleryExecutor
airflowcommandBefore:
After:

airflow celerycommandAfter (executor is SequentialExecutor):
reference from: #7873, #7070
reviewed from: @mik-laj, @turbaszek
Issue link: WILL BE INSERTED BY boring-cyborg
Make sure to mark the boxes below before creating PR: [x]
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.
Read the Pull Request Guidelines for more information.