rusackas opened a new pull request, #40135: URL: https://github.com/apache/superset/pull/40135
### SUMMARY This is a **test-only PR** opened as a TDD-style validation of issue #19944. #19944 (filed 2022-05) reports that dashboard import/export drops filter scoping — filters end up applied to all charts even when scoping was set before export. The dashboard filter system was substantially refactored after that report (filter-box charts → native filters with `scope.rootPath` + `scope.excluded`). This PR adds two regression tests on the **post-refactor** import path (`update_id_refs`): 1. **`test_update_native_filter_config_preserves_rootpath_and_remaps_excluded`** — uses non-default `rootPath` values (`["TAB-revenue"]`, `["TAB-inventory", "TAB-revenue"]`) and asserts they pass through the import untouched, while `excluded` chart IDs are correctly remapped to destination-env IDs. 2. **`test_update_native_filter_config_default_rootpath_preserved`** — pins the "apply everywhere" default `["ROOT_ID"]`, so a future special-case that drops or rewrites it can't silently change "apply everywhere" into "apply nowhere". ### How to interpret CI - **CI green** → modern native filter scoping survives import correctly. The bug as originally filed has been resolved by the filter refactor; merging this PR closes #19944 and locks in the regression guards. - **CI red** → real bug. The fix should land before merging this PR, and the tests will validate the fix. The existing `test_update_native_filter_config_scope_excluded` only asserts on `excluded` (line 85 of `utils_test.py`); the original bug describes `rootPath` semantics, which had no coverage until now. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF N/A — test-only. ### TESTING INSTRUCTIONS ```bash pytest tests/unit_tests/dashboards/commands/importers/v1/utils_test.py::test_update_native_filter_config_preserves_rootpath_and_remaps_excluded -v pytest tests/unit_tests/dashboards/commands/importers/v1/utils_test.py::test_update_native_filter_config_default_rootpath_preserved -v ``` ### ADDITIONAL INFORMATION - [ ] Has associated issue: closes #19944 - [ ] 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]
