uranusjr commented on code in PR #30125:
URL: https://github.com/apache/airflow/pull/30125#discussion_r1175838212
##########
airflow/models/taskinstance.py:
##########
@@ -317,11 +317,14 @@ def clear_task_instances(
)
dag_run_state = DagRunState(dag_run_state) # Validate the state value.
for dr in drs:
- dr.state = dag_run_state
- dr.start_date = timezone.utcnow()
- if dag_run_state == DagRunState.QUEUED:
- dr.last_scheduling_decision = None
- dr.start_date = None
+ # There is no need to reset anything in the middle of a running
DagRun.
+ # Only reset things for already finished runs.
Review Comment:
This needs to be a part of the docstring to describe what the function does.
And I don’t think it’s good enough to just say “there is no need”—why is there
no need?
--
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]