Repository navigation
fix(semantic-layer): preserve metadata generation on unchanged configuration - #45907
Draft
mikebridge wants to merge 1 commit into
Draft
mikebridge wants to merge 1 commit into
mikebridge wants to merge 1 commit into
Conversation
…uration Compare effective configuration content before invalidating metadata. Omit unchanged configuration writes so a stale no-op save cannot overwrite a concurrent edit without a new generation. Preserve explicit clearing and invalidation for actual changes.
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #45907 +/- ##
===========================================
- Coverage 84.73% 65.64% -19.09%
===========================================
Files 3069 3069
Lines 205767 205787 +20
Branches 48388 48392 +4
===========================================
- Hits 174350 135091 -39259
- Misses 28123 67617 +39494
+ Partials 3294 3079 -215
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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