RehanAhmad25 commented on code in PR #76958:
URL: https://github.com/apache/airflow/pull/76958#discussion_r4584121130


##########
airflow-core/src/airflow/jobs/scheduler_job_runner.py:
##########
@@ -3256,6 +3256,12 @@ def _start_queued_dagruns(self, session: Session) -> 
None:
         def _update_state(dag: SerializedDAG, dag_run: DagRun):
             dag_run.state = DagRunState.RUNNING
             dag_run.start_date = timezone.utcnow()
+            if dag.deadline:
+                dag._process_dagrun_deadline_alerts(

Review Comment:
   When a failed `DagRun` is cleared and queued again, `clear_task_instances()` 
recalculates its queued-at deadlines but leaves any unmissed start-date 
deadline in place. This call then adds another deadline for the same run and 
alert with the new `start_date`. Could clearing a run remove or replace its 
unmissed start-date deadline? Otherwise, the old deadline can still fire while 
the run is queued or alongside the new deadline after it restarts.



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

Reply via email to