gkneighb opened a new pull request, #44618: URL: https://github.com/apache/superset/pull/44618
### SUMMARY A saved bubble chart loses its color scheme and row limit on any `update_chart` call that does not mention them. `BubbleChartPlugin.normalize_column_refs` dumps the config with a bare `config.model_dump()`, so the config it returns reports **every** field as set. `update_chart` swaps `parsed_config` for that normalized config, and `merge_chart_form_data` preserves `color_scheme` and `row_limit` only when they are absent from `model_fields_set`. For bubble the preservation added in #44188 therefore never fires. Measured against a saved chart, updating only the metric aggregate: ``` BEFORE row_limit=3 color_scheme=googleCategory10c AFTER row_limit=10000 color_scheme=supersetColors ``` `PieChartPlugin.normalize_column_refs` already passes `exclude_unset=True`, which is why pie keeps both. This applies the same one word to bubble. Canonical column-name resolution is unaffected — `country` still resolves to `Country` — because the fields that matter for normalization are exactly the ones the caller sent. Credit to @gabotorresruiz, who found this while reviewing the radar plugin (#43571) and noted bubble carried the identical shape on master. Radar is fixed on its own PR. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A — backend/MCP only, no UI change. ### TESTING INSTRUCTIONS `pytest tests/unit_tests/mcp_service/chart/test_chart_utils.py -k merge_bubble_preserves_omitted_defaults` The new test is a twin of the existing `test_merge_chart_preserves_omitted_defaults` for pie: it runs the config through `DatasetValidator.normalize_column_names` first, exactly as `update_chart` does, then asserts an omitted color scheme and row limit survive the merge while explicitly supplied values still win. It fails on master and passes with this change. ### 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 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
