Repository navigation
SOLR-18516: Port PostTool and PostLogsTool to picocli - #5042
Open
serhiy-bzhezytskyy wants to merge 4 commits into
Open
serhiy-bzhezytskyy wants to merge 4 commits into
serhiy-bzhezytskyy wants to merge 4 commits into
Conversation
Adds the picocli code path next to the commons-cli one for both commands, with test twins, the generated reference pages and test_postlogs.bats and test_extraction.bats in the picocli suite.
The reference guide calls it the Post command, so the generated page now opens with the same words.
janhoy
reviewed
Oct 7, 2026
janhoy
left a comment
Contributor
There was a problem hiding this comment.
Apart from the general changelog comment and a few nits, LGTM
| assert_output --partial "Created collection 'COLL_NAME'" | ||
|
|
||
| run solr postlogs --solr-url http://localhost:${SOLR_PORT} -c COLL_NAME -rootdir ${SOLR_LOGS_DIR}/solr.log | ||
| run solr postlogs --solr-url http://localhost:${SOLR_PORT} -c COLL_NAME --rootdir ${SOLR_LOGS_DIR}/solr.log |
Contributor
There was a problem hiding this comment.
Please check the ref guide only spells it --rootdir
| " bin/solr post -c gettingstarted *.json", | ||
| "", | ||
| " # Index a tab-separated file, using the CSV handler's separator param", | ||
| " bin/solr post -c gettingstarted --params \"separator=%%09\" --type text/csv data.tsv", |
Contributor
There was a problem hiding this comment.
Please verify the generated solr-post.adoc shows %09, not %%09.
No picocli feature has been released yet, so a new command is a detail of the SOLR-17697 entry. Its author and JIRA are added there instead of a separate entry.
The Ref Guide listed it as -rootdir, which commons-cli accepts but picocli does not; --rootdir works with both parsers and is what the example and the generated page use.
Contributor
Author
|
Both checked: the generated |
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-18516
Description
Adds the picocli code path for
bin/solr postandbin/solr postlogs, next to the commons-cli one.test_postlogs.batsandtest_extraction.batscould not join the picocli suite until now.Solution
PostToolandPostLogsToolget their annotated options andcallTool()and are registered inSolrCLI; the commons-cli path is unchanged. Written with Claude Code.Tests
PostToolPicocliTestruns the existingPostToolTestthrough picocli; its--paramsvalue no longer carries literal quotes, which commons-cli strips and picocli keeps.PostLogsToolCliTestandPostLogsToolPicocliTestpost a small log through both parsers.test_postlogs.batsnow says--rootdir, as picocli does not take-rootdir. Both BATS files pass under both parsers and are added tointegrationTestsPicocli;check -x testis clean (rat skipped).Checklist
mainbranch../gradlew check.