SOLR-17697 Implement picocli for create and delete commands#4269
SOLR-17697 Implement picocli for create and delete commands#4269janhoy wants to merge 5 commits intoapache:jira/SOLR-17697-picoclifrom
Conversation
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.
|
@copilot resolve the merge conflicts in this pull request |
epugh
left a comment
There was a problem hiding this comment.
This is all looking great. the -hvV where Version is on each command seems a bit not needed, but also, no real harm. I debated "time to make -sh and -rf not allowed/changed, but they are fine. The fomratting ofr them is slightly off, but no big deal. I look forward to getting this to done done! No issues yet with what https://clig.dev/ says!
https://issues.apache.org/jira/browse/SOLR-17697