From d9df9be913abb5d2204ea7dba59b10650d0033f7 Mon Sep 17 00:00:00 2001 From: Ajay Date: Wed, 14 Jan 2026 14:40:54 +0530 Subject: [PATCH 1/9] fix to fix-templates-doc-broken-links-60477 --- airflow-core/docs/templates-ref.rst | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/airflow-core/docs/templates-ref.rst b/airflow-core/docs/templates-ref.rst index c5f3df4dde6e4..2f028c3c608e6 100644 --- a/airflow-core/docs/templates-ref.rst +++ b/airflow-core/docs/templates-ref.rst @@ -44,13 +44,13 @@ Variable Type Description ``{{ exception }}`` None | str | | Error occurred while running task instance. Exception | KeyboardInterrupt | -``{{ prev_data_interval_start_success }}`` `pendulum.DateTime`_ | Start of the data interval of the prior successful :class:`~airflow.models.dagrun.DagRun`. +``{{ prev_data_interval_start_success }}`` `pendulum.DateTime`_ | Start of the data interval of the prior successful DagRun. | ``None`` | Added in version 2.2. -``{{ prev_data_interval_end_success }}`` `pendulum.DateTime`_ | End of the data interval of the prior successful :class:`~airflow.models.dagrun.DagRun`. +``{{ prev_data_interval_end_success }}`` `pendulum.DateTime`_ | End of the data interval of the prior successful DagRun. | ``None`` | Added in version 2.2. -``{{ prev_start_date_success }}`` `pendulum.DateTime`_ Start date from prior successful :class:`~airflow.models.dagrun.DagRun` (if available). +``{{ prev_start_date_success }}`` `pendulum.DateTime`_ Start date from prior successful DagRun (if available). | ``None`` -``{{ prev_end_date_success }}`` `pendulum.DateTime`_ End date from prior successful :class:`~airflow.models.dagrun.DagRun` (if available). +``{{ prev_end_date_success }}`` `pendulum.DateTime`_ End date from prior successful DagRun (if available). | ``None`` ``{{ start_date }}`` `pendulum.DateTime`_ Datetime of when current task has been started. ``{{ inlets }}`` list List of inlets declared on the task. @@ -58,11 +58,11 @@ Variable Type Description ``{{ outlets }}`` list List of outlets declared on the task. ``{{ outlet_events }}`` dict[str, ...] | Accessors to attach information to asset events that will be emitted by the current task. | See :doc:`Assets `. Added in version 2.10. -``{{ dag }}`` DAG The currently running :class:`~airflow.models.dag.DAG`. You can read more about Dags in :doc:`Dags `. -``{{ task }}`` BaseOperator | The currently running :class:`~airflow.models.baseoperator.BaseOperator`. You can read more about Tasks in :doc:`core-concepts/operators` +``{{ dag }}`` DAG The currently running DAG. You can read more about Dags in :doc:`Dags `. +``{{ task }}`` BaseOperator | The currently running BaseOperator. You can read more about Tasks in :doc:`core-concepts/operators` ``{{ task_reschedule_count }}`` int How many times current task has been rescheduled. Relevant to ``mode="reschedule"`` sensors. ``{{ macros }}`` | A reference to the macros package. See Macros_ below. -``{{ task_instance }}`` TaskInstance The currently running :class:`~airflow.models.taskinstance.TaskInstance`. +``{{ task_instance }}`` TaskInstance The currently running TaskInstance. ``{{ ti }}`` TaskInstance Same as ``{{ task_instance }}``. ``{{ params }}`` dict[str, Any] | The user-defined params. This can be overridden by the mapping | passed to ``trigger_dag -c`` if ``dag_run_conf_overrides_params`` @@ -72,14 +72,14 @@ Variable Type Description ``{{ conn }}`` Airflow connections. See `Airflow Connections in Templates`_ below. ``{{ task_instance_key_str }}`` str | A unique, human-readable key to the task instance. The format is | ``{dag_id}__{task_id}__{ds_nodash}``. -``{{ run_id }}`` str The currently running :class:`~airflow.models.dagrun.DagRun` run ID. -``{{ dag_run }}`` DagRun The currently running :class:`~airflow.models.dagrun.DagRun`. +``{{ run_id }}`` str The currently running DagRun run ID. +``{{ dag_run }}`` DagRun The currently running DagRun. ``{{ test_mode }}`` bool Whether the task instance was run by the ``airflow test`` CLI. ``{{ map_index_template }}`` None | str Template used to render the expanded task instance of a mapped task. Setting this value will be reflected in the rendered result. ``{{ expanded_ti_count }}`` int | ``None`` | Number of task instances that a mapped task was expanded into. If | the current task is not mapped, this should be ``None``. | Added in version 2.5. -``{{ triggering_asset_events }}`` dict[str, | If in an Asset Scheduled Dag, a map of Asset URI to a list of triggering :class:`~airflow.models.asset.AssetEvent` +``{{ triggering_asset_events }}`` dict[str, | If in an Asset Scheduled Dag, a map of Asset URI to a list of triggering AssetEvent list[AssetEvent]] | (there may be more than one, if there are multiple Assets with different frequencies). | Read more here :doc:`Assets `. | Added in version 2.4. From 16e94a19a6a7e2269b953b2f1bee9881a942ad4e Mon Sep 17 00:00:00 2001 From: Ajay Date: Wed, 14 Jan 2026 15:20:03 +0530 Subject: [PATCH 2/9] removed plaintext fix --- airflow-core/docs/templates-ref.rst | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/airflow-core/docs/templates-ref.rst b/airflow-core/docs/templates-ref.rst index 2f028c3c608e6..c5f3df4dde6e4 100644 --- a/airflow-core/docs/templates-ref.rst +++ b/airflow-core/docs/templates-ref.rst @@ -44,13 +44,13 @@ Variable Type Description ``{{ exception }}`` None | str | | Error occurred while running task instance. Exception | KeyboardInterrupt | -``{{ prev_data_interval_start_success }}`` `pendulum.DateTime`_ | Start of the data interval of the prior successful DagRun. +``{{ prev_data_interval_start_success }}`` `pendulum.DateTime`_ | Start of the data interval of the prior successful :class:`~airflow.models.dagrun.DagRun`. | ``None`` | Added in version 2.2. -``{{ prev_data_interval_end_success }}`` `pendulum.DateTime`_ | End of the data interval of the prior successful DagRun. +``{{ prev_data_interval_end_success }}`` `pendulum.DateTime`_ | End of the data interval of the prior successful :class:`~airflow.models.dagrun.DagRun`. | ``None`` | Added in version 2.2. -``{{ prev_start_date_success }}`` `pendulum.DateTime`_ Start date from prior successful DagRun (if available). +``{{ prev_start_date_success }}`` `pendulum.DateTime`_ Start date from prior successful :class:`~airflow.models.dagrun.DagRun` (if available). | ``None`` -``{{ prev_end_date_success }}`` `pendulum.DateTime`_ End date from prior successful DagRun (if available). +``{{ prev_end_date_success }}`` `pendulum.DateTime`_ End date from prior successful :class:`~airflow.models.dagrun.DagRun` (if available). | ``None`` ``{{ start_date }}`` `pendulum.DateTime`_ Datetime of when current task has been started. ``{{ inlets }}`` list List of inlets declared on the task. @@ -58,11 +58,11 @@ Variable Type Description ``{{ outlets }}`` list List of outlets declared on the task. ``{{ outlet_events }}`` dict[str, ...] | Accessors to attach information to asset events that will be emitted by the current task. | See :doc:`Assets `. Added in version 2.10. -``{{ dag }}`` DAG The currently running DAG. You can read more about Dags in :doc:`Dags `. -``{{ task }}`` BaseOperator | The currently running BaseOperator. You can read more about Tasks in :doc:`core-concepts/operators` +``{{ dag }}`` DAG The currently running :class:`~airflow.models.dag.DAG`. You can read more about Dags in :doc:`Dags `. +``{{ task }}`` BaseOperator | The currently running :class:`~airflow.models.baseoperator.BaseOperator`. You can read more about Tasks in :doc:`core-concepts/operators` ``{{ task_reschedule_count }}`` int How many times current task has been rescheduled. Relevant to ``mode="reschedule"`` sensors. ``{{ macros }}`` | A reference to the macros package. See Macros_ below. -``{{ task_instance }}`` TaskInstance The currently running TaskInstance. +``{{ task_instance }}`` TaskInstance The currently running :class:`~airflow.models.taskinstance.TaskInstance`. ``{{ ti }}`` TaskInstance Same as ``{{ task_instance }}``. ``{{ params }}`` dict[str, Any] | The user-defined params. This can be overridden by the mapping | passed to ``trigger_dag -c`` if ``dag_run_conf_overrides_params`` @@ -72,14 +72,14 @@ Variable Type Description ``{{ conn }}`` Airflow connections. See `Airflow Connections in Templates`_ below. ``{{ task_instance_key_str }}`` str | A unique, human-readable key to the task instance. The format is | ``{dag_id}__{task_id}__{ds_nodash}``. -``{{ run_id }}`` str The currently running DagRun run ID. -``{{ dag_run }}`` DagRun The currently running DagRun. +``{{ run_id }}`` str The currently running :class:`~airflow.models.dagrun.DagRun` run ID. +``{{ dag_run }}`` DagRun The currently running :class:`~airflow.models.dagrun.DagRun`. ``{{ test_mode }}`` bool Whether the task instance was run by the ``airflow test`` CLI. ``{{ map_index_template }}`` None | str Template used to render the expanded task instance of a mapped task. Setting this value will be reflected in the rendered result. ``{{ expanded_ti_count }}`` int | ``None`` | Number of task instances that a mapped task was expanded into. If | the current task is not mapped, this should be ``None``. | Added in version 2.5. -``{{ triggering_asset_events }}`` dict[str, | If in an Asset Scheduled Dag, a map of Asset URI to a list of triggering AssetEvent +``{{ triggering_asset_events }}`` dict[str, | If in an Asset Scheduled Dag, a map of Asset URI to a list of triggering :class:`~airflow.models.asset.AssetEvent` list[AssetEvent]] | (there may be more than one, if there are multiple Assets with different frequencies). | Read more here :doc:`Assets `. | Added in version 2.4. From b30cdf003a620addc1b45f0689075fcf446abe22 Mon Sep 17 00:00:00 2001 From: Ajay Date: Wed, 14 Jan 2026 15:40:11 +0530 Subject: [PATCH 3/9] fixed issue --- airflow-core/docs/templates-ref.rst | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/airflow-core/docs/templates-ref.rst b/airflow-core/docs/templates-ref.rst index c5f3df4dde6e4..b624fe88687f5 100644 --- a/airflow-core/docs/templates-ref.rst +++ b/airflow-core/docs/templates-ref.rst @@ -44,13 +44,13 @@ Variable Type Description ``{{ exception }}`` None | str | | Error occurred while running task instance. Exception | KeyboardInterrupt | -``{{ prev_data_interval_start_success }}`` `pendulum.DateTime`_ | Start of the data interval of the prior successful :class:`~airflow.models.dagrun.DagRun`. +``{{ prev_data_interval_start_success }}`` `pendulum.DateTime`_ | Start of the data interval of the prior successful :py:obj:`airflow.models.dagrun.DagRun`. | ``None`` | Added in version 2.2. -``{{ prev_data_interval_end_success }}`` `pendulum.DateTime`_ | End of the data interval of the prior successful :class:`~airflow.models.dagrun.DagRun`. +``{{ prev_data_interval_end_success }}`` `pendulum.DateTime`_ | End of the data interval of the prior successful :py:obj:`airflow.models.dagrun.DagRun`. | ``None`` | Added in version 2.2. -``{{ prev_start_date_success }}`` `pendulum.DateTime`_ Start date from prior successful :class:`~airflow.models.dagrun.DagRun` (if available). +``{{ prev_start_date_success }}`` `pendulum.DateTime`_ Start date from prior successful :py:obj:`airflow.models.dagrun.DagRun` (if available). | ``None`` -``{{ prev_end_date_success }}`` `pendulum.DateTime`_ End date from prior successful :class:`~airflow.models.dagrun.DagRun` (if available). +``{{ prev_end_date_success }}`` `pendulum.DateTime`_ End date from prior successful :py:obj:`airflow.models.dagrun.DagRun` (if available). | ``None`` ``{{ start_date }}`` `pendulum.DateTime`_ Datetime of when current task has been started. ``{{ inlets }}`` list List of inlets declared on the task. @@ -58,11 +58,11 @@ Variable Type Description ``{{ outlets }}`` list List of outlets declared on the task. ``{{ outlet_events }}`` dict[str, ...] | Accessors to attach information to asset events that will be emitted by the current task. | See :doc:`Assets `. Added in version 2.10. -``{{ dag }}`` DAG The currently running :class:`~airflow.models.dag.DAG`. You can read more about Dags in :doc:`Dags `. -``{{ task }}`` BaseOperator | The currently running :class:`~airflow.models.baseoperator.BaseOperator`. You can read more about Tasks in :doc:`core-concepts/operators` +``{{ dag }}`` DAG The currently running :py:obj:`airflow.models.dag.DAG`. You can read more about Dags in :doc:`Dags `. +``{{ task }}`` BaseOperator | The currently running :py:obj:`airflow.models.baseoperator.BaseOperator`. You can read more about Tasks in :doc:`core-concepts/operators` ``{{ task_reschedule_count }}`` int How many times current task has been rescheduled. Relevant to ``mode="reschedule"`` sensors. ``{{ macros }}`` | A reference to the macros package. See Macros_ below. -``{{ task_instance }}`` TaskInstance The currently running :class:`~airflow.models.taskinstance.TaskInstance`. +``{{ task_instance }}`` TaskInstance The currently running :py:obj:`airflow.models.taskinstance.TaskInstance`. ``{{ ti }}`` TaskInstance Same as ``{{ task_instance }}``. ``{{ params }}`` dict[str, Any] | The user-defined params. This can be overridden by the mapping | passed to ``trigger_dag -c`` if ``dag_run_conf_overrides_params`` @@ -72,14 +72,14 @@ Variable Type Description ``{{ conn }}`` Airflow connections. See `Airflow Connections in Templates`_ below. ``{{ task_instance_key_str }}`` str | A unique, human-readable key to the task instance. The format is | ``{dag_id}__{task_id}__{ds_nodash}``. -``{{ run_id }}`` str The currently running :class:`~airflow.models.dagrun.DagRun` run ID. -``{{ dag_run }}`` DagRun The currently running :class:`~airflow.models.dagrun.DagRun`. +``{{ run_id }}`` str The currently running :py:obj:`airflow.models.dagrun.DagRun` run ID. +``{{ dag_run }}`` DagRun The currently running :py:obj:`airflow.models.dagrun.DagRun`. ``{{ test_mode }}`` bool Whether the task instance was run by the ``airflow test`` CLI. ``{{ map_index_template }}`` None | str Template used to render the expanded task instance of a mapped task. Setting this value will be reflected in the rendered result. ``{{ expanded_ti_count }}`` int | ``None`` | Number of task instances that a mapped task was expanded into. If | the current task is not mapped, this should be ``None``. | Added in version 2.5. -``{{ triggering_asset_events }}`` dict[str, | If in an Asset Scheduled Dag, a map of Asset URI to a list of triggering :class:`~airflow.models.asset.AssetEvent` +``{{ triggering_asset_events }}`` dict[str, | If in an Asset Scheduled Dag, a map of Asset URI to a list of triggering :py:obj:`airflow.models.asset.AssetEvent` list[AssetEvent]] | (there may be more than one, if there are multiple Assets with different frequencies). | Read more here :doc:`Assets `. | Added in version 2.4. From bb231ee7b44040f9cc9ef6096131519001b96a3a Mon Sep 17 00:00:00 2001 From: Ajay Date: Wed, 14 Jan 2026 21:48:13 +0530 Subject: [PATCH 4/9] used :py:class: instead of :py:obj: --- airflow-core/docs/templates-ref.rst | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/airflow-core/docs/templates-ref.rst b/airflow-core/docs/templates-ref.rst index b624fe88687f5..aded20a65a94e 100644 --- a/airflow-core/docs/templates-ref.rst +++ b/airflow-core/docs/templates-ref.rst @@ -44,13 +44,13 @@ Variable Type Description ``{{ exception }}`` None | str | | Error occurred while running task instance. Exception | KeyboardInterrupt | -``{{ prev_data_interval_start_success }}`` `pendulum.DateTime`_ | Start of the data interval of the prior successful :py:obj:`airflow.models.dagrun.DagRun`. +``{{ prev_data_interval_start_success }}`` `pendulum.DateTime`_ | Start of the data interval of the prior successful :py:class:`airflow.models.dagrun.DagRun`. | ``None`` | Added in version 2.2. -``{{ prev_data_interval_end_success }}`` `pendulum.DateTime`_ | End of the data interval of the prior successful :py:obj:`airflow.models.dagrun.DagRun`. +``{{ prev_data_interval_end_success }}`` `pendulum.DateTime`_ | End of the data interval of the prior successful :py:class:`airflow.models.dagrun.DagRun`. | ``None`` | Added in version 2.2. -``{{ prev_start_date_success }}`` `pendulum.DateTime`_ Start date from prior successful :py:obj:`airflow.models.dagrun.DagRun` (if available). +``{{ prev_start_date_success }}`` `pendulum.DateTime`_ Start date from prior successful :py:class:`airflow.models.dagrun.DagRun` (if available). | ``None`` -``{{ prev_end_date_success }}`` `pendulum.DateTime`_ End date from prior successful :py:obj:`airflow.models.dagrun.DagRun` (if available). +``{{ prev_end_date_success }}`` `pendulum.DateTime`_ End date from prior successful :py:class:`airflow.models.dagrun.DagRun` (if available). | ``None`` ``{{ start_date }}`` `pendulum.DateTime`_ Datetime of when current task has been started. ``{{ inlets }}`` list List of inlets declared on the task. @@ -58,11 +58,11 @@ Variable Type Description ``{{ outlets }}`` list List of outlets declared on the task. ``{{ outlet_events }}`` dict[str, ...] | Accessors to attach information to asset events that will be emitted by the current task. | See :doc:`Assets `. Added in version 2.10. -``{{ dag }}`` DAG The currently running :py:obj:`airflow.models.dag.DAG`. You can read more about Dags in :doc:`Dags `. -``{{ task }}`` BaseOperator | The currently running :py:obj:`airflow.models.baseoperator.BaseOperator`. You can read more about Tasks in :doc:`core-concepts/operators` +``{{ dag }}`` DAG The currently running :py:class:`airflow.models.dag.DAG`. You can read more about Dags in :doc:`Dags `. +``{{ task }}`` BaseOperator | The currently running :py:class:`airflow.models.baseoperator.BaseOperator`. You can read more about Tasks in :doc:`core-concepts/operators` ``{{ task_reschedule_count }}`` int How many times current task has been rescheduled. Relevant to ``mode="reschedule"`` sensors. ``{{ macros }}`` | A reference to the macros package. See Macros_ below. -``{{ task_instance }}`` TaskInstance The currently running :py:obj:`airflow.models.taskinstance.TaskInstance`. +``{{ task_instance }}`` TaskInstance The currently running :py:class:`airflow.models.taskinstance.TaskInstance`. ``{{ ti }}`` TaskInstance Same as ``{{ task_instance }}``. ``{{ params }}`` dict[str, Any] | The user-defined params. This can be overridden by the mapping | passed to ``trigger_dag -c`` if ``dag_run_conf_overrides_params`` @@ -72,14 +72,14 @@ Variable Type Description ``{{ conn }}`` Airflow connections. See `Airflow Connections in Templates`_ below. ``{{ task_instance_key_str }}`` str | A unique, human-readable key to the task instance. The format is | ``{dag_id}__{task_id}__{ds_nodash}``. -``{{ run_id }}`` str The currently running :py:obj:`airflow.models.dagrun.DagRun` run ID. -``{{ dag_run }}`` DagRun The currently running :py:obj:`airflow.models.dagrun.DagRun`. +``{{ run_id }}`` str The currently running :py:class:`airflow.models.dagrun.DagRun` run ID. +``{{ dag_run }}`` DagRun The currently running :py:class:`airflow.models.dagrun.DagRun`. ``{{ test_mode }}`` bool Whether the task instance was run by the ``airflow test`` CLI. ``{{ map_index_template }}`` None | str Template used to render the expanded task instance of a mapped task. Setting this value will be reflected in the rendered result. ``{{ expanded_ti_count }}`` int | ``None`` | Number of task instances that a mapped task was expanded into. If | the current task is not mapped, this should be ``None``. | Added in version 2.5. -``{{ triggering_asset_events }}`` dict[str, | If in an Asset Scheduled Dag, a map of Asset URI to a list of triggering :py:obj:`airflow.models.asset.AssetEvent` +``{{ triggering_asset_events }}`` dict[str, | If in an Asset Scheduled Dag, a map of Asset URI to a list of triggering :py:class:`airflow.models.asset.AssetEvent` list[AssetEvent]] | (there may be more than one, if there are multiple Assets with different frequencies). | Read more here :doc:`Assets `. | Added in version 2.4. From 68b65b69a09477012b2dbb518c8f881d1eb9d77d Mon Sep 17 00:00:00 2001 From: Ajay9704 Date: Wed, 25 Feb 2026 17:10:40 +0530 Subject: [PATCH 5/9] fixed ~ --- airflow-core/docs/templates-ref.rst | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/airflow-core/docs/templates-ref.rst b/airflow-core/docs/templates-ref.rst index fe69a8060eeaa..dcae3410370ed 100644 --- a/airflow-core/docs/templates-ref.rst +++ b/airflow-core/docs/templates-ref.rst @@ -63,13 +63,13 @@ Variable Type Description ``{{ exception }}`` None | str | | Error occurred while running task instance. Exception | KeyboardInterrupt | -``{{ prev_data_interval_start_success }}`` `pendulum.DateTime`_ | Start of the data interval of the prior successful :py:class:`airflow.models.dagrun.DagRun`. +``{{ prev_data_interval_start_success }}`` `pendulum.DateTime`_ | Start of the data interval of the prior successful :py:class:`~airflow.models.dagrun.DagRun`. | ``None`` | Added in version 2.2. -``{{ prev_data_interval_end_success }}`` `pendulum.DateTime`_ | End of the data interval of the prior successful :py:class:`airflow.models.dagrun.DagRun`. +``{{ prev_data_interval_end_success }}`` `pendulum.DateTime`_ | End of the data interval of the prior successful :py:class:`~airflow.models.dagrun.DagRun`. | ``None`` | Added in version 2.2. -``{{ prev_start_date_success }}`` `pendulum.DateTime`_ Start date from prior successful :py:class:`airflow.models.dagrun.DagRun` (if available). +``{{ prev_start_date_success }}`` `pendulum.DateTime`_ Start date from prior successful :py:class:`~airflow.models.dagrun.DagRun` (if available). | ``None`` -``{{ prev_end_date_success }}`` `pendulum.DateTime`_ End date from prior successful :py:class:`airflow.models.dagrun.DagRun` (if available). +``{{ prev_end_date_success }}`` `pendulum.DateTime`_ End date from prior successful :py:class:`~airflow.models.dagrun.DagRun` (if available). | ``None`` ``{{ start_date }}`` `pendulum.DateTime`_ Datetime of when current task has been started. ``{{ inlets }}`` list List of inlets declared on the task. @@ -77,11 +77,11 @@ Variable Type Description ``{{ outlets }}`` list List of outlets declared on the task. ``{{ outlet_events }}`` dict[str, ...] | Accessors to attach information to asset events that will be emitted by the current task. | See :doc:`Assets `. Added in version 2.10. -``{{ dag }}`` DAG The currently running :py:class:`airflow.models.dag.DAG`. You can read more about Dags in :doc:`Dags `. -``{{ task }}`` BaseOperator | The currently running :py:class:`airflow.models.baseoperator.BaseOperator`. You can read more about Tasks in :doc:`core-concepts/operators` +``{{ dag }}`` DAG The currently running :py:class:`~airflow.models.dag.DAG`. You can read more about Dags in :doc:`Dags `. +``{{ task }}`` BaseOperator | The currently running :py:class:`~airflow.models.baseoperator.BaseOperator`. You can read more about Tasks in :doc:`core-concepts/operators` ``{{ task_reschedule_count }}`` int How many times current task has been rescheduled. Relevant to ``mode="reschedule"`` sensors. ``{{ macros }}`` | A reference to the macros package. See Macros_ below. -``{{ task_instance }}`` TaskInstance The currently running :py:class:`airflow.models.taskinstance.TaskInstance`. +``{{ task_instance }}`` TaskInstance The currently running :py:class:`~airflow.models.taskinstance.TaskInstance`. ``{{ ti }}`` TaskInstance Same as ``{{ task_instance }}``. ``{{ params }}`` dict[str, Any] | The user-defined params. This can be overridden by the mapping | passed to ``trigger_dag -c`` if ``dag_run_conf_overrides_params`` @@ -93,14 +93,14 @@ Variable Type Description | | For time-based DAGs, the format is | ``{dag_id}__{task_id}__{ds_nodash}``. -``{{ run_id }}`` str The currently running :py:class:`airflow.models.dagrun.DagRun` run ID. -``{{ dag_run }}`` DagRun The currently running :py:class:`airflow.models.dagrun.DagRun`. +``{{ run_id }}`` str The currently running :py:class:`~airflow.models.dagrun.DagRun` run ID. +``{{ dag_run }}`` DagRun The currently running :py:class:`~airflow.models.dagrun.DagRun`. ``{{ test_mode }}`` bool Whether the task instance was run by the ``airflow test`` CLI. ``{{ map_index_template }}`` None | str Template used to render the expanded task instance of a mapped task. Setting this value will be reflected in the rendered result. ``{{ expanded_ti_count }}`` int | ``None`` | Number of task instances that a mapped task was expanded into. If | the current task is not mapped, this should be ``None``. | Added in version 2.5. -``{{ triggering_asset_events }}`` dict[str, | If in an Asset Scheduled Dag, a map of Asset URI to a list of triggering :py:class:`airflow.models.asset.AssetEvent` +``{{ triggering_asset_events }}`` dict[str, | If in an Asset Scheduled Dag, a map of Asset URI to a list of triggering :py:class:`~airflow.models.asset.AssetEvent` list[AssetEvent]] | (there may be more than one, if there are multiple Assets with different frequencies). | Read more here :doc:`Assets `. | Added in version 2.4. From f1b17561c556cb60e2b6fb6c8484d826b9e48957 Mon Sep 17 00:00:00 2001 From: Ajay9704 <162597283+Ajay9704@users.noreply.github.com> Date: Fri, 13 Mar 2026 17:27:47 +0530 Subject: [PATCH 6/9] Update templates-ref.rst --- airflow-core/docs/templates-ref.rst | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/airflow-core/docs/templates-ref.rst b/airflow-core/docs/templates-ref.rst index dcae3410370ed..ca4baacac0395 100644 --- a/airflow-core/docs/templates-ref.rst +++ b/airflow-core/docs/templates-ref.rst @@ -60,17 +60,15 @@ Variable Type Description ``{{ logical_date }}`` `pendulum.DateTime`_ | A date-time that logically identifies the current Dag run. This value does not contain any semantics, but is simply a value for identification. | Use ``data_interval_start`` and ``data_interval_end`` instead if you want a value that has real-world semantics, | such as to get a slice of rows from the database based on timestamps. -``{{ exception }}`` None | str | | Error occurred while running task instance. - Exception | - KeyboardInterrupt | +``{{ exception }}`` None | str | Exception| KeyboardInterrupt Error occurred while running task instance. ``{{ prev_data_interval_start_success }}`` `pendulum.DateTime`_ | Start of the data interval of the prior successful :py:class:`~airflow.models.dagrun.DagRun`. - | ``None`` | Added in version 2.2. + | ``None`` | Added in version 2.2. ``{{ prev_data_interval_end_success }}`` `pendulum.DateTime`_ | End of the data interval of the prior successful :py:class:`~airflow.models.dagrun.DagRun`. - | ``None`` | Added in version 2.2. -``{{ prev_start_date_success }}`` `pendulum.DateTime`_ Start date from prior successful :py:class:`~airflow.models.dagrun.DagRun` (if available). - | ``None`` -``{{ prev_end_date_success }}`` `pendulum.DateTime`_ End date from prior successful :py:class:`~airflow.models.dagrun.DagRun` (if available). - | ``None`` + | ``None`` | Added in version 2.2. +``{{ prev_start_date_success }}`` `pendulum.DateTime`_ | Start date from prior successful :py:class:`~airflow.models.dagrun.DagRun` (if available). + | ``None`` +``{{ prev_end_date_success }}`` `pendulum.DateTime`_ | End date from prior successful :py:class:`~airflow.models.dagrun.DagRun` (if available). + | ``None`` ``{{ start_date }}`` `pendulum.DateTime`_ Datetime of when current task has been started. ``{{ inlets }}`` list List of inlets declared on the task. ``{{ inlet_events }}`` dict[str, ...] Access past events of inlet assets. See :doc:`Assets `. Added in version 2.10. @@ -78,7 +76,7 @@ Variable Type Description ``{{ outlet_events }}`` dict[str, ...] | Accessors to attach information to asset events that will be emitted by the current task. | See :doc:`Assets `. Added in version 2.10. ``{{ dag }}`` DAG The currently running :py:class:`~airflow.models.dag.DAG`. You can read more about Dags in :doc:`Dags `. -``{{ task }}`` BaseOperator | The currently running :py:class:`~airflow.models.baseoperator.BaseOperator`. You can read more about Tasks in :doc:`core-concepts/operators` +``{{ task }}`` BaseOperator | The currently running :py:class:`~airflow.models.baseoperator.BaseOperator`. You can read more about Tasks in :doc:`core-concepts/operators`. ``{{ task_reschedule_count }}`` int How many times current task has been rescheduled. Relevant to ``mode="reschedule"`` sensors. ``{{ macros }}`` | A reference to the macros package. See Macros_ below. ``{{ task_instance }}`` TaskInstance The currently running :py:class:`~airflow.models.taskinstance.TaskInstance`. @@ -90,7 +88,6 @@ Variable Type Description ``{{ var.json }}`` Airflow variables. See `Airflow Variables in Templates`_ below. ``{{ conn }}`` Airflow connections. See `Airflow Connections in Templates`_ below. ``{{ task_instance_key_str }}`` str | A human-readable key to the task instance. - | | For time-based DAGs, the format is | ``{dag_id}__{task_id}__{ds_nodash}``. ``{{ run_id }}`` str The currently running :py:class:`~airflow.models.dagrun.DagRun` run ID. From 1072a712287cc5b25ba335c5a2e68ed70311eeba Mon Sep 17 00:00:00 2001 From: Ajay9704 <162597283+Ajay9704@users.noreply.github.com> Date: Fri, 13 Mar 2026 17:56:46 +0530 Subject: [PATCH 7/9] Update templates-ref.rst --- airflow-core/docs/templates-ref.rst | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/airflow-core/docs/templates-ref.rst b/airflow-core/docs/templates-ref.rst index ca4baacac0395..051aa69c04c72 100644 --- a/airflow-core/docs/templates-ref.rst +++ b/airflow-core/docs/templates-ref.rst @@ -1,3 +1,4 @@ + .. Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information @@ -39,7 +40,7 @@ uniquely identify a Dag run triggered by an asset event. The variables listed on this page are provided via Airflow's execution-time context. -When using the Task SDK, the same execution-time context is also available programmatically via the :class:`airflow.sdk.Context` object. +When using the Task SDK, the same execution-time context is also available programmatically via the :py:class:`airflow.sdk.Context` object. The following come for free out of the box with Airflow. Additional custom macros can be added globally through :doc:`administration-and-deployment/plugins`, or at a Dag level through the @@ -60,15 +61,15 @@ Variable Type Description ``{{ logical_date }}`` `pendulum.DateTime`_ | A date-time that logically identifies the current Dag run. This value does not contain any semantics, but is simply a value for identification. | Use ``data_interval_start`` and ``data_interval_end`` instead if you want a value that has real-world semantics, | such as to get a slice of rows from the database based on timestamps. -``{{ exception }}`` None | str | Exception| KeyboardInterrupt Error occurred while running task instance. +``{{ exception }}`` None | str | Error occurred while running task instance. Exception | KeyboardInterrupt ``{{ prev_data_interval_start_success }}`` `pendulum.DateTime`_ | Start of the data interval of the prior successful :py:class:`~airflow.models.dagrun.DagRun`. - | ``None`` | Added in version 2.2. + | ``None`` | Added in version 2.2. ``{{ prev_data_interval_end_success }}`` `pendulum.DateTime`_ | End of the data interval of the prior successful :py:class:`~airflow.models.dagrun.DagRun`. - | ``None`` | Added in version 2.2. + | ``None`` | Added in version 2.2. ``{{ prev_start_date_success }}`` `pendulum.DateTime`_ | Start date from prior successful :py:class:`~airflow.models.dagrun.DagRun` (if available). - | ``None`` -``{{ prev_end_date_success }}`` `pendulum.DateTime`_ | End date from prior successful :py:class:`~airflow.models.dagrun.DagRun` (if available). - | ``None`` + | ``None`` +``{{ prev_end_date_success }}`` `pendulum.DateTime`_ End date from prior successful :py:class:`~airflow.models.dagrun.DagRun` (if available). + | ``None`` ``{{ start_date }}`` `pendulum.DateTime`_ Datetime of when current task has been started. ``{{ inlets }}`` list List of inlets declared on the task. ``{{ inlet_events }}`` dict[str, ...] Access past events of inlet assets. See :doc:`Assets `. Added in version 2.10. @@ -76,7 +77,7 @@ Variable Type Description ``{{ outlet_events }}`` dict[str, ...] | Accessors to attach information to asset events that will be emitted by the current task. | See :doc:`Assets `. Added in version 2.10. ``{{ dag }}`` DAG The currently running :py:class:`~airflow.models.dag.DAG`. You can read more about Dags in :doc:`Dags `. -``{{ task }}`` BaseOperator | The currently running :py:class:`~airflow.models.baseoperator.BaseOperator`. You can read more about Tasks in :doc:`core-concepts/operators`. +``{{ task }}`` BaseOperator | The currently running :py:class:`~airflow.models.baseoperator.BaseOperator`. You can read more about Tasks in :doc:`core-concepts/operators` ``{{ task_reschedule_count }}`` int How many times current task has been rescheduled. Relevant to ``mode="reschedule"`` sensors. ``{{ macros }}`` | A reference to the macros package. See Macros_ below. ``{{ task_instance }}`` TaskInstance The currently running :py:class:`~airflow.models.taskinstance.TaskInstance`. @@ -88,8 +89,12 @@ Variable Type Description ``{{ var.json }}`` Airflow variables. See `Airflow Variables in Templates`_ below. ``{{ conn }}`` Airflow connections. See `Airflow Connections in Templates`_ below. ``{{ task_instance_key_str }}`` str | A human-readable key to the task instance. + | | For time-based DAGs, the format is | ``{dag_id}__{task_id}__{ds_nodash}``. + | + | For asset-triggered DAGs, the format uses the DAG run identifier instead: + | ``{dag_id}__{task_id}__{dag_run.run_id}``. ``{{ run_id }}`` str The currently running :py:class:`~airflow.models.dagrun.DagRun` run ID. ``{{ dag_run }}`` DagRun The currently running :py:class:`~airflow.models.dagrun.DagRun`. ``{{ test_mode }}`` bool Whether the task instance was run by the ``airflow test`` CLI. @@ -196,13 +201,13 @@ A few commonly used libraries and methods are made available. ================================= ======================================================================================================================================================================== Variable Description ================================= ======================================================================================================================================================================== -``macros.datetime`` The standard lib's :class:`datetime.datetime`. +``macros.datetime`` The standard lib's :py:class:`datetime.datetime`. Note: ``utcnow()`` is deprecated in Python 3.12+; use ``now(macros.dateutil.tz.UTC)`` instead. -``macros.timedelta`` The standard lib's :class:`datetime.timedelta` +``macros.timedelta`` The standard lib's :py:class:`datetime.timedelta` ``macros.dateutil`` A reference to the ``dateutil`` package ``macros.time`` The standard lib's :mod:`time` ``macros.uuid`` The standard lib's :mod:`uuid` -``macros.random`` The standard lib's :class:`random.random` +``macros.random`` The standard lib's :py:class:`random.random` ================================= ======================================================================================================================================================================== Some Airflow specific macros are also defined: From bb4cb6e79b237d0890f86864678445b729a0ab17 Mon Sep 17 00:00:00 2001 From: Ajay9704 <162597283+Ajay9704@users.noreply.github.com> Date: Fri, 13 Mar 2026 18:03:05 +0530 Subject: [PATCH 8/9] Update templates-ref.rst --- airflow-core/docs/templates-ref.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/airflow-core/docs/templates-ref.rst b/airflow-core/docs/templates-ref.rst index 051aa69c04c72..9b4c3fadb3383 100644 --- a/airflow-core/docs/templates-ref.rst +++ b/airflow-core/docs/templates-ref.rst @@ -1,4 +1,3 @@ - .. Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information @@ -61,7 +60,9 @@ Variable Type Description ``{{ logical_date }}`` `pendulum.DateTime`_ | A date-time that logically identifies the current Dag run. This value does not contain any semantics, but is simply a value for identification. | Use ``data_interval_start`` and ``data_interval_end`` instead if you want a value that has real-world semantics, | such as to get a slice of rows from the database based on timestamps. -``{{ exception }}`` None | str | Error occurred while running task instance. Exception | KeyboardInterrupt +``{{ exception }}`` None | str | | Error occurred while running task instance. + Exception | + KeyboardInterrupt | ``{{ prev_data_interval_start_success }}`` `pendulum.DateTime`_ | Start of the data interval of the prior successful :py:class:`~airflow.models.dagrun.DagRun`. | ``None`` | Added in version 2.2. ``{{ prev_data_interval_end_success }}`` `pendulum.DateTime`_ | End of the data interval of the prior successful :py:class:`~airflow.models.dagrun.DagRun`. From a584d9dfb1741bc232bff817f7165e46d3df71b0 Mon Sep 17 00:00:00 2001 From: Ajay9704 <162597283+Ajay9704@users.noreply.github.com> Date: Fri, 13 Mar 2026 18:34:36 +0530 Subject: [PATCH 9/9] Update templates-ref.rst --- airflow-core/docs/templates-ref.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/airflow-core/docs/templates-ref.rst b/airflow-core/docs/templates-ref.rst index 9b4c3fadb3383..ea2035a61846f 100644 --- a/airflow-core/docs/templates-ref.rst +++ b/airflow-core/docs/templates-ref.rst @@ -71,7 +71,6 @@ Variable Type Description | ``None`` ``{{ prev_end_date_success }}`` `pendulum.DateTime`_ End date from prior successful :py:class:`~airflow.models.dagrun.DagRun` (if available). | ``None`` -``{{ start_date }}`` `pendulum.DateTime`_ Datetime of when current task has been started. ``{{ inlets }}`` list List of inlets declared on the task. ``{{ inlet_events }}`` dict[str, ...] Access past events of inlet assets. See :doc:`Assets `. Added in version 2.10. ``{{ outlets }}`` list List of outlets declared on the task.