This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 710037d3d2f chore(importers): log field names instead of full config 
on validation failure (#42399)
710037d3d2f is described below

commit 710037d3d2fa3f67c412aa634e59c410eac9dd74
Author: Evan Rusackas <[email protected]>
AuthorDate: Sun Jul 26 17:36:34 2026 -0700

    chore(importers): log field names instead of full config on validation 
failure (#42399)
    
    Co-authored-by: Claude Fable 5 <[email protected]>
---
 superset/commands/importers/v1/utils.py | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/superset/commands/importers/v1/utils.py 
b/superset/commands/importers/v1/utils.py
index f2fe9eaba0a..6f07e99dcab 100644
--- a/superset/commands/importers/v1/utils.py
+++ b/superset/commands/importers/v1/utils.py
@@ -230,7 +230,21 @@ def load_configs(
                     prefix,
                     exc.messages,
                 )
-                logger.debug("Config content that failed validation: %s", 
config)
+                # Log field names only; full values can be huge (e.g. inline
+                # example data) and drown out the validation error above. Guard
+                # the diagnostic so it can never raise and mask the validation
+                # error: config may be a non-mapping or have unsortable keys.
+                if isinstance(config, dict):
+                    field_names = ", ".join(sorted(map(str, config)))
+                    logger.debug(
+                        "Config fields present in %s: %s", file_name, 
field_names
+                    )
+                else:
+                    logger.debug(
+                        "Config in %s is not a mapping (type: %s)",
+                        file_name,
+                        type(config).__name__,
+                    )
                 exc.messages = {file_name: exc.messages}
                 exceptions.append(exc)
 

Reply via email to