gharris1727 commented on code in PR #13445:
URL: https://github.com/apache/kafka/pull/13445#discussion_r1149755190
##########
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractHerder.java:
##########
@@ -856,11 +867,8 @@ public List<ConfigKeyInfo> connectorPluginConfig(String
pluginName) {
default:
throw new BadRequestException("Invalid plugin type " +
pluginType + ". Valid types are sink, source, converter, header_converter,
transformation, predicate.");
}
- List<ConfigKeyInfo> results = new ArrayList<>();
- for (ConfigDef.ConfigKey configKey :
configDefs.configKeys().values()) {
- results.add(AbstractHerder.convertConfigKey(configKey));
- }
- return results;
+ addConfigDefToResult(results, configDefs);
+ return new ArrayList<>(results);
Review Comment:
It looks like ConfigKeyInfo uses very strict equality, such that if a
connector exports a ConfigKeyInfo with the same name but with some other
difference, the Set would consider them distinct. This means that the list and
set are largely equivalent here.
It looks like in the validate call, connector config keys with the same name
as framework keys override the framework provided key:
https://github.com/apache/kafka/blob/trunk/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/AbstractHerder.java#L511
We could replicate the same behavior here so that users don't get two
distinct keys with the same name.
--
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]