You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2026/10/08 15:02:00 UTC

[jira] [Commented] (SOLR-18510) Port AssertTool to PicoCli

    [ https://issues.apache.org/jira/browse/SOLR-18510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18125092#comment-18125092 ] 

ASF subversion and git services commented on SOLR-18510:
--------------------------------------------------------

Commit 34e475784af8ab5f7683c79957a218e0243f4d29 in solr's branch refs/heads/main from Serhiy Bzhezytskyy
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=34e475784af ]

SOLR-18510: Port AssertTool to picocli (#5036)

> Port AssertTool to PicoCli
> --------------------------
>
>                 Key: SOLR-18510
>                 URL: https://issues.apache.org/jira/browse/SOLR-18510
>             Project: Solr
>          Issue Type: Improvement
>          Components: cli
>            Reporter: Jan Høydahl
>            Priority: Major
>              Labels: newdev, pull-request-available
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Port {{AssertTool}} to picocli, adding the picocli code path alongside the existing commons-cli one.
> *Covers:* {{bin/solr assert}}
> The command performs one of a set of mutually exclusive assertions and exits non-zero when it fails: {{\-\-cloud}} / {{\-\-not-cloud}}, {{\-\-started}} / {{\-\-not-started}}, {{\-\-exists}} / {{\-\-not-exists}}, {{\-\-root}} / {{\-\-not-root}}, plus {{\-\-same-user}}, with {{\-\-timeout}}, {{\-\-message}} and {{\-\-exitcode}} shaping the outcome. There are no sub-commands.
> The real work is expressing those mutually exclusive assertion pairs as picocli {{@ArgGroup}}s instead of the hand-rolled checks the commons-cli path uses.
> Worth prioritising, because this one gates test coverage rather than just a command: {{test_auth.bats}} cannot join the {{integrationTestsPicocli}} suite until {{assert}} is ported, since it uses {{solr assert}} to wait for startup.
> *Acceptance criteria*
> * {{bin/solr assert}} and all its options work with {{SOLR_PICOCLI=true}}, and the commons-cli path is left behaviourally unchanged.
> * {{AssertTool}} is registered in {{SolrCLI}}'s picocli {{subcommands}} list and {{ToolBase.callTool()}} is implemented, replacing the {{UnsupportedOperationException}} stub.
> * Shared options reuse the existing mixins rather than redeclaring them.
> * An {{AssertToolPicocliTest}} subclasses the existing test and overrides only the {{runTool}} hook, so the inherited assertions run through both parsers.
> * {{./gradlew :solr:solr-ref-guide:generateCliDocs}} is re-run and the generated {{cli/solr-assert.adoc}} page is committed, so {{checkCliDocsUpToDate}} passes.
> *AI assistance:* a coding-agent prompt template encoding the patterns already established by the ported tools is available at [https://gist.github.com/janhoy/a3fe0dbcaadf24b3493558946cc549d9] — name {{AssertTool}} in its Assignment line up front and the rest of the prompt adapts. Please review agent output as carefully as hand-written code.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org