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
Add support to filter by dag_id in recent_dag_runs endpoint #44606
Also this just makes me realize that `http://localhost:29091/ui/dags/recent_dag_runs?dag_id_pattern=xxxxx` endpoint should most certainly also support a `dag_id` query params or `dag_ids`.
I am affraid that using a pattern like this could end up matching multiple dags while we are really trying to get the dag_runs from a specific dag like here.
Opened this issue for tracking as it got lost in the PR review. It seems there is QueryDagIdsFilter in get_dag_stats but it's a GET endpoint and multiple dag_ids query parameter can be passed and there is no standard for this.
After the refactor, we can leverage FilterParam and filter_param_factory for query parameters with simple logic. By passing list[str] to _type, we can standardize the format of request query parameters using FastAPI's native features.
Activity
tirkarthi commentedon Dec 3, 2024
Opened this issue for tracking as it got lost in the PR review. It seems there is
QueryDagIdsFilteringet_dag_statsbut it's a GET endpoint and multipledag_idsquery parameter can be passed and there is no standard for this.https://stackoverflow.com/questions/24059773/correct-way-to-pass-multiple-values-for-same-parameter-name-in-get-request
airflow/airflow/api_fastapi/core_api/routes/public/dag_stats.py
Lines 40 to 52 in edf3e33
pierrejeambrun commentedon Dec 3, 2024
Nice thanks
jason810496 commentedon Dec 5, 2024
Hi @tirkarthi , I think this issue is resolve after #44345 is merged:
https://github.com/apache/airflow/blob/main/airflow/api_fastapi/core_api/routes/public/dag_stats.py#L56-L61
After the refactor, we can leverage
FilterParamandfilter_param_factoryfor query parameters with simple logic. By passinglist[str]to_type, we can standardize the format of request query parameters using FastAPI's native features.pierrejeambrun commentedon Dec 5, 2024
Indeed, now with the refactoring we have tools to achieve that. We still need to add this capability though, so we can close it.
It's quite straightforward with the new parameter system.