dstandish commented on code in PR #34392:
URL: https://github.com/apache/airflow/pull/34392#discussion_r1342926763
##########
airflow/ti_deps/deps/trigger_rule_dep.py:
##########
@@ -381,6 +381,8 @@ def _evaluate_direct_relatives() -> Iterator[TIDepStatus]:
elif trigger_rule == TR.ALL_SKIPPED:
if success or failed:
new_state = TaskInstanceState.SKIPPED
+ elif upstream_done and upstream_failed:
+ new_state = TaskInstanceState.UPSTREAM_FAILED
Review Comment:
> I was watching the discussion and scratched my head a bit and also have no
clear opinion. I feel similar like the state model in
https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/tasks.html#task-instances
we might need to add a mapping table to how a task responds depending on
trigger rule and upstream dependencies.
Yeah, the question of whether the task runs or not I think is pretty clearly
documented in trigger rules docs. But the question of, when it doesn't run,
what will the end state be, don't think that is well documented if at all, and
could use some attention. Sometimes it's subject to a race condition -- e.g.
depends what the state of the first non-success is. Anyway, I think the fix in
this PR seems good to me.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]