uranusjr commented on code in PR #45370:
URL: https://github.com/apache/airflow/pull/45370#discussion_r1916031017
##########
airflow/models/dag.py:
##########
@@ -1727,86 +1727,63 @@ def add_logger_if_needed(ti: TaskInstance):
@provide_session
def create_dagrun(
self,
- state: DagRunState,
*,
- triggered_by: DagRunTriggeredByType | None,
- logical_date: datetime | None = None,
- run_id: str | None = None,
- start_date: datetime | None = None,
- external_trigger: bool | None = False,
+ run_id: str,
+ logical_date: datetime,
+ data_interval: tuple[datetime, datetime],
Review Comment:
Yes, I intentionally removed the None cases and require explicit values to
be passed in. Previous you can pass None for some of the values, and the
function magically infer the correct run_id and/or dates from various other
values.
This becomes very complicated when `logical_date` could actually intended to
be None (instead of just a marker to be inferred implicitly), so I moved the
inferring logic to where it’s actually needed instead (it is mostly only used
in tests).
--
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]