Commit Graph

7 Commits

Author SHA1 Message Date
Elizabeth Thompson
976e0d9d3e fix(reports): fail-loud WARNING diagnostics and log-context tracing for tile readiness
Companion to the previous commit's positive per-tile readiness check,
carrying the rest of PR #42119's changes onto this base:

- Per-tile readiness timeout logs at WARNING (customer chart-loading
  issue, not a system fault -- matching #38130/#38441) with elapsed wait
  time, tile index/total, load_wait, and the identity + stuck-state of
  each unready chart holder (waiting_on_database / spinner_mounted /
  nothing_mounted), then re-raises so the report fails rather than
  shipping a blank or spinner tile. A per-tile DEBUG line logs readiness
  wait time for profiling.
- The deliberate readiness-timeout re-raise is tracked with an explicit
  flag rather than `except PlaywrightTimeout` at the outer level, since
  PlaywrightTimeout is aliased to bare Exception when playwright isn't
  installed and would otherwise swallow-or-propagate the wrong cases.
- Threads an optional log_context (e.g. "execution_id=<uuid>") from
  BaseReportState._get_screenshots through BaseScreenshot.get_screenshot
  and both WebDriverProxy implementations into take_tiled_screenshot,
  so timeout logs correlate back to the report run. Defaults to None
  for callers outside the report pipeline (thumbnails).

Backported from apache/superset#42119 (commits 37da786b52, f6feb70eca,
97d15485ad squashed) onto this branch's base; only the log lines this
change itself adds or touches carry the context suffix -- pre-existing
log lines on this base (f-string style) are left as-is.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-21 18:37:47 +00:00
Elizabeth Thompson
a9ff21b573 fix(reports): positive per-tile chart readiness check for tiled screenshots
`take_tiled_screenshot()` waited for the *absence* of `.loading` elements
visible in the viewport before capturing each tile. With
DashboardVirtualization on (default), a chart holder that has just scrolled
into view but hasn't fired its IntersectionObserver callback yet mounts
neither a spinner nor a chart, so the predicate passed vacuously and the
tile was captured blank. On top of that, a per-tile timeout was caught,
logged as a warning, and the tile was captured anyway -- delivering a
spinner screenshot to report recipients instead of failing the report.

Replace the absence-of-`.loading` predicate with a positive readiness
check: every chart holder (`data-test="dashboard-component-chart-holder"`)
intersecting the viewport must show a terminal state (a rendered chart via
`.slice_container`, or an error/empty state via `[role="alert"]` /
`.ant-empty` / `.missing-chart-container`) before a tile is captured. A
holder with nothing mounted no longer satisfies the wait.

A per-tile timeout is now logged at ERROR with the tile index, the
load_wait, and the identities of the still-unready chart holders, and
re-raises instead of being swallowed -- the report now fails
(ReportScheduleScreenshotFailedError) instead of silently shipping a
degraded screenshot.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-21 18:28:02 +00:00
Elizabeth Thompson
3c83e2e18f 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>
(cherry picked from commit 42367afb25)
2026-06-05 09:16:03 -07:00
Elizabeth Thompson
680bd7e444 fix(reports): narrow spinner checks to viewport and tighten exception handling (#39895)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit 8d2b655c22)
2026-05-21 14:56:21 -07:00
Kamil Gabryjelski
933ec0a918 fix: Flakiness around scrolling during taking tiled screenshots with Playwright (#36051)
(cherry picked from commit 63dfd95aa2)
2025-11-10 11:56:32 -08:00
Kamil Gabryjelski
3b7a52d1eb fix: Ensure that Playwright tile height is always positive (#36027)
(cherry picked from commit 728bc2c632)
2025-11-07 12:03:10 -08:00
Kamil Gabryjelski
57d0e78d40 feat: Tiled screenshots in Playwright reports (#34561) 2025-08-12 08:09:01 +02:00