You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
API ListDAGs inconsistent with Web View/CLI #16228
Correct, the index page lists all DAGs by default, while the API only lists those the user has the permission to view (since the API returns DAG details that the user may not have permission to view).
(Thinking loudly) Maybe we should make this less confusing? For example, the API can instead list all the DAGs, but only show details of those the user has permissions to view; or maybe the web UI should only show DAGs viewable by the user (at least by default).
Thanks for the quick reply uranusjr, in this case I would be confused that the API shows more (invalid) DAGs, as in DAGs that have been deleted and should not be visible - even with the right permissions? (Thats as far as I understood the issue)
I think your understanding is correct. I’m not sure why the API does not filter out inactive DAGs (they probably should show sub-DAGs though I’m not 100% sure), could be an oversight or intetional design. We’ll need someone who was involved in the API implementation to answer this.
Activity
jpyen commentedon Jun 2, 2021
Is it possible that
/api/v1/dagsis only listing DAGs the current user has access to - present or not?https://github.com/apache/airflow/blob/main/airflow/api_connexion/endpoints/dag_endpoint.py#L64
In contrast the UI seems to get the DAG list ground-truth from here:
airflow/airflow/www/views.py
Line 551 in 8505d2f
and then uses
get_accessible_dag_idsto only show a selection.Is this assessment correct?
uranusjr commentedon Jun 2, 2021
Correct, the index page lists all DAGs by default, while the API only lists those the user has the permission to view (since the API returns DAG details that the user may not have permission to view).
(Thinking loudly) Maybe we should make this less confusing? For example, the API can instead list all the DAGs, but only show details of those the user has permissions to view; or maybe the web UI should only show DAGs viewable by the user (at least by default).
jpyen commentedon Jun 2, 2021
Thanks for the quick reply uranusjr, in this case I would be confused that the API shows more (invalid) DAGs, as in DAGs that have been deleted and should not be visible - even with the right permissions? (Thats as far as I understood the issue)
uranusjr commentedon Jun 3, 2021
I think your understanding is correct. I’m not sure why the API does not filter out inactive DAGs (they probably should show sub-DAGs though I’m not 100% sure), could be an oversight or intetional design. We’ll need someone who was involved in the API implementation to answer this.