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

Fred Israel updated AIRFLOW-3122:
---------------------------------
    Summary: Logs not being printed to STDOUT when running `airflow test` in 
airflow >= 1.10  (was: Logs not being printed to STDOUT when running `airflow 
test` in airflow > 1.9)

> Logs not being printed to STDOUT when running `airflow test` in airflow >= 
> 1.10
> -------------------------------------------------------------------------------
>
>                 Key: AIRFLOW-3122
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3122
>             Project: Apache Airflow
>          Issue Type: Bug
>    Affects Versions: 1.10.0
>         Environment: Linux
>            Reporter: Fred Israel
>            Priority: Major
>         Attachments: airflow_bug.zip
>
>
>  
> In Version 1.10 it seems like there is a regression, as logs in bash operator 
> are not being sent to stdout in `airflow test` command. This looks wrong to 
> me, as it makes the airflow test command a bit useless and impossible to 
> debug. Take a look at my tests below:
> (code is in attachment, inside docker for easy testing)
> dag.py
>  
> {code:java}
> from datetime import datetime
> from airflow import DAG
> from airflow.operators.bash_operator import BashOperator
> dag = DAG('test')
> start = datetime.now()
> with dag:
>  BashOperator(task_id='test', bash_command='echo TEST', start_date=start)
>  BashOperator(task_id='test_failed', bash_command='echo TEST ; exit 1', 
> start_date=start)
> {code}
>  
>  
> $ VERSION=1.10.0 docker-compose run --rm bug airflow test test test 2000-1-1
> {code:java}
> [2018-09-26 20:23:21,614] {__init__.py:51} INFO - Using executor 
> SequentialExecutor
> [2018-09-26 20:23:21,756] {models.py:258} INFO - Filling up the DagBag from 
> /root/airflow/dags
> [2018-09-26 20:23:21,842] {example_kubernetes_operator.py:54} WARNING - Could 
> not import KubernetesPodOperator: No module named 'kubernetes'
> [2018-09-26 20:23:21,842] {example_kubernetes_operator.py:55} WARNING - 
> Install kubernetes dependencies with: pip install airflow['kubernetes']{code}
> $ VERSION=1.9.0 docker-compose run --rm bug airflow test test test 2000-1-1
> {code:java}
> [2018-09-26 20:23:28,941] {__init__.py:45} INFO - Using executor 
> SequentialExecutor
> [2018-09-26 20:23:28,994] {models.py:189} INFO - Filling up the DagBag from 
> /root/airflow/dags
> [2018-09-26 20:23:29,094] {bash_operator.py:70} INFO - Tmp dir root location: 
>  /tmp
> [2018-09-26 20:23:29,094] {bash_operator.py:80} INFO - Temporary script 
> location: /tmp/airflowtmphywv1usk//tmp/airflowtmphywv1usk/testoxl3mg4r
> [2018-09-26 20:23:29,095] {bash_operator.py:88} INFO - Running command: echo 
> TEST
> [2018-09-26 20:23:29,098] {bash_operator.py:97} INFO - Output:
> [2018-09-26 20:23:29,099] {bash_operator.py:101} INFO - TEST
> [2018-09-26 20:23:29,099] {bash_operator.py:105} INFO - Command exited with 
> return code 0{code}
>  



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

Reply via email to