uranusjr commented on code in PR #36462:
URL: https://github.com/apache/airflow/pull/36462#discussion_r1540704810


##########
airflow/models/taskinstance.py:
##########
@@ -3371,6 +3371,10 @@ def tg2(inp):
         ancestor_ti_count = common_ancestor.get_mapped_ti_count(self.run_id, 
session=session)
         ancestor_map_index = self.map_index * ancestor_ti_count // ti_count
 
+        # The task has not been expanded yet. Let's help it.
+        if self.map_index == -1 and ti_count > 1:
+            return range(0, ancestor_ti_count)

Review Comment:
   Hmm, I’d prefer we don’t call this function for this case at all instead 
(i.e. try to ensure the task is expanded).
   
   Also this check is not correct. If `ti_count` is exactly 1 if the task is 
mapped (against a list of length 1).



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