This is an automated email from the ASF dual-hosted git repository.
pierrejeambrun pushed a commit to branch v3-1-test
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/v3-1-test by this push:
new 55e47120f9b [v3-1-test] Add number of queries guard in public backfill
list endpoints (#57439) (#57482)
55e47120f9b is described below
commit 55e47120f9b647d8ffac7d1b70042263874adfe4
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Oct 29 16:39:55 2025 +0100
[v3-1-test] Add number of queries guard in public backfill list endpoints
(#57439) (#57482)
(cherry picked from commit 5eb74c4ce408fa51042767fba34e4ff6b1071fd2)
Co-authored-by: Pierre Jeambrun <[email protected]>
---
.../tests/unit/api_fastapi/core_api/routes/public/test_backfills.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_backfills.py
b/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_backfills.py
index ead2710ad84..6ce4a6ac85a 100644
---
a/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_backfills.py
+++
b/airflow-core/tests/unit/api_fastapi/core_api/routes/public/test_backfills.py
@@ -34,6 +34,7 @@ from airflow.providers.standard.operators.python import
PythonOperator
from airflow.utils.session import provide_session
from airflow.utils.state import DagRunState
+from tests_common.test_utils.asserts import assert_queries_count
from tests_common.test_utils.db import (
clear_db_backfills,
clear_db_dag_bundles,
@@ -123,7 +124,10 @@ class TestListBackfills(TestBackfillEndpoint):
b = Backfill(dag_id=dag.dag_id, from_date=from_date, to_date=to_date)
session.add(b)
session.commit()
- response = test_client.get(f"/backfills?dag_id={dag.dag_id}")
+
+ with assert_queries_count(2):
+ response = test_client.get(f"/backfills?dag_id={dag.dag_id}")
+
assert response.status_code == 200
assert response.json() == {
"backfills": [