Commit Graph

8 Commits

Author SHA1 Message Date
Claude Code
a0e2dc6903 test(caching): pin cache-key stability against extra_cache_keys order
This is a test-only PR opened as a TDD-style validation of issue #34543.

#34543 (filed 2025-08) reports that embedded dashboards with multiple
Jinja url_param() filters fail async cache retrieval with a 422 "Error
loading data from cache", while a single url_param works fine.

Root cause: SqlaTable.get_extra_cache_keys() (superset/connectors/sqla/models.py)
returns list(set(extra_cache_keys)). Python randomizes string hashing
per-process, so the same set of url_param values can iterate in a
different order in the Celery worker (which writes the query results
to cache) than in the web process (which re-derives the cache key to
read them back). hash_from_dict() only sorts dict keys, not list
values, so two extra_cache_keys lists with identical values but
different order hash to different cache keys. A single-element list
has only one possible order, which is why the bug only appears with
multiple parameters.

This PR adds one regression test on QueryObject.cache_key():

1. test_cache_key_stable_regardless_of_extra_cache_keys_order -
   asserts the cache key is identical for two otherwise-equal query
   objects whose extra_cache_keys differ only in order.

Closes #34543

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-29 17:51:00 -07:00
Evan Rusackas
c5935b6904 feat(table/pivot-table): correct non-additive totals/subtotals via DB rollup [SIP-216] (#41184)
Co-authored-by: Superset Dev <dev@superset.apache.org>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Amin Ghadersohi <amin.ghadersohi@gmail.com>
2026-07-22 10:06:05 -07:00
Mehmet Salih Yavuz
9a11c15a33 feat(explore): add full-range option for time-shift comparison (#41334) 2026-06-25 18:30:33 +03:00
Vitor Avila
86eb6176d1 fix: Enforce per-user caching on legacy API endpoint (#39789) 2026-04-30 18:04:33 -03:00
Beto Dealmeida
0c87034b17 fix: cache key generation (#36225) 2025-11-25 12:50:00 -05:00
Maxime Beauchemin
1be2287b3a feat(timeseries): enhance 'Series Limit' to support grouping the long tail (#34308) 2025-07-25 16:26:32 -07:00
Maxime Beauchemin
2d63722150 chore: set up ruff as a new linter/formatter (#28158) 2024-04-24 17:19:53 -07:00
Elizabeth Thompson
b021f6e05d feat: add new cache_query_by_user key (#23415)
Co-authored-by: Beto Dealmeida <roberto@dealmeida.net>
2023-03-20 12:17:20 -07:00