Commit Graph

8 Commits

Author SHA1 Message Date
Elizabeth Thompson
e4ec4e1067 fix(reports): downgrade tile-wait-budget logs to WARNING and add execution-id tracing
Budget exhaustion and per-tile spinner timeouts in take_tiled_screenshot()
are customer-side chart-loading issues, not Superset system faults, so log
them at WARNING instead of ERROR -- consistent with the precedent set by
#38130 and #38441, which deliberately downgraded screenshot timeout logs
the same way. Genuine system faults (browser crash, uncaught Playwright
errors) remain at the existing exception/ERROR level, unchanged.

Thread an optional log_context string through the screenshot call chain
(ChartScreenshot/DashboardScreenshot.get_screenshot -> WebDriverProxy
implementations -> take_tiled_screenshot) so every log line this PR adds
or touches can be traced back to its run: the report execution id on the
report path, or the thumbnail cache key on the thumbnail path (no new
plumbing invented there -- cache_key was already in scope).

Also add a per-tile DEBUG timing line (spinner wait vs. animation wait)
and richer WARNING diagnostics (tile index, tiles captured so far, elapsed
vs. budget) so a slow dashboard can be profiled and a timeout diagnosed
from logs alone.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-16 22:31:07 +00:00
Elizabeth Thompson
4fca5099dd fix(reports): time-budget tiled screenshot to fail cleanly instead of hitting Celery kill
Cumulative per-tile spinner/animation waits in take_tiled_screenshot() could
exceed the Celery task_time_limit on dashboards with many tiles, causing the
worker to be SIGKILLed mid-capture (SoftTimeLimitExceeded) instead of the
report failing cleanly. Track elapsed wall time across the operation, cap
each tile's wait at what remains of a fixed budget, and raise before the
budget runs out so the report errors and notifies owners rather than
silently degrading or crashing.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-16 22:14:49 +00:00
Elizabeth Thompson
42367afb25 fix(reports): add per-tile animation wait to prevent partial ECharts renders in tiled screenshots (#40694)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 16:43:34 -07:00
Elizabeth Thompson
8d2b655c22 fix(reports): narrow spinner checks to viewport and tighten exception handling (#39895)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-15 13:35:07 -07:00
Kamil Gabryjelski
63dfd95aa2 fix: Flakiness around scrolling during taking tiled screenshots with Playwright (#36051) 2025-11-10 12:57:28 +01:00
Kamil Gabryjelski
728bc2c632 fix: Ensure that Playwright tile height is always positive (#36027) 2025-11-07 13:39:05 +01:00
Maxime Beauchemin
088ecdd0bf refactor: Enable G logging rules and comprehensive ruff improvements (#35081)
Co-authored-by: Claude <noreply@anthropic.com>
2025-09-15 12:42:49 -07:00
Kamil Gabryjelski
57d0e78d40 feat: Tiled screenshots in Playwright reports (#34561) 2025-08-12 08:09:01 +02:00