Skip to content

fix(reports): tile readiness check backport on 6.0-release-era base (report-fixes-42119) - #42278

Closed
eschutho wants to merge 1140 commits into
masterfrom
elizabeth/report-fixes-42119
Closed

fix(reports): tile readiness check backport on 6.0-release-era base (report-fixes-42119)#42278
eschutho wants to merge 1140 commits into
masterfrom
elizabeth/report-fixes-42119

Conversation

@eschutho

Copy link
Copy Markdown
Member

Decisions made that were not in the instructions

  • Opened as a draft: this branch is based on a recreated 6.0-release-era SHA (aaaa0716734f), whose merge-base with master is from 2025-08-18. GitHub therefore renders the entire lineage divergence — ~1,140 commits and ~2,400 changed files — even though this PR's actual payload is only the 2 commits listed below. Do not merge this into master as-is; it exists to run CI on the backported fix. If the intended target is a release branch rather than master, the base can be switched.

SUMMARY

Backport of #42119 (tiled-screenshot readiness fix) onto the elizabeth/report-fixes-42119 base. The payload is the top 2 commits only:

  • a9ff21b573fix(reports): positive per-tile chart readiness check for tiled screenshots. Replaces the absence-of-.loading per-tile predicate in take_tiled_screenshot() (which passed vacuously when a chart holder scrolled into view before its IntersectionObserver fired, capturing blank charts) with a positive check: every viewport-intersecting [data-test="dashboard-component-chart-holder"] must show a rendered chart (.slice_container with no nested .loading) or an error/empty state ([role="alert"], .ant-empty, .missing-chart-container). Clean cherry-pick of the same commit from fix(reports): positive per-tile chart readiness check for tiled screenshots #42119.
  • 976e0d9d3efix(reports): fail-loud WARNING diagnostics and log-context tracing. On per-tile readiness timeout: log at WARNING (customer chart-loading issue, per fix(screenshots): downgrade screenshot timeout logs from ERROR to WARNING #38130/chore(playwright): Using warning for timeouts #38441 precedent) with elapsed time, tile index, load_wait, and each unready holder's chart id + stuck state (waiting_on_database / spinner_mounted / nothing_mounted), then re-raise so the report fails instead of shipping a spinner/blank tile. Threads optional log_context (execution_id=<uuid>) from execute.py down to take_tiled_screenshot. The remaining three fix(reports): positive per-tile chart readiness check for tiled screenshots #42119 commits squashed and hand-adapted to this base's older API shapes (get_screenshot(self, url, element_name, user) without defaults, walrus-style call in execute.py, f-string log style preserved on untouched lines).

See #42119 for the full incident background, selector history (#27255/#28745/#39579/#30767/#33107), and design rationale.

TESTING INSTRUCTIONS

On this branch: tests/unit_tests/utils/test_screenshot_utils.py 27/27 pass; webdriver/screenshot/report-execute unit suites 119 pass (1 deselected: pre-existing test_get_screenshot_handles_playwright_timeout environment artifact, fails identically on the untouched base). Ruff check/format clean on all touched files.

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

msyavuz and others added 30 commits May 8, 2026 11:39
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
(cherry picked from commit cf587ca)
…9634)

Co-authored-by: Elizabeth Thompson <eschutho@gmail.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit 6947881)
…yment (#39503)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Vitor Avila <96086495+Vitor-Avila@users.noreply.github.com>
(cherry picked from commit aa71067)
…mension color (#39297)

Co-authored-by: codeant-ai-for-open-source[bot] <244253245+codeant-ai-for-open-source[bot]@users.noreply.github.com>
(cherry picked from commit 9e91ae8)
…lures (#39484)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
(cherry picked from commit 3f28f5d)
(cherry picked from commit 09c7e1f)
(cherry picked from commit bf1eb3d57e4d10a6c0a5ad15e8cab498c49b006f)
Adds CSV and XLSX download buttons plus an explicit reload control to the
drill-to-detail and drill-by modals. Adds a shared DownloadDropdown
component used by both modals.

Backport of #37109 from master to 6.0-release. Adapted for 6.0-release:
- All @apache-superset/core/* imports collapsed back to @superset-ui/core
  (the namespace refactor is master-only).
- canCopyClipboard from usePermissions is master-only; gated the new
  copy-disabled tooltip on canDownload instead until canCopyClipboard
  is ported.
- TabularDataRow type is master-only (utils/common is still .js); inlined
  as Record<string, unknown>[].
- The Explore pane Results/Samples tabs receive onDownloadCSV/
  onDownloadXLSX/onReload as optional props but the row-limit selector
  changes from master are intentionally omitted (master moved that area
  toward a different pattern that is not present on 6.0-release).
- Backend FRONTEND_CONF_KEYS gains ROW_LIMIT so the new drill download
  payload can read it from common.conf.

(cherry picked from commits fa31ec8, 967fa7b, 9ba8fda, b39419c, b74cc05,
15be40b, d8c8849, 6e1f03b, ca0e9cf, 76cdc1f)

Co-Authored-By: alex-poor <alex@karo.co.nz>
… on HTML cells (#39885)

Co-authored-by: Richard Fogaca Nienkotter <63572350+richardfogaca@users.noreply.github.com>
(cherry picked from commit 187bb41)
…ullscreen (#39534)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit 86ba63b)
…AppRoot (#38316)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
(cherry picked from commit 6c35973)
…39210)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
(cherry picked from commit d915e4f)
…t expansion (#39248)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
(cherry picked from commit 0aa8cac)
…39567)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
(cherry picked from commit e3e834b)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
(cherry picked from commit e4fe08a)
…els on timeseries charts (#39208)

(cherry picked from commit 5b5f23d)
…on pre-revamp charts (#38765)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
(cherry picked from commit 4b17ac2)
msyavuz and others added 4 commits July 20, 2026 11:00
Co-authored-by: Peng Ren <ia250@cummins.com>
(cherry picked from commit 73d4332)
…nshots

`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>
…or 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 #42119 (commits 37da786, f6feb70,
97d1548 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>
@github-actions github-actions Bot added i18n Namespace | Anything related to localization risk:db-migration PRs that require a DB migration i18n:spanish Translation related to Spanish language i18n:italian Translation related to Italian language i18n:french Translation related to French language i18n:chinese Translation related to Chinese language i18n:japanese Translation related to Japanese language i18n:russian Translation related to Russian language i18n:korean Translation related to Korean language api Related to the REST API doc Namespace | Anything related to documentation embedded plugins dependencies:npm github_actions Pull requests that update GitHub Actions code packages i18n:dutch i18n:slovak i18n:ukrainian i18n:portuguese i18n:brazilian i18n:traditional-chinese i18n:persian risk:ci-script PR modifies scripts that execute in CI (supply chain risk) labels Jul 21, 2026
@netlify

netlify Bot commented Jul 21, 2026

Copy link
Copy Markdown

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit 976e0d9
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/6a5fbe35ddbbbf0008c60a75
😎 Deploy Preview https://deploy-preview-42278--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@eschutho eschutho closed this Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Related to the REST API dependencies:npm doc Namespace | Anything related to documentation embedded github_actions Pull requests that update GitHub Actions code i18n:brazilian i18n:chinese Translation related to Chinese language i18n:dutch i18n:french Translation related to French language i18n:italian Translation related to Italian language i18n:japanese Translation related to Japanese language i18n:korean Translation related to Korean language i18n:persian i18n:portuguese i18n:russian Translation related to Russian language i18n:slovak i18n:spanish Translation related to Spanish language i18n:traditional-chinese i18n:ukrainian i18n Namespace | Anything related to localization packages plugins risk:ci-script PR modifies scripts that execute in CI (supply chain risk) risk:db-migration PRs that require a DB migration

Projects

None yet

Development

Successfully merging this pull request may close these issues.