mikebridge opened a new pull request, #41825: URL: https://github.com/apache/superset/pull/41825
### SUMMARY Second contribution **into #40221's branch** (`sl-cache`), fixing the unaddressed codeant architect finding on `query_object.py` (2026-05-19) — **verified real**: `force_query` was added to `QueryObject` for the semantic cache's bypass check (legitimate), but it also landed in `to_dict()`, which `cache_key()` hashes. An execution-control flag inside the identity hash means: 1. A user's **force refresh** writes its fresh result under a *different* cache key (`force_query=True` hashed in). 2. Every subsequent ordinary request hashes `force_query=False` → **keeps serving the stale entry** under the old key. Force-refresh silently stops refreshing what other viewers see, and cache storage doubles per chart. This affects **every chart on the legacy path**, not just semantic layers. **The fix**: strip `force_query` in `cache_key()`, exactly like the existing execution-control exclusions two lines above (`from_dttm`/`to_dttm`, conditional `apply_fetch_values_predicate`). ### TESTING INSTRUCTIONS `test_cache_key_ignores_force_query` pins that forced and unforced requests share a cache key — validated to **fail without the fix**. ```bash pytest tests/unit_tests/queries/query_object_test.py -q # 13 passed ``` ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Introduces new feature or API - [ ] Removes existing feature or API 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
