jroachgolf84 commented on code in PR #68326:
URL: https://github.com/apache/airflow/pull/68326#discussion_r3398718673
##########
airflow-core/src/airflow/timetables/base.py:
##########
@@ -143,8 +143,15 @@ class DagRunInfo(NamedTuple):
data_interval: DataInterval | None
"""The data interval this DagRun to operate over."""
- partition_date: DateTime | None
- partition_key: str | None
+ # partition_date/partition_key are for partition-oriented scheduling
(AIP-76).
+ # They default to None so custom timetables written for Airflow 3.1.x and
+ # earlier — which build DagRunInfo with only run_after and data_interval —
+ # keep working on 3.2+.
+ partition_date: DateTime | None = None
+ """The partition date for partition-oriented scheduling (AIP-76)."""
Review Comment:
Please remove these comments.
##########
airflow-core/src/airflow/timetables/base.py:
##########
@@ -143,8 +143,15 @@ class DagRunInfo(NamedTuple):
data_interval: DataInterval | None
"""The data interval this DagRun to operate over."""
- partition_date: DateTime | None
- partition_key: str | None
+ # partition_date/partition_key are for partition-oriented scheduling
(AIP-76).
+ # They default to None so custom timetables written for Airflow 3.1.x and
+ # earlier — which build DagRunInfo with only run_after and data_interval —
+ # keep working on 3.2+.
+ partition_date: DateTime | None = None
+ """The partition date for partition-oriented scheduling (AIP-76)."""
Review Comment:
```suggestion
```
##########
airflow-core/src/airflow/timetables/base.py:
##########
@@ -143,8 +143,15 @@ class DagRunInfo(NamedTuple):
data_interval: DataInterval | None
"""The data interval this DagRun to operate over."""
- partition_date: DateTime | None
- partition_key: str | None
+ # partition_date/partition_key are for partition-oriented scheduling
(AIP-76).
+ # They default to None so custom timetables written for Airflow 3.1.x and
+ # earlier — which build DagRunInfo with only run_after and data_interval —
+ # keep working on 3.2+.
+ partition_date: DateTime | None = None
+ """The partition date for partition-oriented scheduling (AIP-76)."""
+
+ partition_key: str | None = None
+ """The partition key for partition-oriented scheduling (AIP-76)."""
Review Comment:
```suggestion
```
##########
airflow-core/tests/unit/timetables/test_base_timetable.py:
##########
@@ -183,6 +183,47 @@ def
test_compute_rollup_fingerprint_key_format(asset_or_ref, expected_key):
assert expected_key in fp
+# ---------------------------------------------------------------------------
Review Comment:
Is this really backward compatibility?
--
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]