Antonio-RiveroMartnez opened a new pull request, #30029: URL: https://github.com/apache/superset/pull/30029
### SUMMARY After the initial version of the time comparison feature for Table and Big Number we introduced a migration to upgrade old charts to the new comparison controls, however, during that upgrade a table that never had comparison in it was wrongly showing Time Comparison Data. This PR is fixing the migration so we can properly upgrade such old tables if needed, also we extend our tests to not only consider charts that have the enabled_time_comparison flag set to True. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF ### BEFORE Old version of Chart using Time Comparison once but then removing it from the controls: <img width="1911" alt="initial" src="https://github.com/user-attachments/assets/7d82c73d-3160-4bc4-983e-9a172bb8bcd6"> <img width="1911" alt="removed" src="https://github.com/user-attachments/assets/2eb46f63-f52b-4093-adec-01e20ea0e546"> The old Chart is upgraded with the previous version of the migration: <img width="906" alt="upgrade" src="https://github.com/user-attachments/assets/04ef8887-f66e-4448-a31f-74036a2ee826"> The chart start showing comparison data: <img width="1889" alt="wrong" src="https://github.com/user-attachments/assets/c125abcf-b47a-4e40-98b4-d37591b24add"> ### AFTER Old version of Chart using Time Comparison once but then removing it from the controls: <img width="1889" alt="v2_initial" src="https://github.com/user-attachments/assets/81658fbd-d6f2-430c-ad96-9e67794757bf"> <img width="1889" alt="v2_no_comp" src="https://github.com/user-attachments/assets/123fbfc8-4b08-48c2-8043-8851afd13272"> The old Chart is upgraded with the new version of the migration: <img width="921" alt="v2_upgrade" src="https://github.com/user-attachments/assets/1cce877f-6b0b-489f-b8ef-d88dedaccf30"> The chart doesn't show comparison data: <img width="1884" alt="correct" src="https://github.com/user-attachments/assets/d9a081fb-7eee-485a-84e6-54e707440db7"> ### TESTING INSTRUCTIONS 1. Create a table chart with a version of the time comparison where Enable Time Comparison checkbox was used 2. Run a comparison data (Mark the checkbox and select a time range) 3. Unmark the checkbox and run the chart data again so your chart has no longer comparison info 4. Use more updated version and run the migrations so your table is upgraded 5. You must not see time comparison data in the table. ### 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 - [X] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [X] Migration is atomic, supports rollback & is backwards-compatible - [X] 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]
