uranusjr commented on code in PR #60016:
URL: https://github.com/apache/airflow/pull/60016#discussion_r2986093940
##########
airflow-core/src/airflow/models/taskinstance.py:
##########
@@ -2186,6 +2186,15 @@ def tg2(inp):
# between the ancestor and further expansion happened inside it.
ancestor_ti_count = get_mapped_ti_count(common_ancestor, run_id,
session=session)
+
+ # Special case: If both tasks are siblings in the same mapped task group
+ # (ti_count == ancestor_ti_count), they share the same map_index.
Review Comment:
I think there are probably some edge cases here? (like two different groups
but just happen to be expanded to the same count, or a nested expansion with
length of 1) But on the other hand it’s probably fine to skip some calculation?
(I did some mentally arithmatic and in those cases the end result should be
`range(map_index, map_index + 1)` anyway.
--
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]