Phinhas214 opened a new pull request, #70151:
URL: https://github.com/apache/airflow/pull/70151

   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`, and `max_active_runs`. 
`duration` and
   `status` are deliberately left out — see "Open questions for reviewers" 
below.
   
   ### Before
   
   <img width="1252" height="764" alt="Screenshot 2026-07-20 at 4 37 14 PM" 
src="https://github.com/user-attachments/assets/82544c5d-386c-416b-9d43-465f84c6ab29";
 />
   
   ### After
   
   
https://github.com/user-attachments/assets/406ba3b7-e6b4-4c54-850e-066172b48d4e
   
   ## Open questions for reviewers
   
   ### duration
   
   - **Motivation:** *Surfaces long-running backfills that may impact system 
performance*
   - `Backfill` has no `duration` column. `DagRun` derives its `duration` from
     `end_date - start_date` via a dialect-aware `hybrid_property`, but 
`Backfill` has neither of
     those columns. The closest fields are `created_at`/`completed_at`. 
Mirroring `DagRun`'s pattern directly on those fields means a running
     backfill has `completed_at = NULL`, so `duration IS NULL`, and `NULL` 
fails any SQL
     comparison. This implementation would silently exclude every
     currently running backfill, even though "surface long-running backfills" 
(the motivation for `duration` filter) should include ones still running in my 
opinon. 
   - One option: compute duration as
       `now() - created_at` when `completed_at IS NULL`, so in-progress 
backfills still get a
     duration value. Would you like me to implement it that way, or handle it 
differently?
   
   
   ### status
   - **Motivation:** *Surface failed or incomplete backfills*
   - similarly, `Backfill` has no `status` column — only `is_paused` and
     `completed_at`. `list_backfills_ui` already has a partial precedent 
(`active`, based on
     `completed_at IS NULL`) but this definition of `status` would only give us 
running vs. finished states. 
   - Should `status` build on that directly, or does it need to look at
     associated `DagRun` states (e.g: join out to child `DagRun` states 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?
   
   <!--
   If generative AI tooling has been used in the process of authoring this PR, 
please
   change below checkbox to `[X]` followed by the name of the tool, uncomment 
the "Generated-by".
   -->
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: Claude Code (Sonnet 5) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   


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