Tegh25 commented on code in PR #70167:
URL: https://github.com/apache/airflow/pull/70167#discussion_r3693523063


##########
airflow-core/docs/core-concepts/dag-run.rst:
##########
@@ -138,20 +151,33 @@ then you will want to turn catchup off, which is the 
default setting or can be d
     )
 
 In the example above, if the Dag is picked up by the scheduler daemon on
-2016-01-02 at 6 AM, (or from the command line), a single Dag Run will be 
created
-with a data between 2016-01-01 and 2016-01-02, and the next one will be created
-just after midnight on the morning of 2016-01-03 with a data interval between
-2016-01-02 and 2016-01-03.
-
-Be aware that using a ``datetime.timedelta`` object as schedule can lead to a 
different behavior.
-In such a case, the single Dag Run created will cover data between 2016-01-01 
06:00 and
-2016-01-02 06:00 (one schedule interval ending now). For a more detailed 
description of the
-differences between a cron and a delta based schedule, take a look at the
-:ref:`timetables comparison <Differences between the cron and delta data 
interval timetables>`
-
-If the ``dag.catchup`` value had been ``True`` instead, the scheduler would 
have created a Dag Run
-for each completed interval between 2015-12-01 and 2016-01-02 (but not yet one 
for 2016-01-02,
-as that interval hasn't completed) and the scheduler will execute them 
sequentially.
+2016-01-02 at 6 AM (or from the command line), with the Airflow 3 default of
+:ref:`CronTriggerTimetable` for ``@daily`` and ``catchup=False``, the scheduler
+does **not** create runs for every midnight since ``start_date``. Instead it
+creates a single Dag run for the most recent applicable tick — midnight on
+**2016-01-02** — with ``data_interval_start`` and ``data_interval_end`` both
+equal to that trigger time. Because that ``run_after`` is already in the past,
+the run can start immediately. The following tick (midnight on 2016-01-03) is
+only created once that schedule time is reached.
+
+If instead the Dag used a data-interval timetable (for example
+:ref:`CronDataIntervalTimetable`, or ``[scheduler] 
create_cron_data_intervals=True``),
+the scheduler would immediately create a run for the most recently completed
+interval (2016-01-01 through 2016-01-02), and the next run would cover
+2016-01-02 through 2016-01-03 after that interval ends.
+
+Be aware that using a ``datetime.timedelta`` object as ``schedule`` follows the
+same default-vs-data-interval split via ``[scheduler] 
create_delta_data_intervals``.

Review Comment:
   Thanks for the feedback, I addressed the second point in this comment.
   
   On `[scheduler] create_delta_data_intervals`, I agree that today the 
timedelta branch of `_create_timetable` gates on `create_cron_data_intervals`, 
so the delta config is unused. To me that looked like a bug rather than 
intended behavior, which will be fixed in 
https://github.com/apache/airflow/pull/69869 after it merges. Therefore this 
doc update keeps documenting the config as what I believe is the intended 
switch and does not remove the advice.
   
   If you believe that this behavior is not a bug and should be documented as 
such, then I'll adjust the wording as you described. Let me know.



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