rusackas commented on code in PR #42399:
URL: https://github.com/apache/superset/pull/42399#discussion_r3651453630


##########
superset/commands/importers/v1/utils.py:
##########
@@ -230,7 +230,11 @@ 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.
+                logger.debug(
+                    "Config fields present in %s: %s", file_name, 
sorted(config)
+                )

Review Comment:
   Good catch, fixed! Guarded it with an `isinstance` check and str-cast the 
keys before sorting, so a non-mapping or mixed-key config can't throw and 
swallow the ValidationError.



##########
superset/commands/importers/v1/utils.py:
##########
@@ -230,7 +230,11 @@
                     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.
+                logger.debug(
+                    "Config fields present in %s: %s", file_name, 
sorted(config)

Review Comment:
   This only logs the top-level field names (the dict keys), never their 
values. Dropping the values from this log is the whole point of the change, so 
I'm reading this as a false positive.



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