Adds a new public API endpoint for backfill dag run entries - ` GET /backfills/{backfill_id}/dag_runs#67381
Adds a new public API endpoint for backfill dag run entries - ` GET /backfills/{backfill_id}/dag_runs#67381shivaam wants to merge 1 commit into
Conversation
|
@vatsrahul1001 tagging you since you mentioned you were planning to work on it. |
| select_stmt, total_entries = paginated_select( | ||
| statement=select(BackfillDagRun) | ||
| .where(BackfillDagRun.backfill_id == backfill_id) | ||
| .options(joinedload(BackfillDagRun.dag_run)), |
There was a problem hiding this comment.
joinedload issues a LEFT OUTER JOIN, preserving rows where dag_run_id is NULL (skipped slots).
|
@shivaam A few things need addressing before review — see our Pull Request quality criteria.
No rush. Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you. Drafted-by: Claude Code (Opus 4.7); reviewed by @potiuk before posting |
Adds a new public API endpoint that returns the BackfillDagRun entries for a given backfill with joined DagRun state. Users can see what happened in a backfill: which dates ran, their states (queued, running, success, failed), and which slots were skipped (with reason). - BackfillDagRunResponse / BackfillDagRunCollectionResponse models - LEFT OUTER JOIN via joinedload includes skipped slots (null dag_run_id) - Pagination via limit/offset, default ordering by sort_ordinal - 404 when backfill doesn't exist - 8 unit tests covering happy path, skipped slots, 404, pagination, empty backfill, and ordering contract closes: apache#46250
a7f9bca to
376f5f5
Compare
|
@shivaam A few things need addressing before review — see our Pull Request quality criteria.
No rush. Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you. |
Adds a new public API endpoint
GET /backfills/{backfill_id}/dag_runsthat returnsthe
BackfillDagRunentries for a given backfill with joinedDagRunstate. Userscan see what happened in a backfill: which dates ran, their states, and which slots
were skipped (with reason).
Previous PR: #64089 explored enriching
BackfillResponsedirectly. Based onfeedback from @uranusjr, this PR takes the cleaner approach of a dedicated
sub-resource endpoint.
Changes
BackfillDagRunResponse/BackfillDagRunCollectionResponsePydantic modelswith
AliasPathfor joinedDagRunfields (matching existingBackfillResponsepattern)list_backfill_dag_runs()route usingjoinedload(BackfillDagRun.dag_run)— LEFT OUTER JOINincludes skipped slots where
dag_run_idis NULLlimit/offset, default ordering bysort_ordinalResponse shape
{ "backfill_dag_runs": [ { "id": 1, "backfill_id": 1, "dag_run_id": 42, "logical_date": "2024-01-01T00:00:00Z", "partition_key": null, "sort_ordinal": 1, "exception_reason": null, "dag_run_state": "success", "dag_run_run_id": "backfill__2024-01-01T00:00:00+00:00" }, { "id": 2, "backfill_id": 1, "dag_run_id": null, "logical_date": "2024-01-02T00:00:00Z", "partition_key": null, "sort_ordinal": 2, "exception_reason": "already exists", "dag_run_state": null, "dag_run_run_id": null } ], "total_entries": 10 }Follow-up PRs
airflow backfill listandairflow backfill list-runscommandscloses: #46250
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (claude-opus-4-6) following the guidelines
Important
🛠️ Maintainer triage note for @shivaam · by
@potiuk· 2026-06-17 14:51 UTCHelpful heads-up from the maintainers — please address before this PR can be reviewed:
CI image checks / Static checks). Run them locally withprek run --all-files(orpre-commit run --all-files) and push the fixes.The ball is in your court — you've been assigned to this PR. Fix the above, then mark it Ready for review.
Automated triage — may be imperfect; a maintainer takes the next look.