Commit Graph

14 Commits

Author SHA1 Message Date
Elizabeth Thompson
ec123d0ef3 fix(tests): update tiled-fallback test and guard double error() call
- Rename and update test_tiled_screenshot_failure_returns_none_without_fallback
  to reflect new behavior: falsy tiled result falls back to standard screenshot
  instead of returning None
- Guard the else: cache_payload.error() call in compute_and_cache to only fire
  when status is not already ERROR, preserving the original failure timestamp
- Remove stale PT004 ignore (rule removed in ruff 0.9.7)
- Apply ruff 0.9.7 formatting to match CI

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 17:57:12 +00:00
Elizabeth Thompson
d6e8b80e90 fix(tests): resolve PT001 ruff version mismatch and improve tiled fallback test
Add PT001 to ruff ignore list so local and CI ruff versions don't conflict over
fixture parentheses style. Also fix test_tiled_fallback_triggered_on_empty_bytes
to patch page.screenshot directly instead of the static method, which was
returning a MagicMock in CI.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 17:56:34 +00:00
Elizabeth Thompson
f8cf65404a fix(screenshots): catch empty-bytes tiled result and set ERROR on falsy image
Two bugs that could cause blank PDFs to re-trigger indefinitely:

1. webdriver.py: tiled fallback used `if img is None:` which let b""
   (returned by combine_screenshot_tiles on an empty tile list) pass
   through silently. Changed to `if not img:` to catch both cases.

2. screenshots.py: compute_and_cache had no else branch after
   `if image: cache_payload.update(image)`. When get_screenshot returned
   None or b"" without raising, status stayed at COMPUTING instead of
   ERROR, causing is_computing_stale() to re-trigger the task
   indefinitely after THUMBNAIL_ERROR_CACHE_TTL. Added
   `else: cache_payload.error()` so failed screenshots always transition
   to ERROR and use the controlled TTL back-off.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 17:56:14 +00:00
Elizabeth Thompson
99954d154d fix(screenshots): apply animation wait after spinner wait in Playwright non-tiled path
ECharts animations play after chart data loads (after the loading spinner
clears). The Playwright screenshot path was applying the global
SCREENSHOT_SELENIUM_ANIMATION_WAIT *before* waiting for spinners to clear,
meaning the animation buffer was consumed before data had even loaded.

Move the animation wait to after `wait_for_function` (the global spinner
check) in both non-tiled code paths — when SCREENSHOT_TILED_ENABLED is
False, and when it is True but the dashboard is below the tiling threshold.
The tiled path already handles this correctly per-tile inside
`take_tiled_screenshot`, which was fixed by PRs #39895 and #40694.

This brings the thumbnail API / Celery screenshot path to parity with the
report-email path on small-to-medium dashboards.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-26 17:51:35 +00:00
Evan Rusackas
b4dfeef2fd fix(reports): add network timeouts so schedules can't hang forever (#41250)
Co-authored-by: Claude Code <noreply@anthropic.com>
2026-06-23 18:01:03 -07:00
Daniel Vaz Gaspar
27a65257ee perf(screenshots): reuse Playwright browser across tasks instead of launching per-task (#41243)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-22 11:32:30 -07:00
Elizabeth Thompson
0c9ece65bb fix(reports): require user in get_screenshot, simplify Selenium lifecycle, and fail on tiled screenshot error (#41080)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 15:46:17 -07:00
Elizabeth Thompson
f187a8e1c4 fix(reports): guard null dashboard height in Playwright screenshots (#40179) 2026-05-21 09:19:29 -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
Elizabeth Thompson
f0d521dfc2 fix(reports): poll for spinner absence instead of snapshotting loading elements (#39579)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 22:03:43 -03:00
Elizabeth Thompson
587fe4af63 fix(reports): propagate PlaywrightTimeout so execution transitions to ERROR state (#39176)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-08 11:00:03 -07:00
Amin Ghadersohi
fe7f8062f3 fix: Enable Playwright migration with graceful Selenium fallback (#35063)
Co-authored-by: Claude <noreply@anthropic.com>
2025-09-23 10:47:45 -07: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
Elizabeth Thompson
385471c34d fix(utils): ensure webdriver timeout compatibility with urllib3 2.x (#34440) 2025-09-05 16:25:15 -07:00