You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/08/18 09:54:34 UTC

[GitHub] [airflow] ashb commented on a diff in pull request #25788: Properly check the existence of missing mapped TIs

ashb commented on code in PR #25788:
URL: https://github.com/apache/airflow/pull/25788#discussion_r948920787


##########
airflow/models/dagrun.py:
##########
@@ -1117,7 +1119,9 @@ def _revise_mapped_task_indexes(
             new_indexes[task] = range(new_length)
         missing_indexes: Dict[MappedOperator, Sequence[int]] = defaultdict(list)
         for k, v in existing_indexes.items():
-            missing_indexes.update({k: list(set(new_indexes[k]).difference(v))})
+            indexes = list(set(new_indexes[k]).difference(v))
+            if indexes:
+                missing_indexes.update({k: indexes})

Review Comment:
   ```suggestion
                   missing_indexes[k] = indexes
   ```
   I think



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

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