rusackas opened a new pull request, #40140: URL: https://github.com/apache/superset/pull/40140
### SUMMARY This is a **test-only PR** opened as a TDD-style validation of issue #26338. #26338 (filed 2023-12) reports that dashboard import does not remap \`chartsInScope\` IDs in native filter configuration. The export side does convert these IDs to UUIDs (\`export_example.py:325\`), but the import side never converts them back, so the imported dashboard ends up with stale source-environment chart IDs in \`chartsInScope\` — breaking \`filtersInScope\` / \`filtersOutScope\` computation. This PR adds two regression tests on \`update_id_refs\`: 1. **\`test_update_id_refs_remaps_charts_in_scope\`** — native filter \`chartsInScope: [101, 102, 103]\` must remap to destination IDs and drop unresolvable refs. 2. **\`test_update_id_refs_remaps_cross_filter_charts_in_scope\`** — cross-filter \`crossFilters.chartsInScope\` (per-chart) must remap symmetrically. Existing tests in this file cover scope.excluded, rootPath, and other ID remapping fields, but not chartsInScope — exactly the gap #26338 sits in. ### How to interpret CI - **CI green** → \`chartsInScope\` is now remapped correctly during import; merging closes #26338 and locks in the regression guards. - **CI red** → bug is still live. Likely fix in \`superset/commands/dashboard/importers/v1/utils.py\`: in \`update_id_refs\`, add a remap pass for \`chartsInScope\` on each native filter and on each \`crossFilters\` entry, mirroring the existing \`scope.excluded\` handling. Drop unresolvable IDs rather than passing them through. ### TESTING INSTRUCTIONS \`\`\`bash pytest tests/unit_tests/dashboards/commands/importers/v1/utils_test.py::test_update_id_refs_remaps_charts_in_scope -v pytest tests/unit_tests/dashboards/commands/importers/v1/utils_test.py::test_update_id_refs_remaps_cross_filter_charts_in_scope -v \`\`\` ### ADDITIONAL INFORMATION - [ ] Has associated issue: closes #26338 - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration - [ ] 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]
