ashb commented on code in PR #23177:
URL: https://github.com/apache/airflow/pull/23177#discussion_r856543651
##########
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:
I _think_ this usage is specific to here, not sure it makes sense in
DAG.clear generally? (Caveat: end of a long week)
--
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]