pierrejeambrun opened a new pull request, #77798:
URL: https://github.com/apache/airflow/pull/77798
Follow-up to #74232, which scoped an audit row's `dag_id` / `task_id` /
`run_id` to the route path or to the body of an endpoint that takes one.
The body was used on every request that sent JSON, including routes that
declare no body, and it overrode the path. So `DELETE /api/v2/dags/a/dagRuns/r`
sent with `{"dag_id": "b"}` was filed among Dag `b`'s audit rows instead of Dag
`a`'s. A body field now scopes the row only on a route that declares a body,
and never overrides what the path names. `create_backfill` stays scoped from
its body.
Checked against a local Airflow with this change:
| Request | Audit row `dag_id` before | after |
|---|---|---|
| `DELETE /dags/aip_90_dag/dagRuns/does_not_exist` with body `{"dag_id":
"example_bash_operator"}` | `example_bash_operator` | `aip_90_dag` |
| `PATCH /dags/example_bash_operator` with body `{"dag_id": "aip_90_dag",
...}` | `aip_90_dag` | `example_bash_operator` |
| `POST /backfills` with body `{"dag_id": "aip_90_dag", ...}` | `aip_90_dag`
| `aip_90_dag` |
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes — Claude Code (Opus 5.5)
Generated-by: Claude Code (Opus 5.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]