uranusjr commented on a change in pull request #18924: URL: https://github.com/apache/airflow/pull/18924#discussion_r731519692
########## File path: airflow/api_connexion/endpoints/dag_endpoint.py ########## @@ -60,13 +60,16 @@ def get_dag_details(dag_id): @security.requires_access([(permissions.ACTION_CAN_READ, permissions.RESOURCE_DAG)]) @format_parameters({'limit': check_limit}) @provide_session -def get_dags(limit, session, offset=0, only_active=True, tags=None): +def get_dags(limit, session, offset=0, only_active=True, tags=None, search=None): """Get all DAGs.""" if only_active: dags_query = session.query(DagModel).filter(~DagModel.is_subdag, DagModel.is_active) else: dags_query = session.query(DagModel).filter(~DagModel.is_subdag) + if search: + dags_query = dags_query.filter(DagModel.dag_id.ilike(f'%{search}%')) Review comment: The search box does not do it, so IMO this is good enough. If this becomes a problem, we should fix both. This does make me think perhaps we should extract this logic to a common function. -- 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: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org