o-nikolas commented on code in PR #53215:
URL: https://github.com/apache/airflow/pull/53215#discussion_r2208807759


##########
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:
   Yeah that's fair. You could have different methods for each use case which 
assemble the correct conditions internally and then call some shared code for 
the actually processing of the conditions (basically what you have now). But, 
very fair if you want to push back on that. Not much internal logic is leaking 
here so it's somewhat of an academic nit.



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