-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
[AIRFLOW-6330] Show cli help when param blank or typo #6883
Merged
potiuk
merged 1 commit into
apache:master
from
zhongjiajie:cli_show_help_blank_param_typo
Dec 25, 2019
Merged
[AIRFLOW-6330] Show cli help when param blank or typo #6883
potiuk
merged 1 commit into
apache:master
from
zhongjiajie:cli_show_help_blank_param_typo
Dec 25, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This patch change cli behavior like below
# Only airflow with blank parameter
$ airflow
usage: airflow [-h]
{config,connections,dags,db,flower,kerberos,pools,roles,rotate_fernet_key,scheduler,sync_perm,tasks,users,variables,version,webserver,worker}
sub-command help
config Show current application configuration
connections List/Add/Delete connections
dags List and manage DAGs
db Database operations
flower Start a Celery Flower
kerberos Start a kerberos ticket renewer
pools CRUD operations on pools
roles Create/List roles
rotate_fernet_key Rotate all encrypted connection credentials and
variables; see
https://airflow.readthedocs.io/en/stable/howto/secure-
connections.html#rotating-encryption-keys
scheduler Start a scheduler instance
sync_perm Update permissions for existing roles and DAGs
tasks List and manage tasks
users CRUD operations on users
variables CRUD operations on variables
version Show the version
webserver Start a Airflow webserver instance
worker Start a Celery worker nodeoptional arguments:
-h, --help show this help message and exit
airflow command error: the following arguments are required: subcommand, see help above.
# airflow [subcommands] with blank parameter
$ airflow connections
usage: airflow connections [-h] {list,add,delete} ...positional arguments:
{list,add,delete}
list List connections
add Add a connection
delete Delete a connectionoptional arguments:
-h, --help show this help message and exit
airflow connections command error: the following arguments are required: subcommand, see help above.
$ airflow connections docker
usage: airflow connections [-h] {list,add,delete} ...positional arguments:
{list,add,delete}
list List connections
add Add a connection
delete Delete a connectionoptional arguments:
-h, --help show this help message and exit
airflow connections command error: argument subcommand: invalid choice: 'docker' (choose from 'list', 'add', 'delete'), see help above. |
Travis is sad:
|
zhongjiajie
force-pushed
the
cli_show_help_blank_param_typo
branch
from
December 24, 2019 01:45
e79c9ec
to
2fa8fb9
Compare
Codecov Report
@@ Coverage Diff @@
## master #6883 +/- ##
==========================================
- Coverage 84.62% 84.33% -0.29%
==========================================
Files 679 679
Lines 38497 38501 +4
==========================================
- Hits 32578 32470 -108
- Misses 5919 6031 +112
Continue to review full report at Codecov.
|
zhongjiajie
force-pushed
the
cli_show_help_blank_param_typo
branch
2 times, most recently
from
December 25, 2019 02:20
29db8e0
to
8e96c2a
Compare
When enter Airflow cli with blank parameter or typo parameter or wrong parameter will show Airflow cli help just like enter `Airflow [command] -h` command
zhongjiajie
force-pushed
the
cli_show_help_blank_param_typo
branch
from
December 25, 2019 06:46
8e96c2a
to
8261c25
Compare
potiuk
approved these changes
Dec 25, 2019
Nice one @zhongjiajie ! |
potiuk
pushed a commit
that referenced
this pull request
Jan 21, 2020
When enter Airflow cli with blank parameter or typo parameter or wrong parameter will show Airflow cli help just like enter `Airflow [command] -h` command (cherry picked from commit 581a395)
kaxil
pushed a commit
that referenced
this pull request
Jan 22, 2020
When enter Airflow cli with blank parameter or typo parameter or wrong parameter will show Airflow cli help just like enter `Airflow [command] -h` command (cherry picked from commit 581a395)
kaxil
pushed a commit
that referenced
this pull request
Jan 23, 2020
When enter Airflow cli with blank parameter or typo parameter or wrong parameter will show Airflow cli help just like enter `Airflow [command] -h` command (cherry picked from commit 581a395)
potiuk
pushed a commit
that referenced
this pull request
Jan 26, 2020
When enter Airflow cli with blank parameter or typo parameter or wrong parameter will show Airflow cli help just like enter `Airflow [command] -h` command (cherry picked from commit 581a395)
galuszkak
pushed a commit
to FlyrInc/apache-airflow
that referenced
this pull request
Mar 5, 2020
When enter Airflow cli with blank parameter or typo parameter or wrong parameter will show Airflow cli help just like enter `Airflow [command] -h` command
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When enter Airflow cli with blank parameter
or typo parameter or wrong parameter will
show Airflow cli help just like enter
Airflow [command] -h
commandMake sure you have checked all steps below.
Jira
Description
When enter Airflow cli with blank parameter
or typo parameter or wrong parameter will
show Airflow cli help just like enter
Airflow [command] -h
command