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/04/22 19:59:16 UTC

[GitHub] [airflow] jedcunningham commented on a diff in pull request #23177: When marking future tasks, ensure we don't touch other mapped TIs

jedcunningham commented on code in PR #23177:
URL: https://github.com/apache/airflow/pull/23177#discussion_r856531924


##########
airflow/models/dag.py:
##########
@@ -1649,25 +1649,15 @@ def set_task_instance_state(
         if not exactly_one(execution_date, run_id):
             raise ValueError("Exactly one of execution_date or run_id must be provided")
 
-        if execution_date is None:
-            dag_run = (
-                session.query(DagRun).filter(DagRun.run_id == run_id, DagRun.dag_id == self.dag_id).one()
-            )  # Raises an error if not found
-            resolve_execution_date = dag_run.execution_date
-        else:
-            resolve_execution_date = execution_date
-
         task = self.get_task(task_id)
         task.dag = self
 
         tasks_to_set_state: List[Union[Operator, Tuple[Operator, int]]]
-        task_ids_to_exclude_from_clear: Set[Union[str, Tuple[str, int]]]
+        task_ids_to_exclude_from_clear = {task_id}

Review Comment:
   Should we just do this in the subdag.clear instead now?



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