CodingJonas opened a new issue #7885: Common tasks in downstream of multiple 
branches always set to skipped
URL: https://github.com/apache/airflow/issues/7885
 
 
   
   **Apache Airflow version**: 1.10.9
   
   
   **Environment**:
   
   - **OS**: Ubuntu 18.04
   - **Kernel**: 
   ```
   Linux DELL-5540-01 4.15.0-1076-oem #86-Ubuntu SMP Wed Mar 4 05:40:20 UTC 
2020 x86_64 x86_64 x86_64 GNU/Linux
   ```
   - **Others**: Running through docker-compose using the 
[puckel/docker-airflow](https://github.com/puckel/docker-airflow) image
   
   **What happened**:
   
   Two branches join into the same task at one point of their downstream. This 
joint task and all following ones will set to be skipped due to one of the two 
branches being skipped.
   
   **What you expected to happen**:
   
   No matter which branch is chosen, the joint downstream should never be 
skipped, since at least one of the branches will end up into this joint 
downstream.
   
   **How to reproduce it**:
   I followed the code of this issue 
([AIRFLOW-3823](https://issues.apache.org/jira/browse/AIRFLOW-3823)) since it 
was, as I understood it, exactly about my issue. It works as described in the 
issue, but choosing the other branch will cause the rest of the DAG to be 
skipped.
   
   ```
   import airflow
   from airflow.models import DAG
   from airflow.operators.dummy_operator import DummyOperator
   from airflow.operators.python_operator import BranchPythonOperator
   args = {"owner": "airflow", "start_date": airflow.utils.dates.days_ago(14)}
   dag = DAG(
    dag_id="branch_test",
    default_args=args,
    schedule_interval="0 0 * * *",
   )
   branch = BranchPythonOperator(task_id="branch", python_callable=lambda: 
"t4", dag=dag)
   t1 = DummyOperator(task_id="t1", dag=dag)
   t2 = DummyOperator(task_id="t2", dag=dag)
   t3 = DummyOperator(task_id="t3", dag=dag)
   t4 = DummyOperator(task_id="t4", dag=dag)
   t5 = DummyOperator(task_id="t5", dag=dag)
   branch >> t1 >> t2 >> t3 >> t4
   branch >> t4
   t4 >> t5
   ```
   
![screenshot](https://user-images.githubusercontent.com/15234763/77652671-e8bce280-6f6e-11ea-9680-3206d6c14d7c.png)
   
   
   You can include images using the .md sytle of
   ![alt text](http://url/to/img.png)
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to