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/05/12 09:46:50 UTC
[GitHub] [airflow] ephraimbuddy opened a new pull request, #23667: Fix mapped task immutability after clear
ephraimbuddy opened a new pull request, #23667:
URL: https://github.com/apache/airflow/pull/23667
We should be able to detect if the structure of mapped task has changed
and verify the integrity.
This PR is an attempt to fix it
--
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
[GitHub] [airflow] uranusjr commented on a diff in pull request #23667: Fix mapped task immutability after clear
Posted by GitBox <gi...@apache.org>.
uranusjr commented on code in PR #23667:
URL: https://github.com/apache/airflow/pull/23667#discussion_r885293374
##########
airflow/models/dagrun.py:
##########
@@ -928,11 +932,26 @@ def expand_mapped_literals(task: "Operator") -> Tuple["Operator", Sequence[int]]
)
if not count:
return (task, (-1,))
+ if sequence:
+ return (task, sequence)
return (task, range(count))
tasks_and_map_idxs = map(expand_mapped_literals, filter(task_filter, dag.task_dict.values()))
tasks = itertools.chain.from_iterable(itertools.starmap(creator, tasks_and_map_idxs))
+ # Check if we have some missing indexes to create ti for
+ missing_indexes: Dict["MappedOperator", list] = defaultdict(list)
+ [
+ missing_indexes.update({k: list(set(expected_indexes[k]) - set(v))})
+ for k, v in existing_indexes.items()
+ ]
Review Comment:
```suggestion
for k, v in existing_indexes.items():
missing_indexes.update({k: list(set(expected_indexes[k]).difference(v))})
```
More Pythonic IMO.
--
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
[GitHub] [airflow] uranusjr commented on pull request #23667: Fix mapped task immutability after clear
Posted by GitBox <gi...@apache.org>.
uranusjr commented on PR #23667:
URL: https://github.com/apache/airflow/pull/23667#issuecomment-1139269129
This needs some docstrings and comments to explain why and when the logic is needed and what do they do.
--
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
[GitHub] [airflow] ephraimbuddy merged pull request #23667: Fix mapped task immutability after clear
Posted by GitBox <gi...@apache.org>.
ephraimbuddy merged PR #23667:
URL: https://github.com/apache/airflow/pull/23667
--
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
[GitHub] [airflow] uranusjr commented on a diff in pull request #23667: Fix mapped task immutability after clear
Posted by GitBox <gi...@apache.org>.
uranusjr commented on code in PR #23667:
URL: https://github.com/apache/airflow/pull/23667#discussion_r883261822
##########
airflow/models/dagrun.py:
##########
@@ -640,15 +640,9 @@ def task_instance_scheduling_decisions(self, session: Session = NEW_SESSION) ->
tis = list(self.get_task_instances(session=session, state=State.task_states))
self.log.debug("number of tis tasks for %s: %s task(s)", self, len(tis))
dag = self.get_dag()
- for ti in tis:
- try:
- ti.task = dag.get_task(ti.task_id)
- except TaskNotFound:
- self.log.warning(
- "Failed to get task '%s' for dag '%s'. Marking it as removed.", ti, ti.dag_id
- )
- ti.state = State.REMOVED
- session.flush()
+
+ if self.should_verify_integrity(dag, tis, session=session):
Review Comment:
Should this check be a part of `verify_integrity`?
--
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
[GitHub] [airflow] ephraimbuddy commented on a diff in pull request #23667: Fix mapped task immutability after clear
Posted by GitBox <gi...@apache.org>.
ephraimbuddy commented on code in PR #23667:
URL: https://github.com/apache/airflow/pull/23667#discussion_r883298741
##########
airflow/models/dagrun.py:
##########
@@ -863,7 +859,8 @@ def verify_integrity(self, session: Session = NEW_SESSION):
else:
self.log.info("Restoring mapped task '%s'", ti)
Stats.incr(f"task_restored_to_dag.{dag.dag_id}", 1, 1)
- ti.state = State.NONE
+ existing_indexes[task].append(ti.map_index)
+ expected_indexes[task] = list(range(num_mapped_tis))
Review Comment:
I don’t think so. One is `expected_indexes` while the other is `existing_indexes`. Maybe I’m missing something?
--
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
[GitHub] [airflow] uranusjr commented on a diff in pull request #23667: Fix mapped task immutability after clear
Posted by GitBox <gi...@apache.org>.
uranusjr commented on code in PR #23667:
URL: https://github.com/apache/airflow/pull/23667#discussion_r885299173
##########
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
+ except TaskNotFound:
+ self.log.error("Failed to get task '%s' for dag '%s'. Marking it as removed.", ti, ti.dag_id)
+
+ ti.state = State.REMOVED
+ session.flush()
+ continue
+ if not task.is_mapped:
+ continue
+ # skip unexpanded tasks and also tasks that expands with literal arguments
+ if ti.map_index < 0 or task.parse_time_mapped_ti_count:
+ continue
+ existing_indexes[task].append(ti.map_index)
+ task.run_time_mapped_ti_count.cache_clear()
+ new_length = task.run_time_mapped_ti_count(self.run_id, session=session) or 0
+ new_indexes.update({task: list(range(new_length))})
+ missing_indexes: Dict["MappedOperator", list] = defaultdict(list)
+ [missing_indexes.update({k: list(set(new_indexes[k]) - set(v))}) for k, v in existing_indexes.items()]
+ return len(missing_indexes.values()) > 0
Review Comment:
Since we need to calculate `missing_indexes` again in `verify_integrity`, some refactoring is likely available/needed. There seems to be some duplicated work done in the two functions, really.
Setting `ti.state` in this function also seems to be a red flag; a function checking things should not have side effects.
--
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
[GitHub] [airflow] uranusjr commented on a diff in pull request #23667: Fix mapped task immutability after clear
Posted by GitBox <gi...@apache.org>.
uranusjr commented on code in PR #23667:
URL: https://github.com/apache/airflow/pull/23667#discussion_r885290410
##########
airflow/models/dagrun.py:
##########
@@ -863,7 +859,8 @@ def verify_integrity(self, session: Session = NEW_SESSION):
else:
self.log.info("Restoring mapped task '%s'", ti)
Stats.incr(f"task_restored_to_dag.{dag.dag_id}", 1, 1)
- ti.state = State.NONE
+ existing_indexes[task].append(ti.map_index)
+ expected_indexes.update({task: list(range(num_mapped_tis))})
Review Comment:
```suggestion
expected_indexes[task] = list(range(num_mapped_tis))
```
Same for the one below.
--
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
[GitHub] [airflow] uranusjr commented on a diff in pull request #23667: Fix mapped task immutability after clear
Posted by GitBox <gi...@apache.org>.
uranusjr commented on code in PR #23667:
URL: https://github.com/apache/airflow/pull/23667#discussion_r895469430
##########
airflow/models/dagrun.py:
##########
@@ -824,9 +819,16 @@ def verify_integrity(self, session: Session = NEW_SESSION):
hook_is_noop = getattr(task_instance_mutation_hook, 'is_noop', False)
dag = self.get_dag()
- task_ids = self._check_for_removed_or_restored_tasks(
- dag, task_instance_mutation_hook, session=session
- )
+ task_ids = set()
Review Comment:
```suggestion
task_ids: Set[str] = set()
```
--
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
[GitHub] [airflow] ephraimbuddy commented on pull request #23667: Fix mapped task immutability after clear
Posted by GitBox <gi...@apache.org>.
ephraimbuddy commented on PR #23667:
URL: https://github.com/apache/airflow/pull/23667#issuecomment-1145939989
> The general logic seems right to me, but the implementation is quite messy; this is probably due to `verify_integrity` is already messy to begin with. We should clean up the logic around here.
I have refactored the code. Please take a look https://github.com/apache/airflow/pull/24114
--
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
[GitHub] [airflow] ephraimbuddy commented on a diff in pull request #23667: Fix mapped task immutability after clear
Posted by GitBox <gi...@apache.org>.
ephraimbuddy commented on code in PR #23667:
URL: https://github.com/apache/airflow/pull/23667#discussion_r884496343
##########
airflow/models/dagrun.py:
##########
@@ -640,15 +640,9 @@ def task_instance_scheduling_decisions(self, session: Session = NEW_SESSION) ->
tis = list(self.get_task_instances(session=session, state=State.task_states))
self.log.debug("number of tis tasks for %s: %s task(s)", self, len(tis))
dag = self.get_dag()
- for ti in tis:
- try:
- ti.task = dag.get_task(ti.task_id)
- except TaskNotFound:
- self.log.warning(
- "Failed to get task '%s' for dag '%s'. Marking it as removed.", ti, ti.dag_id
- )
- ti.state = State.REMOVED
- session.flush()
+
+ if self.should_verify_integrity(dag, tis, session=session):
Review Comment:
I think it should not be part of it. Running the verify integrity only when there're missing indexes would save time...
--
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
[GitHub] [airflow] ephraimbuddy commented on a diff in pull request #23667: Fix mapped task immutability after clear
Posted by GitBox <gi...@apache.org>.
ephraimbuddy commented on code in PR #23667:
URL: https://github.com/apache/airflow/pull/23667#discussion_r883298741
##########
airflow/models/dagrun.py:
##########
@@ -863,7 +859,8 @@ def verify_integrity(self, session: Session = NEW_SESSION):
else:
self.log.info("Restoring mapped task '%s'", ti)
Stats.incr(f"task_restored_to_dag.{dag.dag_id}", 1, 1)
- ti.state = State.NONE
+ existing_indexes[task].append(ti.map_index)
+ expected_indexes[task] = list(range(num_mapped_tis))
Review Comment:
I don’t think so. One is `expected_indexes` while the other is `existing_indexes`. Maybe I’m missing something?
--
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
[GitHub] [airflow] uranusjr commented on a diff in pull request #23667: Fix mapped task immutability after clear
Posted by GitBox <gi...@apache.org>.
uranusjr commented on code in PR #23667:
URL: https://github.com/apache/airflow/pull/23667#discussion_r883262037
##########
airflow/models/dagrun.py:
##########
@@ -863,7 +859,8 @@ def verify_integrity(self, session: Session = NEW_SESSION):
else:
self.log.info("Restoring mapped task '%s'", ti)
Stats.incr(f"task_restored_to_dag.{dag.dag_id}", 1, 1)
- ti.state = State.NONE
+ existing_indexes[task].append(ti.map_index)
+ expected_indexes[task] = list(range(num_mapped_tis))
Review Comment:
The second line seems to overwrite the first?
--
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
[GitHub] [airflow] uranusjr commented on a diff in pull request #23667: Fix mapped task immutability after clear
Posted by GitBox <gi...@apache.org>.
uranusjr commented on code in PR #23667:
URL: https://github.com/apache/airflow/pull/23667#discussion_r883262152
##########
airflow/models/dagrun.py:
##########
@@ -885,6 +882,11 @@ def verify_integrity(self, session: Session = NEW_SESSION):
)
ti.state = State.REMOVED
...
+ else:
+ self.log.info("Restoring mapped task '%s'", ti)
+ Stats.incr(f"task_restored_to_dag.{dag.dag_id}", 1, 1)
+ existing_indexes[task].append(ti.map_index)
+ expected_indexes[task] = list(range(total_length))
Review Comment:
Same here.
--
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
[GitHub] [airflow] uranusjr commented on a diff in pull request #23667: Fix mapped task immutability after clear
Posted by GitBox <gi...@apache.org>.
uranusjr commented on code in PR #23667:
URL: https://github.com/apache/airflow/pull/23667#discussion_r885289904
##########
airflow/models/dagrun.py:
##########
@@ -823,6 +817,8 @@ def verify_integrity(self, session: Session = NEW_SESSION):
# check for removed or restored tasks
task_ids = set()
+ existing_indexes: Dict["MappedOperator", list] = defaultdict(list)
+ expected_indexes: Dict["MappedOperator", list] = defaultdict(list)
Review Comment:
```suggestion
existing_indexes: Dict["MappedOperator", List[int]] = defaultdict(list)
expected_indexes: Dict["MappedOperator", List[int]] = defaultdict(list)
```
The same annotation can be made to other changes in this PR.
--
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
[GitHub] [airflow] github-actions[bot] commented on pull request #23667: Fix mapped task immutability after clear
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #23667:
URL: https://github.com/apache/airflow/pull/23667#issuecomment-1153643685
The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease.
--
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
[GitHub] [airflow] ephraimbuddy commented on pull request #23667: Fix mapped task immutability after clear
Posted by GitBox <gi...@apache.org>.
ephraimbuddy commented on PR #23667:
URL: https://github.com/apache/airflow/pull/23667#issuecomment-1154897010
Seems there's a flaky test:
```
tests/models/test_dagrun.py::test_mapped_literal_length_reduction_adds_removed_state: AssertionError: assert [(2, 'removed...e), (1, None)] == [(0, None), (...: 'removed'>)]
At index 0 diff: (2, 'removed') != (0, None)
Use -v to get the full diff
Error: Process completed with exit code 1.
```
Will look at it later
--
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
[GitHub] [airflow] uranusjr commented on a diff in pull request #23667: Fix mapped task immutability after clear
Posted by GitBox <gi...@apache.org>.
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] uranusjr commented on a diff in pull request #23667: Fix mapped task immutability after clear
Posted by GitBox <gi...@apache.org>.
uranusjr commented on code in PR #23667:
URL: https://github.com/apache/airflow/pull/23667#discussion_r885291843
##########
airflow/models/dagrun.py:
##########
@@ -823,6 +817,8 @@ def verify_integrity(self, session: Session = NEW_SESSION):
# check for removed or restored tasks
task_ids = set()
+ existing_indexes: Dict["MappedOperator", list] = defaultdict(list)
+ expected_indexes: Dict["MappedOperator", list] = defaultdict(list)
Review Comment:
Or I think we can make `expected_indexes` take `Dict["MappedOperator", Sequence[int]]]` instead so we don’t need to convert `range` to `list`?
--
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
[GitHub] [airflow] uranusjr commented on pull request #23667: Fix mapped task immutability after clear
Posted by GitBox <gi...@apache.org>.
uranusjr commented on PR #23667:
URL: https://github.com/apache/airflow/pull/23667#issuecomment-1141773195
The general logic seems right to me, but the implementation is quite messy; this is probably due to `verify_integrity` is already messy to begin with. We should clean up the logic around here.
--
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
[GitHub] [airflow] ephraimbuddy commented on a diff in pull request #23667: Fix mapped task immutability after clear
Posted by GitBox <gi...@apache.org>.
ephraimbuddy commented on code in PR #23667:
URL: https://github.com/apache/airflow/pull/23667#discussion_r883310323
##########
airflow/models/dagrun.py:
##########
@@ -863,7 +859,8 @@ def verify_integrity(self, session: Session = NEW_SESSION):
else:
self.log.info("Restoring mapped task '%s'", ti)
Stats.incr(f"task_restored_to_dag.{dag.dag_id}", 1, 1)
- ti.state = State.NONE
+ existing_indexes[task].append(ti.map_index)
+ expected_indexes[task] = list(range(num_mapped_tis))
Review Comment:
Got it. My thinking was that the length won’t change for task instances of a mapped task. I’ve thought of updating but it seems no need. 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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] ephraimbuddy commented on pull request #23667: Fix mapped task immutability after clear
Posted by GitBox <gi...@apache.org>.
ephraimbuddy commented on PR #23667:
URL: https://github.com/apache/airflow/pull/23667#issuecomment-1131439505
Ready for review while I add the remaining test
--
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
[GitHub] [airflow] norm commented on pull request #23667: Fix mapped task immutability after clear
Posted by GitBox <gi...@apache.org>.
norm commented on PR #23667:
URL: https://github.com/apache/airflow/pull/23667#issuecomment-1154913888
It's Postgres 14 each time (whereas pg10 passes) so it's possibly some quirk in return format? Or it is exposing a bug :)
--
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
[GitHub] [airflow] uranusjr commented on a diff in pull request #23667: Fix mapped task immutability after clear
Posted by GitBox <gi...@apache.org>.
uranusjr commented on code in PR #23667:
URL: https://github.com/apache/airflow/pull/23667#discussion_r885290410
##########
airflow/models/dagrun.py:
##########
@@ -863,7 +859,8 @@ def verify_integrity(self, session: Session = NEW_SESSION):
else:
self.log.info("Restoring mapped task '%s'", ti)
Stats.incr(f"task_restored_to_dag.{dag.dag_id}", 1, 1)
- ti.state = State.NONE
+ existing_indexes[task].append(ti.map_index)
+ expected_indexes.update({task: list(range(num_mapped_tis))})
Review Comment:
```suggestion
expected_indexes[task] = list(range(num_mapped_tis))
```
--
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
[GitHub] [airflow] uranusjr commented on a diff in pull request #23667: Fix mapped task immutability after clear
Posted by GitBox <gi...@apache.org>.
uranusjr commented on code in PR #23667:
URL: https://github.com/apache/airflow/pull/23667#discussion_r885289904
##########
airflow/models/dagrun.py:
##########
@@ -823,6 +817,8 @@ def verify_integrity(self, session: Session = NEW_SESSION):
# check for removed or restored tasks
task_ids = set()
+ existing_indexes: Dict["MappedOperator", list] = defaultdict(list)
+ expected_indexes: Dict["MappedOperator", list] = defaultdict(list)
Review Comment:
```suggestion
existing_indexes: Dict["MappedOperator", List[int]] = defaultdict(list)
expected_indexes: Dict["MappedOperator", List[int]] = defaultdict(list)
```
--
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