rusackas commented on code in PR #37516:
URL: https://github.com/apache/superset/pull/37516#discussion_r3657700612
##########
superset/charts/data/api.py:
##########
@@ -435,7 +472,10 @@ def _run_async(
# but only if we're not forcing a refresh.
if not form_data.get("force"):
with contextlib.suppress(ChartDataCacheLoadError):
- result = command.run(force_cached=True)
+ with chart_timing_phase("query"):
Review Comment:
@/tmp/reply_fix.txt
##########
superset/charts/data/api.py:
##########
@@ -435,7 +472,10 @@ def _run_async(
# but only if we're not forcing a refresh.
if not form_data.get("force"):
with contextlib.suppress(ChartDataCacheLoadError):
- result = command.run(force_cached=True)
+ with chart_timing_phase("query"):
Review Comment:
Good catch, fixed! `_run_async`'s cache-hit branch only suppressed
`ChartDataCacheLoadError`, so a cached query result with an error would escape
uncaught instead of getting the same controlled 400 the sync path already
returns for `ChartDataQueryFailedError`. Added a regression test for the
cache-hit case too.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]