[bitnami/airflow] Task with Branch Operator is following both branch #29382
Labels
airflow
solved
stale
15 days without activity
tech-issues
The user has a technical issue about an application
triage
Triage is needed
Name and Version
github/airflow-8.9.0
What architecture are you using?
None
What steps will reproduce the bug?
create Airflow DAG with Task Branch operator like below
pre_check = BranchPythonOperator(task_id='pre_validlate',
python_callable=pre_validate_fn).
graph is below:
init_report >> pre_check >> data_extraction >> end
pre_check >> remove_table
The function of branch operator, pre_validate_fn will decide which branch to follow, the code is below:
follow_branch = 'data_extraction'
if not kwargs['param']['delta']:
follow_branch = ['data_extraction', 'remove_table']
print(follow_branch)
return follow_branch
In we dont set detla, then it will remove as well as go for extraction
In our case, if our input parameter is passed wit 'delta' as True even in that case, the condition is followed.
When such malfunctioned execution happens, the task remove_table is shown success in UI and table also deleted in logic. But the respective task_id=remove_table logs folder is not created under the relevant run_id folder.
Are you using any custom parameters or values?
No response
What is the expected behavior?
What do you see instead?
Additional information
NA
The text was updated successfully, but these errors were encountered: