ferruzzi commented on code in PR #70714:
URL: https://github.com/apache/airflow/pull/70714#discussion_r3884947214
##########
airflow-core/src/airflow/serialization/definitions/deadline.py:
##########
@@ -169,23 +155,14 @@ def deserialize_reference(cls, reference_data: dict):
class DagRunLogicalDateDeadline(SerializedBaseDeadlineReference):
"""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:
+ return dagrun.logical_date
Review Comment:
@imrichardwu
Sorry for the churn; I know you did exactly what I asked for but #71767
ended up covering those log messages at the call site instead, which is
arguably a better location and can include more useful information. That one
also needs to get merged before we can merge this one anyway.
Could you take both of these back to a bare return, matching the
`ReferenceModels` twins in `models/deadline.py`, and we'll let the other PR's
log message handle them?
Sorry again, I'm juggling a bunch of overlapping PRs and trying to make the
merge conflicts as seamless as I can.
--
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]