Add date and value filters to Backfills UI API#70151
Open
Phinhas214 wants to merge 3 commits into
Open
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contributors' Guide
|
Phinhas214
commented
Jul 21, 2026
| def list_backfills_ui( | ||
| limit: QueryLimit, | ||
| offset: QueryOffset, | ||
| start_date_range: Annotated[RangeFilter, Depends(datetime_range_filter_factory("from_date", Backfill))], |
Author
There was a problem hiding this comment.
start_date/end_dateare exposed as public filter names, butBackfillhas no columns
with those literal names. The underlying columns arefrom_date/to_date.- Used
datetime_range_filter_factory'sattribute_nameargument to map the public-facing name to
the real column, so the API surface matches whatDagRunalready exposes without renaming
Backfill's columns.
Phinhas214
commented
Jul 21, 2026
| end_date_range: Annotated[RangeFilter, Depends(datetime_range_filter_factory("to_date", Backfill))], | ||
| created_at: Annotated[RangeFilter, Depends(datetime_range_filter_factory("created_at", Backfill))], | ||
| completed_at: Annotated[RangeFilter, Depends(datetime_range_filter_factory("completed_at", Backfill))], | ||
| max_active_runs: Annotated[RangeFilter, Depends(float_range_filter_factory("max_active_runs", Backfill))], |
Author
There was a problem hiding this comment.
max_active_runs is implemented as a RangeFilter (via float_range_filter_factory) rather
than an exact-match FilterParam, since the issue frames it as diagnosing throttling
("more/fewer than N active runs"), which a range serves better than exact equality.
Phinhas214
force-pushed
the
backfills-ui-filters
branch
from
July 22, 2026 19:41
f733102 to
63e9af5
Compare
Phinhas214
marked this pull request as ready for review
July 24, 2026 17:10
Phinhas214
requested review from
bbovenzi,
bugraoz93,
choo121600,
ephraimbuddy,
guan404ming,
henry3260,
jason810496,
pierrejeambrun,
rawwar,
ryanahamilton,
shubhamraj-git and
vatsrahul1001
as code owners
July 24, 2026 17:10
Phinhas214
force-pushed
the
backfills-ui-filters
branch
from
July 24, 2026 20:06
1c7d9e9 to
c4fdc46
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #53049
Add date and value filters to the Backfills tab UI.
Adds 6 of the 8 filters requested in #53049 to the Backfills tab:
start_date,end_date,created_at,completed_at,reprocess_behavior, andmax_active_runs.The remaining 2 filters
durationandstatusare deliberately left out see "Open questions for reviewers" below.Before
After
backfill_filters_recording.mov
Open questions for reviewers
duration
Backfillhas nodurationcolumn.DagRunderives itsdurationfromend_date - start_datevia a dialect-awarehybrid_property, butBackfillhas neither ofthose columns. The closest fields are
created_at/completed_at. MirroringDagRun's pattern directly on those fields means a runningbackfill has
completed_at = NULL, soduration IS NULL, andNULLfails any SQLcomparison. This implementation would silently exclude every
currently running backfill, even though "surface long-running backfills" (the motivation for
durationfilter) should include ones still running in my opinon.now() - created_atwhencompleted_at IS NULL, so in-progress backfills still get aduration value. Would you like me to implement it that way, or handle it differently?
status
Backfillhas nostatuscolumn — onlyis_pausedandcompleted_at.list_backfills_uialready has a partial precedent (active, based oncompleted_at IS NULL) but this definition ofstatuswould only give us running vs. finished states.statusbuild on that directly, or does it need to look atassociated
DagRunstates (e.g: join out to childDagRunstates to support "failed" state?)Happy to follow up on duration/status once there's a direction.
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Sonnet 5) following the guidelines