jason810496 commented on code in PR #56918:
URL: https://github.com/apache/airflow/pull/56918#discussion_r2449108496
##########
airflow-core/src/airflow/api_fastapi/core_api/routes/ui/dashboard.py:
##########
@@ -63,7 +63,7 @@ def historical_metrics(
func.coalesce(DagRun.start_date, current_time) >= start_date,
func.coalesce(DagRun.end_date, current_time) <=
func.coalesce(end_date, current_time),
)
- .where(DagRun.dag_id.in_(permitted_dag_ids))
+ .where(DagRun.dag_id.in_(permitted_dag_ids or []))
Review Comment:
I just made the double check that `readable_dags_filter.value` will always
be `set[str]` type. Since `get_authorized_dag_ids` will return `set[str]` type.
https://github.com/apache/airflow/blob/f3ad20aad803196b6fc1c73c1a38560deaf31aee/airflow-core/src/airflow/api_fastapi/core_api/security.py#L210-L211
So instead of having `permitted_dag_ids or []` across the the functions, we
just need `permitted_dag_ids = cast(set[str], readable_dags_filter.value)` at
the beginning of the route.
--
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]