john-bodley opened a new pull request #9382: [fix] Fixing cache key inconsistencies URL: https://github.com/apache/incubator-superset/pull/9382 ### CATEGORY Choose one - [x] Bug Fix - [ ] Enhancement (new features, refinement) - [ ] Refactor - [ ] Add tests - [ ] Build / Development Environment - [ ] Documentation ### SUMMARY Whilst testing some caching logic I realized that for some slices the cache key was different between the `/superset/warm_up_cache/?slice_id=<id>` and `/superset/slice/<id>/` endpoints. The reasons being is that the `time_grain_sqla` (SQL) and `grainularity` (Druid NoSQL) fields are now optional for a number of visualization types and the frontend removes any erroneous fields which are not defined by the chart controls resulting in inconsistent form data. This regression was introduced by me in via the following PRs: - https://github.com/apache/incubator-superset/pull/8674 - https://github.com/apache/incubator-superset/pull/8764 - https://github.com/apache/incubator-superset/pull/8800 - https://github.com/apache/incubator-superset/pull/8825 This PR: 1. Adds a migration to clean up erroneous `time_grain_sqla` (SQL) and `grainularity` (Druid NoSQL) fields in saved slice parameters. 2. Encodes `time_grain_sqla` form-data as `None` as opposed to `""` for consistency. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF <!--- Skip this if not applicable --> ### TEST PLAN Tested locally and confirmed that the cache keys were identical. ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] Has associated issue: - [ ] Changes UI - [x] Requires DB Migration. - [ ] Confirm DB Migration upgrade and downgrade tested. - [ ] Introduces new feature or API - [ ] Removes existing feature or API ### REVIEWERS to: @etr2460 @graceguo-supercat @ktmud @villebro
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org