You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Ash Berlin-Taylor (JIRA)" <ji...@apache.org> on 2019/07/19 07:43:00 UTC

[jira] [Resolved] (AIRFLOW-3998) Use nested commands in cli

     [ https://issues.apache.org/jira/browse/AIRFLOW-3998?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ash Berlin-Taylor resolved AIRFLOW-3998.
----------------------------------------
       Resolution: Fixed
    Fix Version/s: 2.0.0

> 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
>             Fix For: 2.0.0
>
>
> 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)