Commit Graph

14 Commits

Author SHA1 Message Date
Evan Rusackas
41d89de139 fix: address bot review feedback and fix failing tests
Addresses bot review comments:
- Add public create() and destroy() methods for WebDriverSelenium
  (fixes tests calling removed public method)
- Fix user session handling - re-authenticate if different user passed
- Change exception handling from URLError to WebDriverException
- Use wd.destroy() for proper WebDriver cleanup instead of del
- Fix N+1 query in DummyStrategy with selectinload for dashboard.slices
- Fix docs: config.py -> superset_config.py and add crontab import
- Fix tests: use get_url_host() instead of hardcoded localhost

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 21:49:31 -08:00
Evan Rusackas
d715176847 fix: cache warmup using WebDriver for reliable authentication
This PR adopts and improves PR #20387 by @ensky to fix cache warmup issues
where the task was unable to authenticate properly.

Changes:
- Use WebDriver (Selenium) to render dashboards for cache warmup instead of
  API calls, ensuring proper authentication and accurate cache population
- Add SUPERSET_CACHE_WARMUP_USER config for specifying the warmup user
- Refine WebDriverSelenium to support persistent driver instances,
  avoiding driver recreation for each URL
- Warm up entire dashboards instead of individual charts, since dashboard
  context affects how charts are cached
- Add documentation for Celery beat configuration

The WebDriver approach simulates real user behavior, ensuring caches are
populated exactly as users would experience them.

Fixes #9597, #18933
Originally by @ensky in PR #20387

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 21:49:31 -08:00
Ville Brofeldt
7482b20f7b chore: replace selenium user with fixed user (#31844) 2025-01-22 12:46:06 -08:00
Maxime Beauchemin
a849c29288 chore: enable lint PT009 'use regular assert over self.assert.*' (#30521) 2024-10-07 13:17:27 -07:00
Maxime Beauchemin
2d63722150 chore: set up ruff as a new linter/formatter (#28158) 2024-04-24 17:19:53 -07:00
John Bodley
481a63da55 chore(tests): Remove ineffectual login (#27149) 2024-04-09 09:52:02 -07:00
John Bodley
10205d0b50 chore: Singularize tag models (#25819) 2023-11-09 08:22:08 -08:00
Jack Fragassi
5af298e1f6 chore: Migrate warm up cache endpoint to api v1 (#23853) 2023-06-20 12:08:29 +01:00
John Bodley
a4d5d7c6b9 chore(pre-commit): Add pyupgrade and pycln hooks (#24197) 2023-06-01 12:01:10 -07:00
cccs-Dustin
2e564897f8 feat: Add dataset tagging to the back-end (#20892)
Co-authored-by: Ville Brofeldt <33317356+villebro@users.noreply.github.com>
2022-09-23 11:01:17 +03:00
ʈᵃᵢ
04dd8d414d fix(celery cache warmup): add auth and use warm_up_cache endpoint (#21076) 2022-08-30 09:24:24 -07:00
ofekisr
e53a50a155 chore(supeset.utils.core): move all database utils to database utils module (#18058) 2022-01-16 08:32:50 +02:00
Bogdan
afd2e9f2ca chore: update fixtures scope that are loading data into the analytical db (#17780)
* Update db setup fixture scope

* Load data into db only once

* Update fixture scopes for data loading

* cleanup imports

* try import

* Update scope

* fix cleanup

* Import all fixtures

* Separate data log and metadata creation

* Retain table description

* fix dtype

Co-authored-by: Bogdan Kyryliuk <bogdankyryliuk@dropbox.com>
2021-12-16 16:11:47 -08:00
ofekisr
b5119b8dff refactor(tests): decouple unittests from integration tests (#15473)
* refactor move all tests to be under integration_tests package

* refactor decouple unittests from integration tests - commands

* add unit_tests package

* fix celery_tests.py

* fix wrong FIXTURES_DIR value
2021-07-01 18:03:07 +03:00