Skip to content

SOLR-18180: migrate configset upload tool to using SolrJ Upload #4250

Open
epugh wants to merge 9 commits intoapache:mainfrom
epugh:copilot/migrate-configset-upload-tool
Open

SOLR-18180: migrate configset upload tool to using SolrJ Upload #4250
epugh wants to merge 9 commits intoapache:mainfrom
epugh:copilot/migrate-configset-upload-tool

Conversation

@epugh
Copy link
Copy Markdown
Contributor

@epugh epugh commented Mar 29, 2026

https://issues.apache.org/jira/browse/SOLR-18180

Description

Instead of a direct Zookeeper interface, lets use the SolrJ Upload endpoint.

Solution

Use our existing Solr api to upload a configSet.

Tests

manual and added new ones.


try (var solrClient = CLIUtils.getSolrClient(cli)) {
byte[] zipData = createZipData(confPath);
var request = new GenericV2SolrRequest(SolrRequest.METHOD.PUT, "/configsets/" + confName);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We have a SolrJ end point to use... Need to dig into our annotations?

Copilot AI and others added 2 commits March 29, 2026 20:11
@QueryParam("overwrite") Boolean overwrite,
@QueryParam("cleanup") Boolean cleanup,
@RequestBody(required = true) InputStream requestBody)
@RequestBody(
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@gerlowskija I am curious why copilot thought we needed to modify this end point... In this PR I was hoping to just pick up on using an existing end point... Maybe it wasn't fully fleshed out?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It IS in our spreadsheet as PUT /api/configsets/configsetName <req-body> in https://docs.google.com/spreadsheets/d/1HAoBBFPpSiT8mJmgNZKkZAPwfCfPvlc08m5jz3fQBpA/edit?gid=687305869#gid=687305869

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

the test_zk.bats passed!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I wanted to balance the ConfigSetUploadToolTest.java testing pattern, so I pulled this out of ZkSubCommandsTest.java.

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