mirror of
https://github.com/apache/superset.git
synced 2026-05-29 20:29:34 +00:00
fix(reports): log configured timeout value when spinner wait expires
Include SCREENSHOT_LOAD_WAIT / load_wait in the warning message so it is immediately visible from logs whether the timeout limit was reached. Also fix stale docstring default value (30 -> 60). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
committed by
Amin Ghadersohi
parent
4e6ab1ceec
commit
8d7ffac945
@@ -97,7 +97,7 @@ def take_tiled_screenshot(
|
||||
page: Playwright page object
|
||||
element_name: CSS class name of the element to screenshot
|
||||
tile_height: Height of each tile in pixels
|
||||
load_wait: Seconds to wait for charts to load per tile (default 30)
|
||||
load_wait: Seconds to wait for charts to load per tile (default 60)
|
||||
|
||||
Returns:
|
||||
Combined screenshot bytes or None if failed
|
||||
@@ -167,9 +167,11 @@ def take_tiled_screenshot(
|
||||
)
|
||||
except PlaywrightTimeout:
|
||||
logger.warning(
|
||||
"Timed out waiting for visible spinners to clear on tile %s/%s",
|
||||
"Timed out waiting for visible spinners to clear on tile %s/%s "
|
||||
"(load_wait=%ss)",
|
||||
i + 1,
|
||||
num_tiles,
|
||||
load_wait,
|
||||
)
|
||||
|
||||
# Calculate what portion of the element we want to capture for this tile
|
||||
|
||||
@@ -315,7 +315,10 @@ class WebDriverPlaywright(WebDriverProxy):
|
||||
)
|
||||
except PlaywrightTimeout:
|
||||
logger.warning(
|
||||
"Timed out waiting for charts to load at url %s", url
|
||||
"Timed out waiting for charts to load at url %s "
|
||||
"(SCREENSHOT_LOAD_WAIT=%ss)",
|
||||
url,
|
||||
self._screenshot_load_wait,
|
||||
)
|
||||
raise
|
||||
|
||||
|
||||
Reference in New Issue
Block a user