[ 
https://issues.apache.org/jira/browse/AIRFLOW-6330?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17002390#comment-17002390
 ] 

ASF GitHub Bot commented on AIRFLOW-6330:
-----------------------------------------

zhongjiajie commented on pull request #6883: [AIRFLOW-6330] Show cli help when 
param blank or typo
URL: https://github.com/apache/airflow/pull/6883
 
 
   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
   
   Make sure you have checked _all_ steps below.
   
   ### Jira
   
   - [x] My PR addresses the following [Airflow 
Jira](https://issues.apache.org/jira/browse/AIRFLOW/) issues and references 
them in the PR title. For example, "\[AIRFLOW-XXX\] My Airflow PR"
     - https://issues.apache.org/jira/browse/AIRFLOW-6330
     - In case you are fixing a typo in the documentation you can prepend your 
commit with \[AIRFLOW-XXX\], code changes always need a Jira issue.
     - In case you are proposing a fundamental code change, you need to create 
an Airflow Improvement Proposal 
([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals)).
     - In case you are adding a dependency, check if the license complies with 
the [ASF 3rd Party License 
Policy](https://www.apache.org/legal/resolved.html#category-x).
   
   ### Description
   
   - [x] Here are some details about my PR, including screenshots of any UI 
changes:
   
   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
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Show cli help when param blank or typo
> --------------------------------------
>
>                 Key: AIRFLOW-6330
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-6330
>             Project: Apache Airflow
>          Issue Type: Improvement
>          Components: cli
>    Affects Versions: 1.10.6
>            Reporter: zhongjiajie
>            Assignee: zhongjiajie
>            Priority: Major
>
> Show cli help when param blank or typo
> When user enter Airflow cli with *blank parameter* or typo arg, or use wrong 
> parameter show Airflow cli help. Example like below
> {code:java}
> // when you enter 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.
> // So as the subcommands
> $ 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.{code}
> When you *typo* parameter
> {code:java}
> // when you typo or wrong parameter, if will show you cli help and the preset 
> parameter to use in error line
> $ 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.{code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to