Extends the log_context plumbing landed for the new tile-wait-budget log
lines to the rest of the report-screenshot capture path, so any log line
in this flow can be traced back to the run that produced it without
cross-referencing: superset/utils/screenshot_utils.py (combine_screenshot_tiles
and the non-budget log lines in take_tiled_screenshot), superset/utils/webdriver.py
(WebDriverPlaywright and WebDriverSelenium get_screenshot/find_unexpected_errors),
and superset/utils/screenshots.py (BaseScreenshot.driver/compute_and_cache/resize_image,
using the thumbnail cache_key where there is no report execution id).
superset/commands/report/execute.py needed no changes: every log line in
its screenshot-acquisition path already carries execution_id.
Message-text/plumbing only -- no behavior or log-level changes here beyond
what already landed. Left untouched, to avoid conflicting with the
concurrent fix-tile-readiness-check PR: the per-tile spinner-wait log
lines inside take_tiled_screenshot, and the two non-tiled ".loading" wait
blocks in webdriver.py (Playwright's wait_for_function-based checks and
Selenium's WebDriverWait-based check).
Co-Authored-By: Claude <noreply@anthropic.com>
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
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>