Copilot commented on code in PR #29814:
URL: https://github.com/apache/flink/pull/29814#discussion_r4503224415
##########
flink-core/src/main/java/org/apache/flink/configuration/ConfigurationUtils.java:
##########
@@ -252,13 +256,35 @@ public static List<String> convertConfigToWritableLines(
return YamlParserUtils.convertAndDumpYamlFromFlatMap(
Collections.unmodifiableMap(configuration.confData));
} else {
- Map<String, String> fileWritableMap =
configuration.toFileWritableMap();
- return fileWritableMap.entrySet().stream()
- .map(entry -> entry.getKey() + ": " + entry.getValue())
+ // goes through addAllToProperties so that DelegatingConfiguration
exports its entries
+ final Properties rawEntries = new Properties();
+ configuration.addAllToProperties(rawEntries);
Review Comment:
This now returns an empty flattened list for nested
`DelegatingConfiguration` wrappers, such as a configuration containing
`outer.inner.key=value` wrapped first with `outer.` and then with `inner.`.
`addAllToProperties()` reads the backing wrapper's empty `confData` directly,
whereas the previous export recursed through the wrappers. Make the raw-entry
export recursive in `DelegatingConfiguration` and add a nested-delegation
regression test.
--
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]