The GitHub Actions job "Tests (AMD)" on 
airflow.git/fix/trigger-rule-placeholder-rewrite-68417 has failed.
Run started by GitHub user bujjibabukatta (triggered by bujjibabukatta).

Head commit for run:
a4637ea7096f5588b3a3c037487ec9f785649fb5 / = <[email protected]>
fix: prevent placeholder-to-index-0 rewrite in trigger-rule evaluation for 
summary TIs

PR #59691 added `_should_use_post_expansion_placeholder` to fix XCom
resolution when an upstream placeholder (map_index=-1) is replaced by its
first expanded instance (map_index=0). The rewrite correctly resolves the
downstream dependency for XCom/argument purposes, but also inadvertently
applied during trigger-rule evaluation of not-yet-expanded summary task
instances (map_index < 0) inside mapped task groups.

When a summary TI's trigger rule (e.g. ALL_SUCCESS) is evaluated after the
upstream has expanded but before the summary TI itself has expanded, the
rewrite narrows the relevant upstream set to only the first expanded instance
(index 0). A failure at index 0 then marks the summary TI as upstream_failed,
preventing expansion and causing every subsequent per-index instance to be
incorrectly upstream_failed.

Fix: in `trigger_rule_dep.py`, extend the existing summary-TI guard to also
cover non-fast-triggered rules for non-expansion-dep upstreams. For those
cases return `ti.map_index` (-1) directly, which points to the upstream
placeholder that no longer exists after expansion. The trigger rule therefore
sees no relevant instances and passes, allowing the summary TI to expand so
that each resulting instance is evaluated per-index.

Fast-triggered rules (ONE_SUCCESS / ONE_FAILED / ONE_DONE) continue to return
None (all instances relevant) so they can fire before expansion as before.

Fixes: #68417

Report URL: https://github.com/apache/airflow/actions/runs/27396134814

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to