Repository navigation
fix(semantic-layer): preserve metadata generation on unchanged configuration - #45907
Merged
Merged
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✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #45907 +/- ##
==========================================
+ Coverage 84.73% 84.81% +0.07%
==========================================
Files 3069 3070 +1
Lines 205767 207229 +1462
Branches 48388 48731 +343
==========================================
+ Hits 174350 175754 +1404
+ Misses 28123 28113 -10
- Partials 3294 3362 +68
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:
|
…nfiguration The update command validates restored credentials but omits unchanged configuration writes to preserve generation and avoid stale-reader overwrites. Assert that contract instead of requiring a redundant rewrite, retaining checks for restored-secret validation and no cache invalidation.
mikebridge
marked this pull request as ready for review
November 2, 2026 15:01
Contributor
Do not treat SQL NULL or an empty string as an existing empty JSON object. Let the existing parse-error handler classify these values as changed so a valid empty configuration is persisted and invalidates metadata. Pin both cases after a database reload.
aminghadersohi
approved these changes
Nov 3, 2026
aminghadersohi
left a comment
Contributor
There was a problem hiding this comment.
Verified at this head: stored NULL and empty-string configuration now persist a {} repair and bump the cache generation, and restoring the old fallback fails both new test cases.
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