Lee-W commented on code in PR #67537:
URL: https://github.com/apache/airflow/pull/67537#discussion_r3382020336
##########
airflow-core/src/airflow/models/backfill.py:
##########
@@ -266,6 +298,51 @@ def _get_dag_run_no_create_reason(dr, reprocess_behavior:
ReprocessBehavior) ->
return non_create_reason
+def _validate_partition_window(
+ partition_date_start: datetime | None,
+ partition_date_end: datetime | None,
+) -> None:
+ """Raise ``InvalidPartitionWindow`` when start is strictly after end."""
+ if (
+ partition_date_start is not None
+ and partition_date_end is not None
+ and partition_date_start.date() > partition_date_end.date()
+ ):
+ raise InvalidPartitionWindow(
+ f"partition_date_start ({partition_date_start.date()}) must not be
after "
+ f"partition_date_end ({partition_date_end.date()})."
+ )
+
+
+def _resolve_backfill_window(
Review Comment:
I redesigned this rather than patching it: there's no longer a separate
partition-selector path or `from_date`/`to_date` rejection.Backfill now
auto-detects a partitioned timetable and treats the existing `--from-date` /
`--to-date` as the partition-date range (one run per partition), so the API/UI
just work — no 500. Added API, model, and timetable tests for the partitioned
case.
--
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]