You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Jarek Potiuk (Jira)" <ji...@apache.org> on 2020/01/21 08:38:00 UTC
[jira] [Resolved] (AIRFLOW-6330) Show cli help when param blank or
typo
[ https://issues.apache.org/jira/browse/AIRFLOW-6330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jarek Potiuk resolved AIRFLOW-6330.
-----------------------------------
Fix Version/s: 1.10.8
Resolution: Fixed
> 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
> Fix For: 1.10.8
>
>
> 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)