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

   Implements the `update` action of the bulk Dag-run endpoint (`PATCH 
/dags/{dag_id}/dagRuns`) so multiple Dag runs can be marked as `success` / 
`failed` / `queued` in a single request, instead of one PATCH per run. 
Previously this action returned 405 ("not supported").
   
   This is the **backend** for issue #63854 (bulk "mark as" for Dag runs); the 
UI wiring will follow in a separate PR.
   
   What changed:
   - `BulkDAGRunBody` gains `state` (`DagRunMutableStates`) and an optional 
`note`.
   - `BulkDagRunService.handle_bulk_update` resolves each `(dag_id, run_id)`, 
then calls `set_dag_run_state_to_success/failed/queued` (and fires the 
`on_dag_run_success/failed` listener hooks), mirroring the single-run `PATCH`. 
The optional note is applied per run.
   - Route passes `dag_bag` + `user` into the service.
   - Regenerated OpenAPI spec, UI client, and airflow-ctl datamodels for the 
schema change.
   
   Behavior notes:
   - **Per-entity partial success** via `BulkResponse` (each run independently 
succeeds or errors), matching the existing bulk task-instance update — 
deliberately not atomic. A missing run is a 404 entry; an entity with no target 
`state` is a 400 entry.
   - Single bulk call, no per-run fan-out. Authorization reuses 
`requires_access_dag_run_bulk` (maps the update action to `PUT` per dag).
   
   related: #63854
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 4.8)
   
   Generated-by: Claude Code (Opus 4.8) 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