Repository navigation
Conversation
epugh
left a comment
There was a problem hiding this comment.
One suggested change, but otherwise LGTM!
|
|
||
| Solr is migrating the `bin/solr` command line tool from Apache Commons CLI to https://picocli.info/[picocli]. | ||
| While that work is in progress, both implementations ship together and the picocli one can be enabled on request. | ||
| Solr has migrated the `bin/solr` command line tool from Apache Commons CLI to https://picocli.info/[picocli]. |
There was a problem hiding this comment.
This should be removed on Solr 11 Ref Guide, of course, we need it on solr 10. I hope we see commons-cli removed from Solr 11 very soon!
There was a problem hiding this comment.
yes, we will plan for the cleanup as well real quick.
|
🤖 AI text below 🤖 (reviewed by Nick Shanin) Thanks for this. SOLR_PICOCLI=false is the escape hatch as described. Two things to tidy before merge:
@test "create help with SOLR_PICOCLI=false uses the commons-cli fallback" {
SOLR_PICOCLI=false run solr create --help
assert_success
assert_output --partial 'bin/solr create'
refute_output --partial 'Usage: solr create'
}I haven't run this example, so the expected strings are unconfirmed. CI failure: The "Run Solr Script Tests" job fails on one assertion in |
actually, we are maintaining 1 single CL file for the picoCLI migration & not every PR wise. thus, the cl file is updated & the jira it carries is the main parent one, under which all these subtasks land upon.
thanks @nick-boss-tech for the review. that makes me doubt, if this is intermittent only & we should check it again. @epugh requesting you to retrigger the workflows again, & we will keep an eye on the bats this time. |
| 'test/test_snapshots.bats', | ||
| 'test/test_ssl.bats', | ||
| 'test/test_start_solr.bats', | ||
| 'test/test_zz_cleanup.bats', |
There was a problem hiding this comment.
So this means we now run the entire BATS suite for picocli, right?
There was a problem hiding this comment.
we are running 26/30 bats suite for now, the 4 that are not in the list: tests_basic_auth, test_help, test_post & test_stream. I will work on debugging & fixing in a quick follow-up PR & then those will also get added. we will then remove this Todo & then we can say all 30 BATs suite runs for PicoCLI.
| [NOTE] | ||
| ==== | ||
| This page documents the `bin/solr` script as it behaves by default. | ||
| An experimental re-implementation of the command line interface, built on picocli, is also included in this release. | ||
| It is disabled by default, and the options it accepts differ in places from those documented here. | ||
| A re-implementation of the command line interface, built on picocli, is also included in this release. | ||
| It is enabled by default, and the options it accepts differ in places from those documented here. | ||
| See xref:cli/index.adoc[] if you would like to try it. | ||
| ==== |
There was a problem hiding this comment.
I think this NOTE shuold be replaced with a short note about commons-cli being available as an escape hatch. The link to xref:cli/index.adoc[] should instead be a new paragraph == Man pages or similar, telling that each command has its own documentation page and the link.
I wonder if perhpas most of the remainder of this adoc page can be deleted since it is manually maintained and largely redundant with the new man pages? There are some general sections near the bottom that could perhaps stay.
There was a problem hiding this comment.
I think this NOTE shuold be replaced with a short note about commons-cli being available as an escape hatch. The link to xref:cli/index.adoc[] should instead be a new paragraph == Man pages or similar, telling that each command has its own documentation page and the link.
have done few changes in the wordings here.
There was a problem hiding this comment.
I wonder if perhpas most of the remainder of this adoc page can be deleted since it is manually maintained and largely redundant with the new man pages? There are some general sections near the bottom that could perhaps stay.
imo, we should not do this cleanup now. This solr-control-script-reference.adoc ties back to commons-cli & till the time we are supporting commons-cli there is no harm in keeping it. when we remove commons-cli support, this ref guide also dies alongside it.
we are explicitly asking users to report any behaviour diff if they observe with respect to this page over in the bottom of index.sdoc.
There was a problem hiding this comment.
The wording "See xref:cli/index.adoc[] if you would like to try it" feels strange when this is now the actual default. So we should instead actively point people to the new CLI page as the reference docs for what is now the default CLI commands.
IMO these two pages shuold be written as if picocli was our only choice, and mention commons-cli as a side-note and escape hatch if they run in to a bug.
It's probably ok to keep some of the tool descriptions on the control-script-reference page, unless they contradict options or output from picocli. Perhaps we should add a heading saying that the below section describes the fallback commons-cli and may differ from what is now default?
janhoy
left a comment
There was a problem hiding this comment.
DId a review, sorry for not grouping all comments under this review. I did not yet take it for a spin or render the ref guide to inspect how it reads. After next round of edits I'll take it for a spin.
PS: I merged Nick's small ssl bats change but did not merge it into this branch so won't see the effect yet.
Co-authored-by: Jan Høydahl <[email protected]>
Co-authored-by: Jan Høydahl <[email protected]>

https://issues.apache.org/jira/browse/SOLR-18561
Description
Flipping CLI default flag to PicoCLI
Based upon the Dev-List item: https://lists.apache.org/thread.html/zxckzh6v98xqjfxf8kn3l73g3593nfly
Solution
SOLR_PICOCLI=false is the hatch, which helps us be backward-compatible & use commons-cli in case any unforeseen error comes.
Tests
NA
Checklist
Please review the following and check all that apply:
mainbranch../gradlew check.