uranusjr opened a new pull request #18088:
URL: https://github.com/apache/airflow/pull/18088


   From https://github.com/apache/airflow/pull/17552#discussion_r697817943
   
   This modifies the `Timetable.next_dagrun_info()` to take the previous run's 
data interval instead of logical date. `DAG.next_dagrun_info()` is modified to 
accept `datetime | DataInterval | None` for compatibility, but the datetime 
form is deprecated. When receiving a datetime, a compatibility method 
`DAG.infer_automated_data_interval()` is called to reverse-infer the data 
interval from the logical date, which should work for all DAGs prior to AIP-39 
implementation.
   
   All code paths that need `DAG.infer_automated_data_interval()` become 
deprecated:
   
   * `DAG.following_schedule()`
   * `DAG.next_dagrun_info()` with a datetime argument
   * `DAG.create_dagrun()` without passing in a data interval
   * `DagModel.calculate_dagrun_date_fields()` with a datetime argument
   
   All existing usages of the newly deprecated code paths are rewritten to 
avoid triggering the deprecation warning, the most significant one being 
`DAG.following_schedule()`. Most of its usages are to calculate the end of the 
interval, replaced by `data_interval.end` instead (except those already 
deprecated, which continue to use `DAG.following_schedule()` to avoid any 
unintended change).
   
   For clarity, `Timetable.infer_data_interval()` is renamed to 
`Timetable.infer_manual_data_interval()`.
   
   Hopefully this is the last big thing we need to do before 2.2.
   


-- 
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]


Reply via email to