pierrejeambrun commented on code in PR #50132: URL: https://github.com/apache/airflow/pull/50132#discussion_r2142693218
########## airflow-core/src/airflow/api_fastapi/core_api/routes/public/connections.py: ########## @@ -130,7 +130,15 @@ def get_connections( session=session, ) - connections = session.scalars(connection_select) + connections = session.scalars(connection_select).all() + + if limit.value is not None: + limit.value = len(connections) + + if offset.value is not None: + offset.value = 0 + + connections = connections[offset.value:limit.value] Review Comment: Doing this in memory like that is not efficient. ########## airflow-core/src/airflow/api_fastapi/core_api/routes/public/connections.py: ########## @@ -130,7 +130,15 @@ def get_connections( session=session, ) - connections = session.scalars(connection_select) + connections = session.scalars(connection_select).all() + + if limit.value is not None: + limit.value = len(connections) + + if offset.value is not None: + offset.value = 0 + + connections = connections[offset.value:limit.value] Review Comment: Same for other similar pieces of code. (dag_run, etc.) -- 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