ashb commented on a change in pull request #18088:
URL: https://github.com/apache/airflow/pull/18088#discussion_r704502502
##########
File path: airflow/models/dag.py
##########
@@ -2690,15 +2819,27 @@ def dags_needing_dagruns(cls, session: Session):
return with_row_locks(query, of=cls, session=session,
**skip_locked(session=session))
def calculate_dagrun_date_fields(
- self, dag: DAG, most_recent_dag_run: Optional[pendulum.DateTime]
+ self,
+ dag: DAG,
+ most_recent_dag_run: Union[None, datetime, DataInterval],
) -> None:
"""
Calculate ``next_dagrun`` and `next_dagrun_create_after``
:param dag: The DAG object
:param most_recent_dag_run: DateTime of most recent run of this dag,
or none if not yet scheduled.
"""
- next_dagrun_info = dag.next_dagrun_info(most_recent_dag_run)
+ if isinstance(most_recent_dag_run, datetime):
+ warnings.warn(
+ "Passing a datetime to `DagModel.most_recent_dag_run` is
deprecated. "
Review comment:
```suggestion
"Passing a datetime to
`DagModel.calculate_dagrun_date_fields` is deprecated. "
```
--
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]