SOLR-17697 Implement picocli for create and delete commands#4269
Open
janhoy wants to merge 4 commits intoapache:jira/SOLR-17697-picoclifrom
Open
SOLR-17697 Implement picocli for create and delete commands#4269janhoy wants to merge 4 commits intoapache:jira/SOLR-17697-picoclifrom
janhoy wants to merge 4 commits intoapache:jira/SOLR-17697-picoclifrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Implements picocli-based parsing/execution for the existing solr create and solr delete CLI commands, and wires them into the picocli-enabled solr entrypoint to support the new usage/help output shown in the PR description.
Changes:
- Register
CreateToolandDeleteToolas picocli subcommands ofSolrCLI. - Add picocli option mixins/shared option groups (
CredentialsOptions,ConnectionOptions) and implementcallTool()paths for create/delete. - Relax a packaging BATS assertion to accommodate picocli’s mutual-exclusion error wording.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| solr/packaging/test/test_create.bats | Updates assertion for mutually-exclusive connection options under picocli. |
| solr/core/src/java/org/apache/solr/cli/SolrCLI.java | Adds create and delete as picocli subcommands. |
| solr/core/src/java/org/apache/solr/cli/CreateTool.java | Adds picocli annotations/fields and implements callTool() logic for create. |
| solr/core/src/java/org/apache/solr/cli/DeleteTool.java | Adds picocli annotations/fields and implements callTool() logic for delete. |
| solr/core/src/java/org/apache/solr/cli/CredentialsOptions.java | New picocli mixin for --credentials. |
| solr/core/src/java/org/apache/solr/cli/ConnectionOptions.java | New picocli ArgGroup for mutually-exclusive --solr-url/--zk-host. |
Comments suppressed due to low confidence (1)
solr/core/src/java/org/apache/solr/cli/DeleteTool.java:210
- This warning suggests passing
--force-delete-config, but the actual option defined by this tool is-f/--force(and there is no--force-delete-config). Update the message to reference the correct flag so users can resolve the warning.
log.warn(
"Configuration directory {} is also being used by {}{}",
configName,
inUse.get(),
"; configuration will not be deleted from ZooKeeper. You can pass the --force-delete-config flag to force delete.");
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
https://issues.apache.org/jira/browse/SOLR-17697