You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "hussein-awala (via GitHub)" <gi...@apache.org> on 2023/09/27 18:43:19 UTC
[GitHub] [airflow] hussein-awala commented on a diff in pull request #34392: Mark tasks with `all_skipped` trigger rule as `skipped` if any task is in `upstream_failed` state
hussein-awala commented on code in PR #34392:
URL: https://github.com/apache/airflow/pull/34392#discussion_r1339053143
##########
airflow/ti_deps/deps/trigger_rule_dep.py:
##########
@@ -379,7 +379,7 @@ def _evaluate_direct_relatives() -> Iterator[TIDepStatus]:
if skipped:
new_state = TaskInstanceState.SKIPPED
elif trigger_rule == TR.ALL_SKIPPED:
- if success or failed:
+ if success or failed or upstream_failed:
new_state = TaskInstanceState.SKIPPED
Review Comment:
I think a better solution is to wait for a success or failed upstream to fast skip the TI, but if there is no upstream with this two states, all the upstream are done and at least one of them has upstream_failed status, we change the TI state to upstream_failed too:
```suggestion
if success or failed:
new_state = TaskInstanceState.SKIPPED
elif upstream_done and upstream_failed:
new_state = TaskInstanceState.UPSTREAM_FAILED
```
The reason for this suggestion is that we don't know the state of this upstream, maybe if when we run it, it will finish with skipped state.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org