032: fix final sync→async cascade (dataset_review, parsing, validation)
- _parsing.py: parse_superset_link + _recover_dataset_binding → async
(await get_dashboard_detail, get_chart)
- dataset_review/orchestrator.py: start_session + _build_recovery_bootstrap → async
(await get_dataset_detail, parse_superset_link)
- _routes.py (dataset_review): await orchestrator.start_session()
- validation_tasks.py: await parse_superset_link + get_dashboard_detail
This commit is contained in:
@@ -161,7 +161,7 @@ async def start_session(
|
||||
},
|
||||
)
|
||||
try:
|
||||
result = orchestrator.start_session(
|
||||
result = await orchestrator.start_session(
|
||||
StartSessionCommand(
|
||||
user=current_user,
|
||||
environment_id=request.environment_id,
|
||||
|
||||
@@ -412,7 +412,7 @@ async def parse_superset_url(
|
||||
from ...core.utils.superset_context_extractor import SupersetContextExtractor
|
||||
|
||||
extractor = SupersetContextExtractor(environment=env)
|
||||
parsed = extractor.parse_superset_link(payload.url)
|
||||
parsed = await extractor.parse_superset_link(payload.url)
|
||||
|
||||
dashboard_id = str(parsed.dashboard_id) if parsed.dashboard_id is not None else None
|
||||
title: str | None = None
|
||||
@@ -420,7 +420,7 @@ async def parse_superset_url(
|
||||
# Resolve dashboard title from Superset API when possible
|
||||
if parsed.dashboard_id:
|
||||
try:
|
||||
dashboard = extractor.client.get_dashboard_detail(parsed.dashboard_id)
|
||||
dashboard = await extractor.client.get_dashboard_detail(parsed.dashboard_id)
|
||||
title = dashboard.get("dashboard_title", str(parsed.dashboard_id))
|
||||
except Exception:
|
||||
title = str(parsed.dashboard_id)
|
||||
|
||||
Reference in New Issue
Block a user