ferruzzi commented on code in PR #53215:
URL: https://github.com/apache/airflow/pull/53215#discussion_r2208842729
##########
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, I had considered using kwargs and filtering them out but it loked and
felt better explicitly using a parameter, and I feel the name itself fits, too.
The method call reads pretty straight forward as "prune deadlines using this
session which meet these conditions". If you're cool with it, I'll resolve
this one.
--
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]