You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by jo...@apache.org on 2024/01/11 04:19:05 UTC

(airflow) branch main updated: Add `exception` to templates ref list (#36656)

This is an automated email from the ASF dual-hosted git repository.

joshfell pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 798017886f Add `exception` to templates ref list (#36656)
798017886f is described below

commit 798017886fded57bda47f6a8965cbe13cc81455c
Author: Ho NgokChao <ng...@protonmail.com>
AuthorDate: Thu Jan 11 12:18:56 2024 +0800

    Add `exception` to templates ref list (#36656)
    
    * Update templates-ref.rst
    
    Add exception context variables to documentation so that it is easier for user to realise airflow provides this variable in failure context.
    
    * Fix typo
    
    * Update templates-ref.rst
    
    Remove extra white space that fails the static test
    
    ---------
    
    Co-authored-by: nho45 <nh...@gatech.edu>
---
 docs/apache-airflow/templates-ref.rst | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/docs/apache-airflow/templates-ref.rst b/docs/apache-airflow/templates-ref.rst
index 1c8f42e343..9184bdc770 100644
--- a/docs/apache-airflow/templates-ref.rst
+++ b/docs/apache-airflow/templates-ref.rst
@@ -41,6 +41,9 @@ Variable                                    Type                  Description
 ``{{ ds }}``                                str                   | The DAG run's logical date as ``YYYY-MM-DD``.
                                                                   | Same as ``{{ dag_run.logical_date | ds }}``.
 ``{{ ds_nodash }}``                         str                   Same as ``{{ dag_run.logical_date | ds_nodash }}``.
+``{{ exception }}``                         None | str |          | Error occurred while running task instance.
+                                            Exception             |
+                                            KeyboardInterrupt     |
 ``{{ ts }}``                                str                   | Same as ``{{ dag_run.logical_date | ts }}``.
                                                                   | Example: ``2018-01-01T00:00:00+00:00``.
 ``{{ ts_nodash_with_tz }}``                 str                   | Same as ``{{ dag_run.logical_date | ts_nodash_with_tz }}``.