pierrejeambrun commented on code in PR #64740:
URL: https://github.com/apache/airflow/pull/64740#discussion_r3111569374
##########
airflow-core/docs/installation/upgrading_to_airflow3.rst:
##########
@@ -373,9 +373,54 @@ These include:
- ``execution_date``
- The ``catchup_by_default`` Dag parameter is now ``False`` by default.
- The ``create_cron_data_intervals`` configuration is now ``False`` by
default. This means that the ``CronTriggerTimetable`` will be used by default
instead of the ``CronDataIntervalTimetable``
+- **Manual DAG runs and data intervals**: In Airflow 3, do not assume that a
manually triggered DAG run's ``data_interval`` is derived from, or equal to,
the supplied ``logical_date``. If your DAG logic needs the user-specified
trigger date, use ``logical_date`` explicitly. This especially affects
workflows that read ``data_interval_start`` or ``data_interval_end`` during
manual triggering or when using ``TriggerDagRunOperator``. For detailed
migration guidance, see :ref:`data-interval-manual-triggering`.
- **Simple Auth** is now default ``auth_manager``. To continue using FAB as
the Auth Manager, please install the FAB provider and set ``auth_manager`` to
``FabAuthManager``:
.. code-block:: ini
airflow.providers.fab.auth_manager.fab_auth_manager.FabAuthManager
- **AUTH API** api routes defined in the auth manager are prefixed with the
``/auth`` route. Urls consumed outside of the application such as oauth
redirect urls will have to updated accordingly. For example an oauth redirect
url that was ``https://<your-airflow-url.com>/oauth-authorized/google`` in
Airflow 2.x will be
``https://<your-airflow-url.com>/auth/oauth-authorized/google`` in Airflow 3.x
+
+.. _data-interval-manual-triggering:
+
+Manual DAG Runs and ``logical_date``
+====================================
+
+For scheduled runs, ``logical_date`` and ``data_interval`` are both derived
from
+the DAG's timetable.
+
+For manually triggered runs in Airflow 3, do not assume that
+``data_interval_start`` or ``data_interval_end`` are derived from, or equal to,
+the supplied ``logical_date``. The resulting ``data_interval`` depends on the
+timetable and the trigger path, and some APIs also allow the data interval to
+be provided explicitly.
+
+This matters most for DAGs that:
+
+- use ``data_interval_start`` or ``data_interval_end`` during manual runs
+- trigger downstream DAGs with ``TriggerDagRunOperator``
+- migrated from Airflow 2 and treated ``data_interval_start`` as the requested
+ manual run date
+
+Migration guidance
+------------------
+
+If your DAG logic needs the user-specified date for a manual run, use
+``logical_date`` explicitly.
+
+.. code-block:: python
+
+ from airflow.decorators import get_current_context, task
+
Review Comment:
```suggestion
```
--
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]