Lee-W commented on code in PR #68718:
URL: https://github.com/apache/airflow/pull/68718#discussion_r3453050252


##########
airflow-core/src/airflow/timetables/trigger.py:
##########
@@ -494,16 +495,16 @@ def iter_partition_dagrun_infos(
         final tiebreaker).  Setting ``run_after = partition_date`` is the 
simplest
         correct choice and avoids the need for a reverse mapping.
 
-        :param earliest_date: inclusive lower bound calendar date; the UTC 
window start is
-            ``resolve_day_bound(earliest_date)``, i.e. local midnight of that 
day.
-        :param latest_date: inclusive upper bound calendar date; the UTC 
window end is
-            ``resolve_day_bound(latest_date + 1 day)`` (exclusive), so all 
ticks within
-            ``latest_date``'s local day are included.
+        :param earliest: inclusive lower bound on ``partition_date``; 
iteration starts at
+            the first cron tick at or after it (``_align_to_next``).
+        :param latest: inclusive upper bound on ``partition_date``; the tick 
equal to it
+            is included.
+
+        Both bounds must be timezone-aware; a naive datetime is coerced to UTC.
         """
-        earliest_partition_date = self.resolve_day_bound(earliest_date)
-        latest_partition_date = self.resolve_day_bound(latest_date + 
timedelta(days=1))
-        current = self._align_to_next(earliest_partition_date)
-        while current < latest_partition_date:
+        current = self._align_to_next(coerce_datetime(earliest))
+        latest_dt = coerce_datetime(latest)
+        while current <= latest_dt:

Review Comment:
   The bounds now localize the wall-clock into the timetable timezone before 
`_align_to_next`, so a UTC-midnight `--from-date` is treated as the 
timetable-local day. That matches the existing 
`--partition-date-start`/`--partition-date-end` convention (which resolves the 
date in the Dag's timetable tz), just without the day-floor that would kill 
sub-day windows.



-- 
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]

Reply via email to