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 subversion and git services (JIRA)" <ji...@apache.org> on 2018/01/28 19:42:00 UTC

[jira] [Commented] (AIRFLOW-2015) Add an --interactive switch to `airflow run`

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

ASF subversion and git services commented on AIRFLOW-2015:
----------------------------------------------------------

Commit efd8338dc8bcf50a9d0ace7659650e85d6b49305 in incubator-airflow's branch refs/heads/master from Yati Sagade
[ https://git-wip-us.apache.org/repos/asf?p=incubator-airflow.git;h=efd8338 ]

[AIRFLOW-2015] Add flag for interactive runs

We capture the standard output and error streams
so that they're handled
by the configured logger. However, sometimes, when
developing dags or
Airflow code itself, it is useful to put pdb
breakpoints in code
triggered using an `airflow run`. Such a flow
would of course require
not redirecting the output and error streams to
the logger.

This patch enables that by adding a flag to the
`airflow run`
subcommand. Note that this does not require
`--local`.

Closes #2957 from yati-sagade/ysagade/airflow-2015


> Add an --interactive switch to `airflow run`
> --------------------------------------------
>
>                 Key: AIRFLOW-2015
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2015
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: cli
>            Reporter: Yati
>            Assignee: Yati
>            Priority: Major
>             Fix For: 2.0.0
>
>
> The command
> {code:java}
> $ airflow run dag_id task_id xdate
> {code}
> redirects all output to the configured logger. For development of dags and of airflow itself, it is helpful to be able to put breakpoints in code. Capturing standard output and error streams in this case hinders this use case. Unless there already is a way to work around this, I propose addition of an --interactive. Example:
> {noformat}
> (airflow) ys@dock:~/incubator-airflow$ airflow run --force --interactive --local leader a '2018-01-16T00:00:00Z'
> ---logging snipped---
> > /home/ys/incubator-airflow/airflow/bin/cli.py(329)_run()
> -> if args.local:
> (Pdb)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)