mikebridge opened a new pull request, #44396: URL: https://github.com/apache/superset/pull/44396
### SUMMARY Restore semantic-view-backed charts and dashboards against an existing, accessible semantic view with the same UUID. Charts export a typed `datasource_ref`; native-filter and display-control targets export `datasourceRef`. Chart, dashboard and assets importers resolve those references before any asset writes and rebind destination IDs throughout chart params/query context and dashboard targets. Missing, denied, feature-disabled or unregistered dependencies fail clearly and atomically. This does not export semantic connection/view configuration or credentials, provision provider resources, or contact providers. Full cross-workspace provisioning is a separate scope. Legacy table bundles keep `dataset_uuid` and their existing dependency import behavior. Tracks [SC-121077](https://app.shortcut.com/preset/story/121077). ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF No UI change. Before: semantic chart export loses datasource identity and reimport fails with required `dataset_uuid`. After: a typed semantic UUID resolves to the already provisioned destination view; no same-ID table substitution. ### TESTING INSTRUCTIONS 1. In disposable local fixtures with `SEMANTIC_LAYERS` enabled and provider registered, export a semantic chart/dashboard and import it where the same accessible view UUID exists (its integer ID may differ). 2. Confirm chart datasource type, params/query-context IDs, native-filter/display-control references, and ordinary table chart behavior. Never delete shared dashboards to test this. 3. Repeat with missing/denied view, disabled feature and missing provider: whole bundle must fail with actionable dependency error and no partial writes. 4. Run the focused modules: `python -m pytest tests/unit_tests/semantic_layers/import_export_test.py tests/unit_tests/commands/chart/semantic_export_test.py tests/unit_tests/commands/dashboard/export_test.py tests/unit_tests/commands/importers/v1/assets_test.py tests/unit_tests/commands/importers/v1/examples_test.py -q`. Local verification: **116 tests passed** across those five modules, covering real SQLite identity collisions, destination-ID rebinding, rollback, and public-command parsing. Baseline negative control: 9 failed / 1 passed; public-command error control: 3 failed. Removing export gates produced 7 failed / 1 passed. Source restoration was content-verified. All applicable pre-commit hooks passed, including MyPy and custom pylint. Full-branch Python and independent final-tree authorization/data-write review found no blockers. No full HTTP/RBAC, browser/provider-query or PostgreSQL/MySQL result is claimed. Known non-blocking limitations: the assets browser download may show a generic error page for a failed dependency (JSON clients receive 422); the existing dashboard-export CLI assumes a user named `admin`. The examples loader rejects semantic bundles explicitly; use chart/dashboard/assets import instead. ### ADDITIONAL INFORMATION - [x] Has associated issue: SC-121077 - [x] Required feature flags: `SEMANTIC_LAYERS` for semantic references only - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in SIP-59) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [x] Introduces new feature or API: additive typed semantic bundle reference - [ ] Removes existing feature or API Overlap checked read-only: #44347 remains open (table-only soft-deleted export lookup), #43232 remains open (annotation bundles). Neither author's branch changed or copied. Older readers cannot import new semantic reference bundles; ordinary table bundle encoding remains compatible. -- 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]
