hussein-awala commented on code in PR #33570:
URL: https://github.com/apache/airflow/pull/33570#discussion_r1306478613


##########
airflow/ti_deps/deps/trigger_rule_dep.py:
##########
@@ -51,6 +52,7 @@ class _UpstreamTIStates(NamedTuple):
     done: int
     success_setup: int
     skipped_setup: int
+    failed_setup: int

Review Comment:
   For me there is 4 different cases:
   - running (all the unfinished states) -> we should wait
   - success -> we can run the task
   - failed (failed or upstream_failed) -> fail
   - skipped with any fail -> we should skipp
   So failed here includes failed and upstream_failed:
   ```python
           return _UpstreamTIStates(
               success=counter.get(TaskInstanceState.SUCCESS, 0),
               skipped=counter.get(TaskInstanceState.SKIPPED, 0),
               failed=counter.get(TaskInstanceState.FAILED, 0),
               upstream_failed=counter.get(TaskInstanceState.UPSTREAM_FAILED, 
0),
               removed=counter.get(TaskInstanceState.REMOVED, 0),
               done=sum(counter.values()),
               success_setup=setup_counter.get(TaskInstanceState.SUCCESS, 0),
               skipped_setup=setup_counter.get(TaskInstanceState.SKIPPED, 0),
               failed_setup=setup_counter.get(TaskInstanceState.FAILED, 0)
               + setup_counter.get(TaskInstanceState.UPSTREAM_FAILED, 0),
           )
   ```



-- 
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]

Reply via email to