rusackas opened a new pull request, #44151:
URL: https://github.com/apache/superset/pull/44151

   ### SUMMARY
   
   `migrate_chart()` (used by both example loading and the chart import API) 
unconditionally migrated any imported `viz_type: table` chart to 
`ag-grid-table`, regardless of `AG_GRID_TABLE_ENABLED`. Since that flag 
defaults to `False` and the frontend only registers the `ag-grid-table` plugin 
(`MainPreset.ts`) when it's on, every fresh install running `superset 
load_examples` ended up with charts whose stored `viz_type` the running 
frontend can't render at all:
   
   ```
   Error: Item with key "ag-grid-table" is not registered.
   ```
   
   At least seven of the bundled example dashboards are affected 
(`fcc_new_coder_survey`, `featured_charts`, `sales_dashboard`, 
`slack_dashboard`, `usa_births_names`, `video_game_sales`, `world_health`), and 
any external import of a `table`-viz chart hits the same failure.
   
   Adds `MigrateViz.requires_feature_flag`, set on `MigrateTableChart`, and 
checks it only in the importer path 
(`superset/commands/chart/importers/v1/utils.py::migrate_chart`). 
`superset/cli/viz_migrations.py`'s `migrate_viz` CLI is untouched: running that 
command is already the deliberate opt-in the flag exists to gate.
   
   ### TESTING INSTRUCTIONS
   
   1. On a fresh install with `AG_GRID_TABLE_ENABLED` left at its default 
(`False`), run `superset load_examples` and open any of the affected dashboards 
(e.g. `video_game_sales`). Every chart renders instead of showing the "not 
registered" error.
   2. `pytest tests/unit_tests/charts/commands/importers/v1/utils_test.py 
tests/unit_tests/migrations/` — includes two new tests: importing a `table` 
chart leaves it as `table` by default, and still migrates normally to 
`ag-grid-table` when the flag is enabled.
   
   ### 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))
     - [ ] 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]

Reply via email to