ferruzzi commented on code in PR #70714:
URL: https://github.com/apache/airflow/pull/70714#discussion_r3817412404
##########
airflow-core/src/airflow/models/deadline.py:
##########
@@ -397,23 +415,14 @@ def deserialize_reference(cls, reference_data: dict):
class DagRunLogicalDateDeadline(BaseDeadlineReference):
"""A deadline that returns a DagRun's logical date."""
- required_kwargs = {"dag_id", "run_id"}
-
- def _evaluate_with(self, *, session: Session, **kwargs: Any) ->
datetime | None:
- from airflow.models import DagRun
-
- return _fetch_from_db(DagRun.logical_date, session=session,
**kwargs)
+ def _evaluate_with(self, *, session: Session, dagrun:
DeadlineDagRunProtocol) -> datetime | None:
Review Comment:
I'd keep it for your exact reasoning. This method gets inherited and
extended by user code plus and some internal places are hardcoding the
`session=session` so keeping it in the signature feels like the right call and
removing it feels like it would break user code.
--
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]