Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions airflow-core/docs/templates-ref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ Variable Type Description
``{{ 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 :class:`~airflow.models.dagrun.DagRun` (if available).
| ``None``
``{{ start_date }}`` `pendulum.DateTime`_ Datetime of when current task has been started.
| ``None``
``{{ inlets }}`` list List of inlets declared on the task.
``{{ inlet_events }}`` dict[str, ...] Access past events of inlet assets. See :doc:`Assets <authoring-and-scheduling/asset-scheduling>`. Added in version 2.10.
``{{ outlets }}`` list List of outlets declared on the task.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def _compare_keys(retn_keys: set[str], hint_keys: set[str], docs_keys: set[str])
docs_keys.update(("exception", "reason", "try_number"))

# Airflow 3 added:
retn_keys.update(("start_date", "task_reschedule_count"))
retn_keys.add("task_reschedule_count")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what't the difference between add and update?


check_candidates = [
("get_template_context()", retn_keys),
Expand Down
1 change: 0 additions & 1 deletion task-sdk/src/airflow/sdk/definitions/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ class Context(TypedDict, total=False):
prev_end_date_success: NotRequired[DateTime | None]
reason: NotRequired[str | None]
run_id: str
start_date: DateTime | None
# TODO: Remove Operator from below once we have MappedOperator to the Task SDK
# and once we can remove context related code from the Scheduler/models.TaskInstance
task: BaseOperator | Operator
Expand Down