mikebridge opened a new pull request, #45907: URL: https://github.com/apache/superset/pull/45907
### SUMMARY TL;DR: Saving an unchanged semantic-layer configuration keeps its metadata cache generation and avoids rewriting the configuration. Actual changes and explicit cache clearing still invalidate metadata. Background: connection edits can submit the existing configuration again. Previously, simply including that field rotated the generation and discarded reusable metadata. Comparing the validated, unmasked JSON content avoids this unnecessary invalidation. Object key order and formatting are ignored; value types and list order remain significant. An unchanged configuration is omitted from the database update as well, so a stale no-op save cannot overwrite a newer concurrent configuration. Malformed stored configuration remains repairable through an actual update. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF Not applicable; backend change only. ### TESTING INSTRUCTIONS Run `python -m pytest tests/unit_tests/semantic_layers/simple_cache_clear_test.py -q` (41 passed). The unchanged-save and reordered-JSON regressions failed before the fix. A stale-reader regression failed against the first implementation, then passed after unchanged configuration writes were omitted. Changed-file hooks, including MyPy and pylint, pass. ### ADDITIONAL INFORMATION - Required feature flag: SEMANTIC_LAYERS. - No migration or public API change. - Independent of the MetricFlow ordering fix; either can merge first. -- 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]
