sadpandajoe commented on code in PR #45554:
URL: https://github.com/apache/superset/pull/45554#discussion_r4397335672


##########
superset/semantic_layers/masking.py:
##########
@@ -388,6 +393,21 @@ def _contains_mask(value: Any) -> bool:
     return value == PASSWORD_MASK
 
 
+def credential_readiness(configuration: Any) -> SemanticCredentialReadiness:
+    """Normalize raw host configuration before provider validation loses 
fields.
+
+    This does not resolve saved secrets or check required provider fields. Only
+    the host interprets its sentinel; client assertions never set this signal.
+    """
+    if (
+        not isinstance(configuration, dict)
+        or not configuration

Review Comment:
   The `{}` fix covers the helper and the runtime-schema endpoint, but the 
preview endpoint still reports `UNRESOLVED` for an explicit `{}`: the `and 
config` guard at `superset/semantic_layers/api.py:848` skips both 
`_parse_partial_config` and `credential_readiness`, so 
`get_configuration_schema` receives `None` and `UNRESOLVED`. A defaults-only 
provider therefore gets only the static schema while `{"ignored": "x"}` yields 
the same parsed defaults with `RESOLVED`, which also contradicts the 
empty-object rule in `semantic-provider-boundary.md`. Should the truthiness 
guard be dropped there (keeping the dict and write-permission checks), with a 
preview test for `{}`?



-- 
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]

Reply via email to