Skip to content

Extract CLIUtils.solrUrlFromConnection() from normalizeSolrUrl(CommandLine) - #4683

Merged
janhoy merged 1 commit into
apache:mainfrom
janhoy:CLIUtils-solrUrlFromConnection
Jul 30, 2026
Merged

Extract CLIUtils.solrUrlFromConnection() from normalizeSolrUrl(CommandLine)#4683
janhoy merged 1 commit into
apache:mainfrom
janhoy:CLIUtils-solrUrlFromConnection

Conversation

@janhoy

@janhoy janhoy commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Extracts the connection-string-to-Solr-URL resolution logic added in SOLR-18130 (HTTP form used directly; ZooKeeper form queried for a live node's base URL) out of the commons-cli-coupled normalizeSolrUrl(CommandLine) into a reusable public helper solrUrlFromConnection(CloudSolrClientConnection, credentials). The commons-cli path delegates to it, so there is no behavior change.

This makes the resolution reusable outside commons-cli contexts — e.g. the picocli migration branch (#3254) needs it — and landing it on main independently keeps non-picocli drift off that long-running branch.

…dLine)

Makes the connection-string-to-Solr-URL resolution reusable outside of
commons-cli contexts. No behavior change.
@janhoy janhoy added this to the 10.x milestone Jul 30, 2026

@epugh epugh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this also would address the comment on #4672 (comment) and make that PR better.... I was stuggling a bit on understanding that chain of logic when I was working on #4672, and here you did it independently!

Comment thread solr/core/src/java/org/apache/solr/cli/CLIUtils.java
@janhoy
janhoy merged commit 9f5fac2 into apache:main Jul 30, 2026
4 of 6 checks passed
@janhoy
janhoy deleted the CLIUtils-solrUrlFromConnection branch July 30, 2026 15:02
dsmiley pushed a commit that referenced this pull request Aug 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants