steveahnahn commented on code in PR #72668:
URL: https://github.com/apache/airflow/pull/72668#discussion_r3981537859
##########
airflow-core/src/airflow/ti_deps/deps/trigger_rule_dep.py:
##########
@@ -318,9 +340,8 @@ def _evaluate_setup_constraint(
new_state = TaskInstanceState.UPSTREAM_FAILED
elif skipped:
new_state = TaskInstanceState.SKIPPED
- elif removed and success and ti.map_index > -1:
- if ti.map_index >= success:
- new_state = TaskInstanceState.REMOVED
+ # No REMOVED inference here: a task can only expand over a
direct upstream,
+ # and this branch counts indirect setups only.
Review Comment:
Added a literal-mapped downstream behind an indirect setup that shrank; it
fails with the inference restored as in your experiment.
##########
airflow-core/tests/unit/models/test_taskinstance.py:
##########
@@ -1246,8 +1246,8 @@ def test_check_task_dependencies(
["all_success", _UpstreamTIStates(2, 0, 0, 0, 0, 0, 0, 0), True,
None, False],
["all_success", _UpstreamTIStates(2, 0, 1, 0, 0, 0, 0, 0), True,
State.UPSTREAM_FAILED, False],
["all_success", _UpstreamTIStates(2, 1, 0, 0, 0, 0, 0, 0), True,
State.SKIPPED, False],
- # ti.map_index >= success
- ["all_success", _UpstreamTIStates(3, 0, 0, 0, 2, 0, 0, 0), True,
State.REMOVED, True],
+ # 1:1 mapped upstream shrank: map_index >= success once the
upstream is done
+ ["all_success", _UpstreamTIStates(3, 0, 0, 0, 2, 5, 0, 0), True,
State.REMOVED, True],
Review Comment:
Both rows kept; the done=0 row now pins that nothing is inferred before the
upstream completes.
--
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]