Repository navigation
SOLR-18514: Port HealthcheckTool to picocli - #5041
Merged
janhoy merged 7 commits intoOct 8, 2026
Merged
Conversation
Adds the picocli code path next to the commons-cli one, with a test twin, the generated reference page and test_healthcheck.bats in the picocli suite.
The generated page now says what the command checks (document counts, leaders, active replicas) and that it needs SolrCloud, matching the healthcheck page of the reference guide instead of a generic sentence.
janhoy
requested changes
Oct 7, 2026
janhoy
left a comment
Contributor
There was a problem hiding this comment.
A general comment about changelog that applies to all PRs.
Also a minor
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.
After the Cloud-mode error the picocli path called runtime.exit(1) and relied on code after it never running; returning 1 does the same and keeps the method straight-line. The commons-cli path is unchanged.
EnvUtils maps the SOLR_CONNECTION environment variable to solr.connection, so the solr-connection key the healthcheck connection lookup read could never be set. The picocli path now reads the right key, which a test covers.
janhoy
approved these changes
Oct 8, 2026
…healthcheck # Conflicts: # changelog/unreleased/SOLR-17697-picocli-experimental-cli.yml # solr/core/src/java/org/apache/solr/cli/SolrCLI.java # solr/packaging/build.gradle # solr/solr-ref-guide/modules/deployment-guide/deployment-nav.adoc # solr/solr-ref-guide/modules/deployment-guide/pages/cli/index.adoc
dsmiley
pushed a commit
that referenced
this pull request
Oct 9, 2026
Co-authored-by: Jan Høydahl <janhoy@apache.org> (cherry picked from commit bde37d6)
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-18514
Description
Adds the picocli code path for
bin/solr healthcheck, next to the commons-cli one.test_healthcheck.batscould not join the picocli suite until now.Solution
HealthcheckToolgets its annotated options andcallTool()and is registered inSolrCLI; the commons-cli path is unchanged. The connection is resolved in the same order as under commons-cli. Written with Claude Code.Tests
HealthcheckToolPicocliTestruns the existingHealthcheckToolTestthrough picocli.test_healthcheck.batspasses under both parsers and is added tointegrationTestsPicocli;check -x testis clean (rat skipped).Checklist
mainbranch../gradlew check.