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

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

ashb commented on pull request #4821: [AIRFLOW-3998] Use nested commands in cli.
URL: https://github.com/apache/airflow/pull/4821
 
 
   
 
----------------------------------------------------------------
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]


> Use nested commands in cli
> --------------------------
>
>                 Key: AIRFLOW-3998
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3998
>             Project: Apache Airflow
>          Issue Type: Improvement
>            Reporter: Josh Carp
>            Assignee: Josh Carp
>            Priority: Minor
>
> From 
> https://lists.apache.org/thread.html/94c97ed621706a2e9130a3550b879a5838c23209f2d6d40f8bb49cd8@%3Cdev.airflow.apache.org%3E:
>  
> The CLI treats `airflow connection` as a single command, with `--list`, 
> `--add`, etc. as flags. This means it's possible to pass options that can't 
> be used together: passing `--list` with `--conn_id` should be invalid. The 
> current implementation has to handle validation of mutually exclusive options 
> separately for each command. I think the code would be simpler and easier to 
> use if we used nested commands instead of flags: `airflow connections list` 
> and `airflow connections add` would be separate subcommands that would take 
> different arguments, and we wouldn't have to check for invalid combinations 
> of commands and arguments.
>  
> I'll file a proof of concept patch refactoring the `airflow connections` 
> command for discussion.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to