This is how my airflow dag looks like
There is a branch task which checks for a condition and then either :
Runs Task B directly, skipping task A or
Runs task A and then runs task B
When task A is skipped, in the next(future) run of the dag, branch task never runs(execution stops at main task) although default trigger rule is 'none_failed' and no task is failed in the dag only skipped.
default_args = {
'owner': 'airflow',
'depends_on_past': True,
'wait_for_downstream': True,
'email_on_failure': True,
'email_on_retry': False,
'retries': 1,
'retry_delay': timedelta(minutes=2),
'trigger_rule': 'none_failed'
}
dag = DAG(
dag_id='main_task',
default_args=default_args,
schedule_interval='0 2 * * *',
start_date=datetime(2021,6,2),
max_active_runs=8,
)
def check_condition():
if(conditionA == conditionB):
return ['task_A','task_B']
else :
return 'task_B'
branch_task = BranchPythonOperator(
task_id='branching',
python_callable=check_condition,
dag=dag,
depends_on_past=False,
)
Using Airflow 1.10.12. Could someone guide me why branch task never runs after task A is skipped in the past run.