Respect Dag-specific read access in structure endpoint#69375
Draft
Vamsi-klu wants to merge 1 commit into
Draft
Conversation
5235345 to
32eb936
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates the UI structure endpoint permissions so users with Dag-specific read access can load the serialized topology used by graph and task-group views.
The task group route
/dags/{dag_id}/tasks/group/{group_id}uses the UI graph/group context, which calls/ui/structure/structure_data. That response contains serialized Dag topology: task/group nodes, edges, and optional dependency nodes. It does not include task-instance runtime state.Changes:
requires_access_dag("GET")dependency on/structure/structure_data.DagAccessEntity.DEPENDENCIESonly whenexternal_dependencies=true.DagAccessEntity.TASK_INSTANCEfor this topology-only response.Validation:
ruff format airflow-core/src/airflow/api_fastapi/core_api/routes/ui/structure.py airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_structure.pyruff check --fix airflow-core/src/airflow/api_fastapi/core_api/routes/ui/structure.py airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_structure.pypytest airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_structure.py -q(30 passed)prekhooks passed exceptgenerate-openapi-spec, which is blocked locally because Breeze tries to use Docker anddockeris not installed in this environment.Manual verification:
8080,28080,5173, or8000.closes: #62532
Was generative AI tooling used to co-author this PR?
Generated-by: Codex (GPT-5) following the guidelines