You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2019/12/21 20:34:00 UTC

[jira] [Commented] (AIRFLOW-6076) dag.cli() does not work properly

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

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

KKcorps commented on pull request #6874: [AIRFLOW-6076] Fix dag.cli() Key error
URL: https://github.com/apache/airflow/pull/6874
 
 
   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-6076
   
   ### Description
   
   - [X] Here are some details about my PR, including screenshots of any UI changes:
    The DAG cli subcommands are nested inside the main command. The dictionary only contained the main commands and not the nested commands. This resulted in the KeyError.
   Also, some of the DAG subcommands in `dag_subparsers` had names referring to older version.
   
   ### Tests
   
   - [X] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
    Tests are already present
   
 
----------------------------------------------------------------
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:
users@infra.apache.org


> dag.cli() does not work properly
> --------------------------------
>
>                 Key: AIRFLOW-6076
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-6076
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: cli, DAG
>    Affects Versions: 2.0.0
>            Reporter: Tomasz Urbaszek
>            Priority: Major
>
> Using DAG().cli() results in an error:
>  
> Traceback (most recent call last):
>  File "/Users/usr/xx/airflow/airflow/example_dags/example_bash_operator.py", line 75, in <module>
>  dag.cli()
>  File "/Users/usr/xx/airflow/airflow/models/dag.py", line 1290, in cli
>  parser = cli.CLIFactory.get_parser(dag_parser=True)
>  File "/Users/usr/xx/airflow/airflow/bin/cli.py", line 997, in get_parser
>  sub = cls.subparsers_dict[sub]
> KeyError: 'backfill'



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