KAFKA-14588: Move ConfigCommand to tools module#22013
Open
mimaison wants to merge 2 commits intoapache:trunkfrom
Open
KAFKA-14588: Move ConfigCommand to tools module#22013mimaison wants to merge 2 commits intoapache:trunkfrom
mimaison wants to merge 2 commits intoapache:trunkfrom
Conversation
mimaison
commented
Apr 9, 2026
| } | ||
|
|
||
| @ClusterTest(types = {Type.CO_KRAFT, Type.KRAFT}) | ||
| public void testIntervalMsParser(ClusterInstance clusterInstance) { |
Member
Author
There was a problem hiding this comment.
This was moved to ConfigCommandIntegrationTest
mimaison
commented
Apr 9, 2026
|
|
||
| val adminClient = adminClients.head | ||
| alterSslKeystoreUsingConfigCommand(sslProperties1, SecureExternal) | ||
| alterSslKeystore(sslProperties1, SecureExternal) |
Member
Author
There was a problem hiding this comment.
I did not see the point in using the tool instead of the Admin API
Rewrite ConfigCommand in Java and move it to the tools module
m1a2st
reviewed
Apr 10, 2026
Collaborator
m1a2st
left a comment
There was a problem hiding this comment.
Thanks for the patch, left some comments
Comment on lines
+517
to
+520
| boolean noMatchInResources = listGroupConfigResources(adminClient) | ||
| .map(resources -> resources.stream().noneMatch(resource -> resource.name().equals(name))) | ||
| .orElse(true); | ||
| if (noMatchInGroups && noMatchInResources) { |
Collaborator
There was a problem hiding this comment.
The semantics here don’t match the Scala version. .orElse(true) returns true when listGroupConfigResources is empty, whereas Scala’s .exists(...) returns false for an empty Option.
Member
Author
There was a problem hiding this comment.
Good catch! I agree this should be orElse(false)
| * Alternatively, --user-defaults, --client-defaults, --broker-defaults, or --ip-defaults may be specified in place of | ||
| * --entity-type <users|clients|brokers|ips> --entity-default, respectively. | ||
| */ | ||
| class ConfigCommand { |
Collaborator
There was a problem hiding this comment.
Should it be public class?
| } | ||
| } | ||
|
|
||
|
|
Member
Author
|
Thanks @m1a2st for the review! I pushed an update |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rewrite ConfigCommand in Java and move it to the tools module
Reviewers: Ken Huang s7133700@gmail.com