ephraimbuddy commented on code in PR #76420:
URL: https://github.com/apache/airflow/pull/76420#discussion_r4467804036


##########
airflow-core/src/airflow/models/dagrun.py:
##########
@@ -2378,12 +2378,10 @@ def _check_for_removed_or_restored_tasks(
                         producer_contexts=coordinates.producer_contexts(ti),
                     )
                 except NotFullyPopulated:
-                    # Not all upstreams finished, so we can't tell what should 
be here. Remove everything.
+                    # Not all upstreams finished, so the count isn't known 
yet. Keep the expanded
+                    # instances: _revise_map_indexes_if_mapped never brings 
back a removed index, but
+                    # trims or extends pending ones once the upstreams finish.

Review Comment:
   This is existing behaviour since #25788. The old path didn’t go through the 
-1 placeholder: clearing already marked 0 and 1 REMOVED, so 
`expand_mapped_task` never ran. A re-run that pushes `[] ` ends all REMOVED 
before and after this PR, the same as a plain clear on main, and 
`test_calls_to_verify_integrity_with_mapped_task_zero_length_at_runtime` 
asserts it. Changing it to SKIPPED would change what downstream tasks do after 
such a re-run, so I’ve kept it out of this PR.
   
   We can do it as a follow up. WDYT?



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