Skip to content

[v3-2-test] Prevent AlreadyRunningBackfill error caused by invalid date range request (#66874) - #67250

Merged
bbovenzi merged 2 commits into
apache:v3-2-testfrom
choo121600:backport-66874-v3-2-test
May 21, 2026
Merged

[v3-2-test] Prevent AlreadyRunningBackfill error caused by invalid date range request (#66874)#67250
bbovenzi merged 2 commits into
apache:v3-2-testfrom
choo121600:backport-66874-v3-2-test

Conversation

@choo121600

@choo121600choo121600 commented May 20, 2026

Copy link
Copy Markdown
Member

When a backfill is requested with from_date after to_date, the Backfill record was committed before _get_info_list() returned an empty list, leaving an orphaned record that blocked subsequent backfills with AlreadyRunningBackfill until the scheduler's 2-minute cleanup ran.

Add an InvalidBackfillDateRange exception and validate from_date <= to_date at the top of _validate_backfill_params(), before any DB operations.

(cherry picked from commit 1536238)

#66874


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

  • 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.

apache#66865)
* Fix OTel timer metrics using Gauge instead of Histogram
* Use ExponentialBucketHistogramAggregation for timing metrics
* Use public API import path for ExponentialBucketHistogramAggregation and fix histogram map isolation
(cherry picked from commit b2dadd2)
Co-authored-by: namratachaudhary <namratachaudhary@users.noreply.github.com>
…te range request (apache#66874)
When a backfill is requested with from_date after to_date, the Backfill
record was committed before _get_info_list() returned an empty list, leaving
an orphaned record that blocked subsequent backfills with
AlreadyRunningBackfill until the scheduler's 2-minute cleanup ran.
Add an InvalidBackfillDateRange exception and validate from_date <= to_date
at the top of _validate_backfill_params(), before any DB operations.
(cherry picked from commit 1536238)
@vatsrahul1001
vatsrahul1001force-pushed the backport-66874-v3-2-test branch from 9712ec4 to 55fb2a0CompareMay 21, 2026 03:49
@bbovenzi
bbovenzi merged commit b6692ee into apache:v3-2-testMay 21, 2026
110 checks passed
@vatsrahul1001vatsrahul1001 added this to the Airflow 3.2.2 milestone May 25, 2026
@vatsrahul1001vatsrahul1001 added the type:bug-fix Changelog: Bug Fixes label May 25, 2026
vatsrahul1001 added a commit that referenced this pull request May 25, 2026
…te range request (#66874) (#67250)
* Fix OTel timer metrics using Gauge instead of Histogram (#64207) (#66865)
* Fix OTel timer metrics using Gauge instead of Histogram
* Use ExponentialBucketHistogramAggregation for timing metrics
* Use public API import path for ExponentialBucketHistogramAggregation and fix histogram map isolation
(cherry picked from commit b2dadd2)
Co-authored-by: namratachaudhary <namratachaudhary@users.noreply.github.com>
* [v3-2-test] Prevent AlreadyRunningBackfill error caused by invalid date range request (#66874)
When a backfill is requested with from_date after to_date, the Backfill
record was committed before _get_info_list() returned an empty list, leaving
an orphaned record that blocked subsequent backfills with
AlreadyRunningBackfill until the scheduler's 2-minute cleanup ran.
Add an InvalidBackfillDateRange exception and validate from_date <= to_date
at the top of _validate_backfill_params(), before any DB operations.
(cherry picked from commit 1536238)
---------
Co-authored-by: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com>
Co-authored-by: namratachaudhary <namratachaudhary@users.noreply.github.com>
Co-authored-by: Park Jiwon <57484954+david-parkk@users.noreply.github.com>
vatsrahul1001 added a commit that referenced this pull request May 25, 2026
…te range request (#66874) (#67250)
* Fix OTel timer metrics using Gauge instead of Histogram (#64207) (#66865)
* Fix OTel timer metrics using Gauge instead of Histogram
* Use ExponentialBucketHistogramAggregation for timing metrics
* Use public API import path for ExponentialBucketHistogramAggregation and fix histogram map isolation
(cherry picked from commit b2dadd2)
Co-authored-by: namratachaudhary <namratachaudhary@users.noreply.github.com>
* [v3-2-test] Prevent AlreadyRunningBackfill error caused by invalid date range request (#66874)
When a backfill is requested with from_date after to_date, the Backfill
record was committed before _get_info_list() returned an empty list, leaving
an orphaned record that blocked subsequent backfills with
AlreadyRunningBackfill until the scheduler's 2-minute cleanup ran.
Add an InvalidBackfillDateRange exception and validate from_date <= to_date
at the top of _validate_backfill_params(), before any DB operations.
(cherry picked from commit 1536238)
---------
Co-authored-by: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com>
Co-authored-by: namratachaudhary <namratachaudhary@users.noreply.github.com>
Co-authored-by: Park Jiwon <57484954+david-parkk@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:APIAirflow's REST/HTTP APItype:bug-fixChangelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@choo121600@bbovenzi@vatsrahul1001@david-parkk