From 545eea22f898cf8d2fd64f14aad394f6d5bebd35 Mon Sep 17 00:00:00 2001 From: busya Date: Thu, 4 Jun 2026 23:47:09 +0300 Subject: [PATCH] 032: fix missing await on async SupersetClient calls in resource_service.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Found 3 missing 'await' keywords causing 'coroutine object is not iterable': - get_dashboards_summary() (line 57) - get_dashboards_summary_page() (line 114) - get_datasets_summary() (line 306) All three were calling async methods in sync context — returned coroutine objects instead of lists/dicts, causing iteration failures. --- backend/src/services/resource_service.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/src/services/resource_service.py b/backend/src/services/resource_service.py index e904101a..87ea2c11 100644 --- a/backend/src/services/resource_service.py +++ b/backend/src/services/resource_service.py @@ -54,7 +54,7 @@ class ResourceService: ) -> list[dict[str, Any]]: with belief_scope("get_dashboards_with_status", f"env={env.id}"): client = SupersetClient(env) - dashboards = client.get_dashboards_summary(require_slug=require_slug) + dashboards = await client.get_dashboards_summary(require_slug=require_slug) # Enhance each dashboard with Git status and task status result = [] @@ -111,7 +111,7 @@ class ResourceService: f"env={env.id}, page={page}, page_size={page_size}, search={search}", ): client = SupersetClient(env) - total, dashboards_page = client.get_dashboards_summary_page( + total, dashboards_page = await client.get_dashboards_summary_page( page=page, page_size=page_size, search=search, @@ -303,7 +303,7 @@ class ResourceService: ) -> list[dict[str, Any]]: with belief_scope("get_datasets_with_status", f"env={env.id}"): client = SupersetClient(env) - datasets = client.get_datasets_summary() + datasets = await client.get_datasets_summary() # Enhance each dataset with task status and linked dashboard count sem = asyncio.Semaphore(3) # limit concurrent Superset calls