mikebridge commented on code in PR #45907:
URL: https://github.com/apache/superset/pull/45907#discussion_r4448679534
##########
superset/commands/semantic_layer/update.py:
##########
@@ -219,7 +219,19 @@ def run(self) -> Model:
self._properties["configuration"]
)
if "configuration" in self._properties:
- self._model.clear_metadata_cache()
+ try:
+ unchanged: bool = json.dumps(
+ json.loads(self._model.configuration or "{}"),
sort_keys=True
+ ) == json.dumps(
+ json.loads(self._properties["configuration"]),
sort_keys=True
+ )
Review Comment:
Good catch — both NULL and empty-string configurations can persist, and the
fallback incorrectly classified an empty-object repair as a no-op. Fixed in
https://github.com/apache/superset/commit/25406ca9327113747ec796f5dbcfcaa09c976528:
the comparison now parses the stored value directly, with the existing
TypeError/ValueError handler treating an unparsable value as changed. The
regressions reload both bad values from the database and verify that saving {}
persists the repair and increments the generation. Both failed before the fix;
the command and cache suites now pass all 76 tests.
--
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]