richardfogaca opened a new pull request, #40804: URL: https://github.com/apache/superset/pull/40804
### SUMMARY Fixes map chart compatibility around the MapLibre migration: - Preserves saved non-Mapbox Deck GL and legacy Mapbox-chart styles on the MapLibre path instead of reclassifying them as Mapbox. - Keeps true saved `mapbox://` styles Mapbox-backed, so deployments without `MAPBOX_API_KEY` continue to show the existing missing-key signal rather than silently changing providers. - Restores an explicit `Streets (OSM)` MapLibre-compatible style with OpenStreetMap tile attribution and shares the renderer/style helpers across Deck GL and point-cluster controls. - Wires GeoJSON and Polygon renderer/style controls into the rendered map container so selected MapLibre/Mapbox styles affect output. - Documents the migration behavior and no-key Mapbox affordance in `UPDATING.md`. ## What Changed - Migration normalization: only true `mapbox://` styles choose the Mapbox renderer; non-Mapbox legacy style strings are copied to `maplibre_style` when that value is absent. - Shared map utilities: OSM constants, raster tile style conversion, Mapbox key detection, and renderer option gating live in `@superset-ui/core` utilities and are reused by affected map plugins. - Render propagation: GeoJSON and Polygon map form data is converted into provider-specific style and key props before rendering. - Support notes: `UPDATING.md` documents non-Mapbox preservation, true Mapbox no-key behavior, and OSM attribution expectations. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A - no provider-visible media is attached in this draft. The affected UI behavior was exercised in a local Superset runtime: no-key Deck GL and point-cluster Explore controls showed `Streets (OSM)` as available with Mapbox disabled, saved true Mapbox charts showed the `MAPBOX_API_KEY` required message, and GeoJSON/Polygon charts rendered MapLibre/OSM maps with attribution. ### TESTING INSTRUCTIONS Repeatable checks: ```bash pytest tests/integration_tests/migrations/ce6bd21901ab_migrate_deckgl_and_mapbox__test.py -q cd superset-frontend npm run test -- packages/superset-ui-core/src/utils/mapStyles.test.ts plugins/preset-chart-deckgl/src/DeckGLContainer.test.tsx plugins/preset-chart-deckgl/src/utilities/Shared_DeckGL.test.ts plugins/preset-chart-deckgl/src/layers/Geojson/Geojson.test.tsx plugins/preset-chart-deckgl/src/layers/Polygon/Polygon.test.tsx plugins/plugin-chart-point-cluster-map/test/controlPanel.test.ts plugins/plugin-chart-point-cluster-map/test/MapLibre.test.tsx plugins/plugin-chart-point-cluster-map/test/transformProps.test.ts ``` ## Validation Live browser validation in a local Superset runtime with `MAPBOX_API_KEY` unset: - Open Deck GL and point-cluster Explore controls; observe `Streets (OSM)` remains selectable and Mapbox is disabled for new selection. - Open saved true Mapbox Deck GL and point-cluster charts; observe the existing `MAPBOX_API_KEY` required message is preserved. - Open GeoJSON and Polygon charts configured for MapLibre/OSM; observe rendered map data and OpenStreetMap attribution, confirming renderer/style propagation reaches the shared map container. ## Reviewer Focus - Review the migration normalization carefully: existing `map_renderer` and existing `maplibre_style` values should not be overwritten, and true `mapbox://` styles should remain Mapbox-backed. - Check renderer option consistency across the Deck GL and point-cluster controls, especially no-key saved-state behavior. - Check GeoJSON and Polygon provider/style propagation into the shared map container. - The OSM style uses public OpenStreetMap tiles and must keep visible attribution. ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [x] 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 - [x] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API Migration notes: this updates the existing MapLibre migration before an application release tag contains the upstream migration. The change only rewrites chart metadata JSON during the migration path, preserves existing renderer choices and existing `maplibre_style`, and keeps downgrade behavior scoped to removing the migration-added renderer marker. Runtime impact is bounded to the existing paginated chart-slice migration. -- 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]
