This is an automated email from the ASF dual-hosted git repository. kaxilnaik pushed a commit to branch v3-0-test in repository https://gitbox.apache.org/repos/asf/airflow.git
commit 40cb51d135094c6eca7c69e75fb192f9d1113bde Author: Daniel Standish <[email protected]> AuthorDate: Sat Apr 19 03:19:13 2025 -0700 Use sync calls for list backfills (#49454) We found issues when running this with pg bouncer. We can make it sync until we sort that stuff out. (cherry picked from commit 01ed94b6372db7c8531080097acedbba12db0a0b) --- .../airflow/api_fastapi/core_api/routes/public/backfills.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/airflow-core/src/airflow/api_fastapi/core_api/routes/public/backfills.py b/airflow-core/src/airflow/api_fastapi/core_api/routes/public/backfills.py index e4995cb36c3..7b2e30ba2ab 100644 --- a/airflow-core/src/airflow/api_fastapi/core_api/routes/public/backfills.py +++ b/airflow-core/src/airflow/api_fastapi/core_api/routes/public/backfills.py @@ -24,9 +24,8 @@ from sqlalchemy import select, update from airflow.api_fastapi.auth.managers.models.resource_details import DagAccessEntity from airflow.api_fastapi.common.db.common import ( - AsyncSessionDep, SessionDep, - paginated_select_async, + paginated_select, ) from airflow.api_fastapi.common.parameters import QueryLimit, QueryOffset, SortParam from airflow.api_fastapi.common.router import AirflowRouter @@ -67,7 +66,7 @@ backfills_router = AirflowRouter(tags=["Backfill"], prefix="/backfills") Depends(requires_access_backfill(method="GET")), ], ) -async def list_backfills( +def list_backfills( dag_id: str, limit: QueryLimit, offset: QueryOffset, @@ -75,16 +74,16 @@ async def list_backfills( SortParam, Depends(SortParam(["id"], Backfill).dynamic_depends()), ], - session: AsyncSessionDep, + session: SessionDep, ) -> BackfillCollectionResponse: - select_stmt, total_entries = await paginated_select_async( + select_stmt, total_entries = paginated_select( statement=select(Backfill).where(Backfill.dag_id == dag_id), order_by=order_by, offset=offset, limit=limit, session=session, ) - backfills = await session.scalars(select_stmt) + backfills = session.scalars(select_stmt) return BackfillCollectionResponse( backfills=backfills, total_entries=total_entries,
