[jira] [Updated] (AIRFLOW-1086) Fail to execute task with upstream dependency in subdag

2017-05-12 Thread Laurent Bonafons (JIRA)

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

Laurent Bonafons updated AIRFLOW-1086:
--
Fix Version/s: 1.8.1

> Fail to execute task with upstream dependency in subdag
> ---
>
> Key: AIRFLOW-1086
> URL: https://issues.apache.org/jira/browse/AIRFLOW-1086
> Project: Apache Airflow
>  Issue Type: Bug
>  Components: celery, subdag
>Affects Versions: Airflow 1.8, 1.8.0
>Reporter: Laurent Bonafons
> Fix For: 1.8.1
>
> Attachments: test_bubdag_task_instances.png, test_subdag_graph.png, 
> test_subdag.py
>
>
> Hello,
> We have been migrating from Airflow v1.7.1.3 to v1.8.0 and we can't run 
> subdags anymore. We use CeleryExecutor with RabbitMQ for backend.
> I tested on more and more simplified cases to finish up with the great 
> example "test_subdag" from Joe Schmid (cf attachment).
> And it still doesn't work. In a subdag only the first tasks, the ones without 
> upstream dependencies, run.
> When a task is successful in a subdag, downstream tasks are not executed at 
> all even if in the log of the subdag we can see that "Dependencies all met" 
> for the task.
> This looks similar to AIRFLOW-955 ("job failed to execute tasks") reported by 
> Jeff Liu
> but here we're not on level 2, it's just a subdag containing tasks.
> Here an example of subdag log in v1.7.1.3
> {noformat} [2017-04-06 12:11:33,648] {models.py:154} INFO - Filling up the 
> DagBag from /usr/local/airflow/dags/tricky_test_3.py
> [2017-04-06 12:11:35,052] {models.py:154} INFO - Filling up the DagBag from 
> /usr/local/airflow/dags/tricky_test_3.py
> [2017-04-06 12:11:35,125] {models.py:1196} INFO - 
> 
> Starting attempt 1 of 1
> 
> [2017-04-06 12:11:35,136] {models.py:1219} INFO - Executing 
>  on 2017-04-03 00:00:00
> [2017-04-06 12:11:35,165] {base_executor.py:36} INFO - Adding to queue: 
> airflow run Test_SubDAG.SubDagOp SubDAG_Task1 2017-04-03T00:00:00 --local -sd 
> DAGS_FOLDER/tricky_test_3.py 
> [2017-04-06 12:11:40,014] {sequential_executor.py:26} INFO - Executing 
> command: airflow run Test_SubDAG.SubDagOp SubDAG_Task1 2017-04-03T00:00:00 
> --local -sd DAGS_FOLDER/tricky_test_3.py 
> [2017-04-06 12:11:46,176] {jobs.py:934} INFO - Task instance 
> ('Test_SubDAG.SubDagOp', 'SubDAG_Task1', datetime.datetime(2017, 4, 3, 0, 0)) 
> succeeded
> [2017-04-06 12:11:46,176] {jobs.py:997} INFO - [backfill progress] | waiting: 
> 1 | succeeded: 1 | kicked_off: 1 | failed: 0 | skipped: 0 | deadlocked: 0
> [2017-04-06 12:11:46,185] {base_executor.py:36} INFO - Adding to queue: 
> airflow run Test_SubDAG.SubDagOp SubDAG_Task2 2017-04-03T00:00:00 --local -sd 
> DAGS_FOLDER/tricky_test_3.py 
> [2017-04-06 12:11:46,195] {sequential_executor.py:26} INFO - Executing 
> command: airflow run Test_SubDAG.SubDagOp SubDAG_Task2 2017-04-03T00:00:00 
> --local -sd DAGS_FOLDER/tricky_test_3.py 
> [2017-04-06 12:11:52,177] {jobs.py:934} INFO - Task instance 
> ('Test_SubDAG.SubDagOp', 'SubDAG_Task2', datetime.datetime(2017, 4, 3, 0, 0)) 
> succeeded
> [2017-04-06 12:11:52,177] {jobs.py:997} INFO - [backfill progress] | waiting: 
> 0 | succeeded: 2 | kicked_off: 2 | failed: 0 | skipped: 0 | deadlocked: 0
> [2017-04-06 12:11:52,178] {jobs.py:1026} INFO - Backfill done. Exiting.
> {noformat}
> And here in v1.8.0
> {noformat}
> [2017-04-05 16:17:51,854] {models.py:167} INFO - Filling up the DagBag from 
> /usr/local/airflow/dags/tricky_test_3.py
> [2017-04-05 16:17:51,996] {base_task_runner.py:112} INFO - Running: ['bash', 
> '-c', u'airflow run Test_SubDAG SubDagOp 2017-04-04T00:00:00 --job_id 9987 
> --raw -sd DAGS_FOLDER/tricky_test_3.py']
> [2017-04-05 16:17:52,803] {base_task_runner.py:95} INFO - Subtask: 
> [2017-04-05 16:17:52,803] {__init__.py:57} INFO - Using executor 
> CeleryExecutor
> [2017-04-05 16:17:52,917] {base_task_runner.py:95} INFO - Subtask: 
> [2017-04-05 16:17:52,917] {driver.py:120} INFO - Generating grammar tables 
> from /usr/lib/python2.7/lib2to3/Grammar.txt
> [2017-04-05 16:17:52,957] {base_task_runner.py:95} INFO - Subtask: 
> [2017-04-05 16:17:52,956] {driver.py:120} INFO - Generating grammar tables 
> from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
> [2017-04-05 16:17:53,262] {base_task_runner.py:95} INFO - Subtask: 
> [2017-04-05 16:17:53,262] {models.py:167} INFO - Filling up the DagBag from 
> /usr/local/airflow/dags/tricky_test_3.py
> [2017-04-05 16:17:53,401] {base_task_runner.py:95} INFO - Subtask: 
> [2017-04-05 16:17:53,400] {models.py:1126} INFO - Dependencies all met for 
> 
> [2017-04-05 16:17:53,409] {base_task_runner.py:95} INFO - Subtask: 
> [2017-04-05 

[jira] [Updated] (AIRFLOW-1086) Fail to execute task with upstream dependency in subdag

2017-04-25 Thread Laurent Bonafons (JIRA)

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

Laurent Bonafons updated AIRFLOW-1086:
--
Affects Version/s: 1.8.0

> Fail to execute task with upstream dependency in subdag
> ---
>
> Key: AIRFLOW-1086
> URL: https://issues.apache.org/jira/browse/AIRFLOW-1086
> Project: Apache Airflow
>  Issue Type: Bug
>  Components: celery, subdag
>Affects Versions: Airflow 1.8, 1.8.0
>Reporter: Laurent Bonafons
> Attachments: test_bubdag_task_instances.png, test_subdag_graph.png, 
> test_subdag.py
>
>
> Hello,
> We have been migrating from Airflow v1.7.1.3 to v1.8.0 and we can't run 
> subdags anymore. We use CeleryExecutor with RabbitMQ for backend.
> I tested on more and more simplified cases to finish up with the great 
> example "test_subdag" from Joe Schmid (cf attachment).
> And it still doesn't work. In a subdag only the first tasks, the ones without 
> upstream dependencies, run.
> When a task is successful in a subdag, downstream tasks are not executed at 
> all even if in the log of the subdag we can see that "Dependencies all met" 
> for the task.
> This looks similar to AIRFLOW-955 ("job failed to execute tasks") reported by 
> Jeff Liu
> but here we're not on level 2, it's just a subdag containing tasks.
> Here an example of subdag log in v1.7.1.3
> {noformat} [2017-04-06 12:11:33,648] {models.py:154} INFO - Filling up the 
> DagBag from /usr/local/airflow/dags/tricky_test_3.py
> [2017-04-06 12:11:35,052] {models.py:154} INFO - Filling up the DagBag from 
> /usr/local/airflow/dags/tricky_test_3.py
> [2017-04-06 12:11:35,125] {models.py:1196} INFO - 
> 
> Starting attempt 1 of 1
> 
> [2017-04-06 12:11:35,136] {models.py:1219} INFO - Executing 
>  on 2017-04-03 00:00:00
> [2017-04-06 12:11:35,165] {base_executor.py:36} INFO - Adding to queue: 
> airflow run Test_SubDAG.SubDagOp SubDAG_Task1 2017-04-03T00:00:00 --local -sd 
> DAGS_FOLDER/tricky_test_3.py 
> [2017-04-06 12:11:40,014] {sequential_executor.py:26} INFO - Executing 
> command: airflow run Test_SubDAG.SubDagOp SubDAG_Task1 2017-04-03T00:00:00 
> --local -sd DAGS_FOLDER/tricky_test_3.py 
> [2017-04-06 12:11:46,176] {jobs.py:934} INFO - Task instance 
> ('Test_SubDAG.SubDagOp', 'SubDAG_Task1', datetime.datetime(2017, 4, 3, 0, 0)) 
> succeeded
> [2017-04-06 12:11:46,176] {jobs.py:997} INFO - [backfill progress] | waiting: 
> 1 | succeeded: 1 | kicked_off: 1 | failed: 0 | skipped: 0 | deadlocked: 0
> [2017-04-06 12:11:46,185] {base_executor.py:36} INFO - Adding to queue: 
> airflow run Test_SubDAG.SubDagOp SubDAG_Task2 2017-04-03T00:00:00 --local -sd 
> DAGS_FOLDER/tricky_test_3.py 
> [2017-04-06 12:11:46,195] {sequential_executor.py:26} INFO - Executing 
> command: airflow run Test_SubDAG.SubDagOp SubDAG_Task2 2017-04-03T00:00:00 
> --local -sd DAGS_FOLDER/tricky_test_3.py 
> [2017-04-06 12:11:52,177] {jobs.py:934} INFO - Task instance 
> ('Test_SubDAG.SubDagOp', 'SubDAG_Task2', datetime.datetime(2017, 4, 3, 0, 0)) 
> succeeded
> [2017-04-06 12:11:52,177] {jobs.py:997} INFO - [backfill progress] | waiting: 
> 0 | succeeded: 2 | kicked_off: 2 | failed: 0 | skipped: 0 | deadlocked: 0
> [2017-04-06 12:11:52,178] {jobs.py:1026} INFO - Backfill done. Exiting.
> {noformat}
> And here in v1.8.0
> {noformat}
> [2017-04-05 16:17:51,854] {models.py:167} INFO - Filling up the DagBag from 
> /usr/local/airflow/dags/tricky_test_3.py
> [2017-04-05 16:17:51,996] {base_task_runner.py:112} INFO - Running: ['bash', 
> '-c', u'airflow run Test_SubDAG SubDagOp 2017-04-04T00:00:00 --job_id 9987 
> --raw -sd DAGS_FOLDER/tricky_test_3.py']
> [2017-04-05 16:17:52,803] {base_task_runner.py:95} INFO - Subtask: 
> [2017-04-05 16:17:52,803] {__init__.py:57} INFO - Using executor 
> CeleryExecutor
> [2017-04-05 16:17:52,917] {base_task_runner.py:95} INFO - Subtask: 
> [2017-04-05 16:17:52,917] {driver.py:120} INFO - Generating grammar tables 
> from /usr/lib/python2.7/lib2to3/Grammar.txt
> [2017-04-05 16:17:52,957] {base_task_runner.py:95} INFO - Subtask: 
> [2017-04-05 16:17:52,956] {driver.py:120} INFO - Generating grammar tables 
> from /usr/lib/python2.7/lib2to3/PatternGrammar.txt
> [2017-04-05 16:17:53,262] {base_task_runner.py:95} INFO - Subtask: 
> [2017-04-05 16:17:53,262] {models.py:167} INFO - Filling up the DagBag from 
> /usr/local/airflow/dags/tricky_test_3.py
> [2017-04-05 16:17:53,401] {base_task_runner.py:95} INFO - Subtask: 
> [2017-04-05 16:17:53,400] {models.py:1126} INFO - Dependencies all met for 
> 
> [2017-04-05 16:17:53,409] {base_task_runner.py:95} INFO - Subtask: 
> [2017-04-05 16:17:53,409] {models.py:1126} INFO