uranusjr commented on code in PR #23667:
URL: https://github.com/apache/airflow/pull/23667#discussion_r885294541
##########
airflow/models/dagrun.py:
##########
@@ -953,6 +972,37 @@ def expand_mapped_literals(task: "Operator") ->
Tuple["Operator", Sequence[int]]
# TODO[HA]: We probably need to savepoint this so we can keep the
transaction alive.
session.rollback()
+ def should_verify_integrity(self, dag, tis, *, session) -> bool:
+ """
+ Here we check if the length of the mapped task instances changed
+ at runtime. If so, we need to verify the integrity of the mapped
+ tasks.
+ """
+ existing_indexes: Dict["MappedOperator", list] = defaultdict(list)
+ new_indexes: Dict["MappedOperator", list] = defaultdict(list)
+ for ti in tis:
+ try:
+ ti.task = dag.get_task(ti.task_id)
+ task = ti.task
Review Comment:
```suggestion
task = ti.task = dag.get_task(ti.task_id)
```
--
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]