diff --git a/task-sdk/src/airflow/sdk/definitions/dag.py b/task-sdk/src/airflow/sdk/definitions/dag.py index 479958b99d783..61268f16700a3 100644 --- a/task-sdk/src/airflow/sdk/definitions/dag.py +++ b/task-sdk/src/airflow/sdk/definitions/dag.py @@ -110,9 +110,7 @@ "fileloc", "template_searchpath", "last_loaded", - "schedule", - # TODO: Task-SDK: we should be hashing on timetable now, not schedule! - # "timetable", + "timetable", } ) diff --git a/task-sdk/src/airflow/sdk/definitions/timetables/simple.py b/task-sdk/src/airflow/sdk/definitions/timetables/simple.py index 3387cb3c386fd..7e00dcf9a0900 100644 --- a/task-sdk/src/airflow/sdk/definitions/timetables/simple.py +++ b/task-sdk/src/airflow/sdk/definitions/timetables/simple.py @@ -17,9 +17,12 @@ from __future__ import annotations +import attrs + from airflow.sdk.bases.timetable import BaseTimetable +@attrs.define class NullTimetable(BaseTimetable): """ Timetable that never schedules anything. @@ -30,6 +33,7 @@ class NullTimetable(BaseTimetable): can_be_scheduled = False +@attrs.define class OnceTimetable(BaseTimetable): """ Timetable that schedules the execution once as soon as possible. @@ -38,6 +42,7 @@ class OnceTimetable(BaseTimetable): """ +@attrs.define class ContinuousTimetable(BaseTimetable): """ Timetable that schedules continually, while still respecting start_date and end_date.