shahar1 commented on issue #50210:
URL: https://github.com/apache/airflow/issues/50210#issuecomment-2869136884

   I went over the code again in Airflow v2 (v3 is quite the same), and it 
seems that changing the existing behavior is not be as trivial - it might have 
been even an intended behavior, at least at the time mapped tasks were 
originally introduced.
   The current design prioritizes lazy evaluation of mapped tasks rather than 
querying the state of their mapped upstream(s), and it contains some heavy 
logic to support it (`get_relevant_upstream_map_indexes`). In my recent PR in 
this area, I had introduced a fix for premature evaluation of the "fast 
triggered" trigger rules (see #44937, `once_failed` included) - which 
technically makes all TIs of a specific upstream dependencies (otherwise, 
upcoming task is auto-skipped). Adjusting it to check the state of each 
upstream with the appropriate `map_index` might be more complicated.
   
   Some intermediate conclusions:
   1. We should think of better mechanism to combine trigger rules and mapped 
tasks (and refactor `trigger_rule_dep.py` accordingly).
   2. Following the above, the terminology "ONE_"/"NONE_" is confusing in the 
context mapped tasks in the current implementation. Renaming them to comply 
with a more flexible behavior should be done as part of a larger refactoring 
effort.
   
   @uranusjr, @dstandish - if you have any thoughts or ideas regarding this, 
feel free to share.


-- 
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-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to