-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Common tasks in downstream of multiple branches always set to skipped due to 'Not Previously Skipped' dependency #10686
Comments
Thanks for opening your first issue here! Be sure to follow the issue template! |
I do see similar change in behaviour for case all_done. The result This does sound like bug to me. Does anyone know? |
cc @yuqian90 |
Initial issue which seems to be fixed with AIRFLOW-4453 has been returned back (at least in 1.10.12) t_ready = DummyOperator(
task_id = 'calc_ready',
trigger_rule = 'none_failed',
dag=dag) Used version: 1.10.12 with KubernetesExecutor |
Another one example on 1.10.12 shows same behavior (join task skipping) for downstream tasks despite of any import datetime as dt
from airflow.models import DAG
from airflow.operators.dummy_operator import DummyOperator
from airflow.operators.latest_only_operator import LatestOnlyOperator
from airflow.utils.dates import days_ago
#from airflow.utils.trigger_rule import TriggerRule
dag = DAG(
dag_id='latest_only_with_trigger',
schedule_interval=dt.timedelta(hours=4),
start_date=days_ago(2),
tags=['example']
)
latest_only = LatestOnlyOperator(task_id='latest_only', dag=dag)
task0 = DummyOperator(task_id='task0', dag=dag)
task1 = DummyOperator(task_id='task1', dag=dag)
task2 = DummyOperator(task_id='task2', dag=dag)
task0 >> [task1, task2]
latest_only >> task1
tr_list = ['all_done', 'none_failed', 'none_failed_or_skipped']
for tr in tr_list:
taska = DummyOperator(dag=dag, task_id=f'taska_{tr}', trigger_rule=tr)
taskb = DummyOperator(task_id=f'taskb_{tr_list.index(tr)}', dag=dag)
taskc = DummyOperator(task_id=f'taskc_{tr_list.index(tr)}', dag=dag)
task1 >> [taska, taskb] >> taskc
task2 >> [taska, taskb] |
Anyhow behavior not corresponds with documentation |
Hi @KulykDmytro, the original issue reported in #10686 and #10725 has been fixed in #10751 and will be released in the release of airflow. I assume
|
Tested latest main branch with the reproduced code:
The This seems fine to me. |
This issue has been automatically marked as stale because it has been open for 30 days with no response from the author. It will be closed in next 7 days if no further activity occurs from the issue author. |
This issue has been closed because it has not received response from the issue author. |
Please note: This issue is very similar to #7885, but I think it caused by the new functionality Clearing tasks skipped by SkipMixin will skip them introduced in 1.10.12.
The problem is the same, but the solution (setting the trigger rule of the joined task to
none_failed
as described in the docs) stopped working after updating to 1.10.12Apache Airflow version: 1.10.12
What happened:
Two branches join into the same task at one point of their downstream. This joint task will set to be skipped due to one of the two branches being skipped.
Setting the trigger rule of the joined task to
none_failed
used to work (the task is executed after the chosen branch was executed), but after updating to 1.10.12 the task is always skipped.If the join task was selected, everything is fine:
What you expected to happen:
The joint task should be executed, although not chosen by the branch operator, because it is a downstream task of the chosen branch.
What do you think went wrong?:
If I look into the task instance details, I can see that the task was skipped "because of previous XCom result from parent task branching", listed as the "Not Previously Skipped" dependency.
I think that is related to the new functionality Clearing tasks skipped by SkipMixin will skip them introduced in 1.10.12, but I'm not sure whether this is a bug or I did something wrong.
How to reproduce it:
Has something changed in the functionality how downstream tasks are skipped or is this a bug in the new release?
The text was updated successfully, but these errors were encountered: