msyavuz opened a new pull request, #41428: URL: https://github.com/apache/superset/pull/41428
### SUMMARY ECharts charts run a ~1s draw animation that **only starts once data has loaded and the spinner clears**. In `WebDriverPlaywright.get_screenshot`, the non-tiled (single chart / standard) path waits `SCREENSHOT_SELENIUM_ANIMATION_WAIT` *before* charts finish loading, then waits for `.loading` spinners to disappear, then screenshots immediately. For a slow-loading chart the animation wait is spent while the chart is still loading, so the moment the spinner clears the screenshot fires mid-animation, producing a partially-rendered chart. This is the same root cause as #40694, which fixed only the **tiled** dashboard path (per-tile wait after the spinner clears). The non-tiled PNG path was never fixed — mix charts (bar + line, time-shift, multiple metrics) load slowest and are the most exposed, matching the customer report (3 of 53 reports affected → a timing race). **Fix:** add the animation wait *after* the `.loading` spinner check in both non-tiled branches, gated on `SCREENSHOT_SELENIUM_ANIMATION_WAIT > 0`. Deployments already setting that value (e.g. `=5`) get it automatically; the default `0` is a no-op. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A — bug manifests as a partially-drawn chart captured mid-animation; fix lets the draw animation complete before capture. ### TESTING INSTRUCTIONS 1. Configure an instance with `SCREENSHOT_SELENIUM_ANIMATION_WAIT=5`. 2. Build a mix chart (bar + line, time-shift, multiple metrics) and schedule a "Send as PNG" report with cache ignored. 3. Trigger repeatedly — the chart should render fully every time, not cut off mid-series. Unit test: `pytest tests/unit_tests/utils/webdriver_test.py -k animation_wait_runs_after_spinners_clear` ### ADDITIONAL INFORMATION - No — backend-only timing fix. - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
