Icewind52 commented on code in PR #24247:
URL: https://github.com/apache/kafka/pull/24247#discussion_r4609119389
##########
tools/src/main/java/org/apache/kafka/tools/ConfigCommand.java:
##########
@@ -648,6 +658,10 @@ private static DescribeConfigContext
describeConfigContext(String entityType, St
} else if (GROUP_TYPE.equals(entityType)) {
configResourceType = ConfigResource.Type.GROUP;
dynamicConfigSource =
ConfigEntry.ConfigSource.DYNAMIC_GROUP_CONFIG;
+ } else if (CLUSTER_MIRROR_TYPE.equals(entityType)) {
+ configResourceType = ConfigResource.Type.CLUSTER_MIRROR;
+ // TODO: ConfigEntry.ConfigSource has no dynamic source for
cluster mirrors yet, so UNKNOWN is a placeholder
Review Comment:
ConfigEntry.ConfigSource has no dynamic source for cluster mirrors, and
KIP-1279 doesn't seem to add one (its "Type Enumerations" section only extends
ConfigResource.Type, EntityType and ResourceType). I used UNKNOWN as a
placeholder so this branch stays consistent with the other types.
Without --all, describe only prints entries whose source matches, so once
the server returns cluster mirror configs with a real source, a plain
--describe would print nothing for mirrors until this is updated.
How would you like to handle it?
1. Add a cluster-mirror config source in a follow-up (a new
DescribeConfigsResponse.ConfigSource wire value plus
ConfigEntry.ConfigSource.DYNAMIC_CLUSTER_MIRROR_CONFIG, likely needing a KIP
update), and keep the placeholder here until then.
2. Skip source filtering for cluster mirrors for now (show all returned
entries).
Any feedback is appreciated.
--
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]