xiangfu0 commented on code in PR #19236:
URL: https://github.com/apache/pinot/pull/19236#discussion_r3798325269


##########
pinot-spi/src/main/java/org/apache/pinot/spi/utils/Obfuscator.java:
##########
@@ -119,14 +125,21 @@ public String toJsonString(Object object) {
   private JsonNode toJsonRecursive(JsonNode node) {
     if (node.isObject()) {
       node.fieldNames().forEachRemaining(field -> {
-        if (_patterns.stream().anyMatch(pattern -> 
pattern.matcher(field).matches())) {
+        JsonNode fieldValue = node.get(field);
+        boolean preservePlaceholder = _useDefaultCredentialPolicy && 
fieldValue.isTextual()
+            && 
TableConfigRedactionUtils.isUnresolvedPlaceholder(fieldValue.textValue());

Review Comment:
   Fixed in 25cc6b4026. Whole-placeholder preservation now requires a valid 
wrapper and non-empty key, so mixed placeholder/text values continue through 
structured redaction. Regression coverage includes the reported mixed URI 
shape, multiple placeholders, and JSON-valued defaults containing literal 
braces.



##########
pinot-spi/src/main/java/org/apache/pinot/spi/config/ConfigUtils.java:
##########
@@ -65,8 +65,8 @@ public static <T extends BaseJsonConfig> T 
applyConfigWithEnvVariablesAndSystemP
       return (T) JsonUtils.jsonNodeToObject(jsonNode, 
configTemplate.getClass());
     } catch (IOException e) {
       throw new RuntimeException(String
-          .format("Unable to read JsonConfig to class [%s] after applying 
environment variables, jsonConfig is: '%s'.",
-              configTemplate.getClass().getName(), jsonNode.toString()), e);
+          .format("Unable to read JsonConfig to class [%s] after applying 
environment variables.",
+              configTemplate.getClass().getName()), e);

Review Comment:
   Fixed in 25cc6b4026. The Jackson decode failure is now wrapped without 
retaining the original cause. The regression makes the rejected numeric value 
itself the sentinel and asserts both a null cause and no sentinel in the 
rendered stack trace.



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