ashb commented on a change in pull request #18088:
URL: https://github.com/apache/airflow/pull/18088#discussion_r704500099
##########
File path: airflow/models/dag.py
##########
@@ -2150,15 +2273,22 @@ def create_dagrun(
"Creating DagRun needs either `run_id` or both `run_type` and
`execution_date`"
)
- if run_type == DagRunType.MANUAL and data_interval is None and
execution_date is not None:
- data_interval = self.timetable.infer_data_interval(
- run_after=timezone.coerce_datetime(execution_date),
+ logical_date = timezone.coerce_datetime(execution_date)
+ if data_interval is None and logical_date is not None:
+ warnings.warn(
+ "Calling `DAG.create_dagrun()` without an explicit data
interval is deprecated",
+ DeprecationWarning,
+ stacklevel=2,
Review comment:
```suggestion
stacklevel=3,
```
Because of the decorator.
(Oh how I wish decorators could handle this automatically for us)
--
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]