Skip to content

Fix airflow partitions clear date range for non-UTC partitioned timetables - #68460

Merged
Lee-W merged 1 commit into
apache:mainfrom
astronomer:fix-partitions-clear-timezone
Jun 15, 2026
Merged

Fix airflow partitions clear date range for non-UTC partitioned timetables#68460
Lee-W merged 1 commit into
apache:mainfrom
astronomer:fix-partitions-clear-timezone

Conversation

@Lee-W

@Lee-WLee-W commented Jun 12, 2026

Copy link
Copy Markdown
Member

Why

airflow dags clear in #67717 didn't consider the timetable's timezone.
Without this fix, a date-only input like "2026-02-19" is compared directly as UTC midnight, causing the run stored at 2026-02-18T16:00Z (local midnight in Asia/Taipei) to be silently missed or incorrectly included.

What

Resolve start/end bounds through the Dag timetable's timezone via resolve_day_bound. Switch from closed <= to half-open < upper range semantics.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: [Claude] following the guidelines


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@Lee-W
Lee-Wforce-pushed the fix-partitions-clear-timezone branch from 17d4f0e to f2cdaa7CompareJune 12, 2026 23:33
@Lee-WLee-W self-assigned this Jun 15, 2026
@Lee-WLee-W changed the title Fix airflow partitions clear date range for non-UTC partitioned timet…Fix airflow partitions clear date range for non-UTC partitioned timetablesJun 15, 2026
@Lee-W
Lee-Wforce-pushed the fix-partitions-clear-timezone branch from f2cdaa7 to 7095eddCompareJune 15, 2026 09:02
@Lee-W
Lee-W marked this pull request as ready for review June 15, 2026 09:04
@Lee-W
Lee-Wforce-pushed the fix-partitions-clear-timezone branch from 7095edd to b160f90CompareJune 15, 2026 09:04
…ables
Resolve start/end bounds through the Dag timetable's timezone via
`resolve_day_bound`, mirroring the fix applied to `airflow dags clear`
in apache#67717. Switch from closed `<=` to half-open `< upper` range semantics.
Without this fix, a date-only input like "2026-02-19" is compared directly
as UTC midnight, causing the run stored at 2026-02-18T16:00Z (local midnight
in Asia/Taipei) to be silently missed or incorrectly included.
@Lee-W
Lee-Wforce-pushed the fix-partitions-clear-timezone branch from b160f90 to f6e1b9bCompareJune 15, 2026 10:47
@Lee-W
Lee-W merged commit 6783f4f into apache:mainJun 15, 2026
72 checks passed
@Lee-W
Lee-W deleted the fix-partitions-clear-timezone branch June 15, 2026 11:59
pgagnon pushed a commit to pgagnon/airflow that referenced this pull request Jun 15, 2026
imrichardwu pushed a commit to imrichardwu/airflow that referenced this pull request Jun 16, 2026
dingo4dev pushed a commit to dingo4dev/airflow that referenced this pull request Jun 16, 2026
@vatsrahul1001vatsrahul1001 added this to the Airflow 3.3.0 milestone Jun 16, 2026
RulerChen pushed a commit to RulerChen/airflow that referenced this pull request Jun 16, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Lee-W@uranusjr@vatsrahul1001