Vamsi-klu opened a new pull request, #69375:
URL: https://github.com/apache/airflow/pull/69375
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:
- Keep the base `requires_access_dag("GET")` dependency on
`/structure/structure_data`.
- Require `DagAccessEntity.DEPENDENCIES` only when
`external_dependencies=true`.
- Do not require `DagAccessEntity.TASK_INSTANCE` for this topology-only
response.
- Add regression tests for Dag-specific read access, unreadable Dags,
conditional dependency access, and the intentional absence of task-instance
permission.
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.py`
- `ruff 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.py`
- `pytest
airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_structure.py -q`
(`30 passed`)
- `prek` hooks passed except `generate-openapi-spec`, which is blocked
locally because Breeze tries to use Docker and `docker` is not installed in
this environment.
Manual verification:
- Draft PR pending browser verification on an Airflow dev server. Local
process/port checks did not find an Airflow dev server listening on `8080`,
`28080`, `5173`, or `8000`.
closes: #62532
---
##### Was generative AI tooling used to co-author this PR?
- [X] Yes - Codex (GPT-5)
Generated-by: Codex (GPT-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]