ferruzzi commented on code in PR #53215: URL: https://github.com/apache/airflow/pull/53215#discussion_r2208237035
########## airflow-core/src/airflow/models/dagrun.py: ########## @@ -1217,6 +1218,10 @@ def recalculate(self) -> _UnfinishedStates: msg="success", ) + if (deadline := dag.deadline) and isinstance(deadline.reference, DeadlineReference.TYPES.DAGRUN): + # The dagrun has succeeded, so the deadline is no longer needed. + Deadline.remove_deadlines(session=session, conditions={DagRun.run_id: self.run_id}) Review Comment: What happens when the next deadline type needs Asset.created_at or Job.start_date or whatever else we add in the future? Wrapping this in a kwargs-like dict felt like the most reasonable solution. -- 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-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org