lindenh opened a new pull request, #30887: URL: https://github.com/apache/superset/pull/30887
### SUMMARY Previously, the query_context was removed on imports because of the necessary changes to datasource table ids on import to align with already-existing datasources even if the id itself was different (as it may be across environments).
This became a problem in https://github.com/apache/superset/issues/28446 as the query context was now required for embedded charts. This normally isn't an issue, as the query context is generated when saving the chart on the frontend, but if charts are uploaded, this context is removed. This re-adds that imported context with the same changes made to the query_context as made to the imported charts themselves to ensure they point at the right data source. ### 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 --> - [x] Has associated issue: https://github.com/apache/superset/issues/28446 - [ ] 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]
