mikebridge commented on code in PR #45554:
URL: https://github.com/apache/superset/pull/45554#discussion_r4402834317
##########
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:
Good catch. In b05772649b the preview path accepts an explicit `{}`. The
truthiness guard is gone, and the dictionary-type and write-permission checks
stay. A new route test covers writer and read-only callers with `{}`, an
ignored field, `null`, a list and `false`. It fails before the fix: a writer
sending `{}` got only the static schema. With the fix, a writer gets the
provider's defaults, while read-only and non-object inputs still get the
static, unresolved schema.
I also checked the other `config`/`or {}` truthiness tests on these paths.
The preview was the only one gating admission; the rest just default or
serialize output.
--
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]