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

   Some Dag warnings are computed for a whole source file rather than for one 
Dag: the `runtime varying value` warning, which quotes the flagged `DAG(...)` / 
operator calls, and warnings reported by Dag importers. The same message is 
stored on every Dag the file defines, so it can describe any Dag of that file.
   
   `GET /api/v2/dagWarnings` only checked read access on the Dag each warning 
is attached to. The Dag source (#67662) and import error (#65329) endpoints 
already apply a per-file overlay for this case, keyed by `(bundle_name, 
relative_fileloc)`, and return a placeholder when the file also defines Dags 
the caller cannot read. Dag warnings now follow the same rule:
   
   - Only file-level warning types are redacted. The per-Dag types (asset 
conflict, duplicate Dag id, non-existent pool, task group cycle) keep their 
message. Any other type, importer-defined ones included, is treated as 
file-level.
   - The response is redacted, not the stored rows; counts and pagination are 
unchanged.
   - One extra query runs only when the page contains a file-level warning.
   - The placeholder string, previously duplicated in the Dag source and import 
error routes, is now a single constant shared by the three endpoints.
   
   The security model docs describe the new behaviour next to the Dag source 
section.
   
   ---
   
   ##### 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]

Reply via email to