villebro opened a new pull request, #23980: URL: https://github.com/apache/superset/pull/23980
### SUMMARY This is a continuation of #23888 and addresses two issues that were identified after this PR was merged: - On MySQL, large key-value entries that had been persisted prior to #20385 and exceeded the would cause the migration to fail, as the pickled value was truncated. This checks for truncation errors during deserialization, and replaces the value with an empty dict to ensure that the value is deserializable in the future. - Deserializing Explore permalinks failed, as one of the values in the dict was a string Enum that hadn't been cast to a pure `str` (apparently my devenv didn't have a single Explore permalink when I ran the migration 🙁). For this reason we add a check to `find_class` to make sure `superset.utils.core.DatasourceType` is a valid class. Note that this problem will now go away, as the JSON codec ensures that the Enum becomes a simple string in the future. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF <!--- Skip this if not applicable --> ### TESTING INSTRUCTIONS <!--- Required! What steps can be taken to manually verify the changes? --> ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- 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]
