KAFKA-12744: Upgrade argparse4j to 0.9.0 - #23033
Open
lh0156 wants to merge 1 commit into
Open
Conversation
Generated-by: OpenAI Codex (GPT-5)
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.
Corresponding JIRA ticket: https://issues.apache.org/jira/browse/KAFKA-12744
What is the purpose of this change?
Upgrade argparse4j from 0.7.0 to 0.9.0 and migrate Kafka's production parser construction to the supported builder API. The migration preserves the existing parser behavior, including help handling, prefix characters, and from-file prefixes, while updating the moved
HelpScreenExceptionpackage andLICENSE-binary.Brief change log
ArgumentParsers.newArgumentParsercall withnewFor(...).build().HelpScreenExceptionimports to the argparse4j 0.9.0 package.ArgumentActioncallback suppression local to its required override.Testing
./gradlew :shell:compileJava :generator:compileJava :tools:compileJava :connect:mirror:compileJava :trogdor:compileJava :core:compileScala --no-build-cache --console=plain./gradlew :core:test --tests kafka.tools.StorageToolTest --tests kafka.docker.KafkaDockerWrapperTest :tools:test --tests org.apache.kafka.tools.MetadataQuorumCommandUnitTest --tests org.apache.kafka.tools.FeatureCommandTest --tests org.apache.kafka.tools.TransactionsCommandTest --no-build-cache --console=plain./gradlew :shell:test --tests org.apache.kafka.shell.command.CommandTest --no-build-cache --console=plain./gradlew :trogdor:test --tests org.apache.kafka.trogdor.agent.AgentTest --tests org.apache.kafka.trogdor.coordinator.CoordinatorTest --tests org.apache.kafka.trogdor.coordinator.CoordinatorClientTest --no-build-cache --console=plain./gradlew :generator:test --no-build-cache --console=plainpassed all 104 tests in a normal clone../gradlew spotlessCheck --no-build-cache --console=plaingit diff --checkThe broad root check was started with the known worktree-only generator Git test excluded; the visible suites passed, and the run was stopped because it expanded into the full long-running integration suite. The targeted module tests and the complete generator suite passed independently.