Skip to content

SOLR-16398: Migrate SplitCore from @EndPoint/@Command to JAX-RS - #4179

Merged
epugh merged 19 commits into
apache:mainfrom
epugh:copilot/migrate-splitcoreapi-to-jaxrs
Nov 10, 2026
Merged

epugh merged 19 commits into
apache:mainfrom
epugh:copilot/migrate-splitcoreapi-to-jaxrs

Conversation

@epugh

@epugh epugh commented Mar 3, 2026 •

Copy link
Copy Markdown
Contributor

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

This migrates SplitCore to JAX-RS and moves the business logic into the v2 classes

Copilot AI and others added 8 commits February 28, 2026 14:54
Co-authored-by: epugh <22395+epugh@users.noreply.github.com>
Co-authored-by: epugh <22395+epugh@users.noreply.github.com>
Co-authored-by: epugh <22395+epugh@users.noreply.github.com>
…client via getSolrClient()

Co-authored-by: epugh <22395+epugh@users.noreply.github.com>
…sts after JAX-RS migration

Co-authored-by: epugh <22395+epugh@users.noreply.github.com>
…cks after JAX-RS migration

Co-authored-by: epugh <22395+epugh@users.noreply.github.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation tests cat:api labels Mar 3, 2026
@gerlowskija

Copy link
Copy Markdown
Contributor

The PR description here doesn't look right - it talks only about a failure in TestApiFramework, which doesn't really seem like the point of this PR.

@gerlowskija

Copy link
Copy Markdown
Contributor

Is there a JIRA associated with this PR? Should there be?

import org.junit.Test;

/** Tests for the split shard V2 endpoint via the generated SolrJ client. */
public class SplitShardAPITest extends SolrTestCaseJ4 {

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.

[-0] Any reason you created a new test class as opposed to adding the error-case test to SplitShardTest or a similar existing test class? That'd be my slight preference IMO.

@gerlowskija

Copy link
Copy Markdown
Contributor

@epugh - is this something you're looking to resume?

@epugh

epugh commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

@epugh - is this something you're looking to resume?

Yes, but I don't have an immediate plan for this. And honestly, I don't even know if I would use this PR, or just start fresh based on what I've learned since this journey started. And if someone else wants to pick it up, aboslutly ready to support ;-)

@epugh
epugh marked this pull request as ready for review August 28, 2026 17:47
@epugh epugh changed the title Migrate SplitCore and SplitShard to Jax-rs Migrate SplitCore and SplitShard APIs from @EndPoint/@Command to JAX-RS Aug 28, 2026
@epugh epugh changed the title Migrate SplitCore and SplitShard APIs from @EndPoint/@Command to JAX-RS SOLR-16398: Migrate SplitCore and SplitShard APIs from @EndPoint/@Command to JAX-RS Aug 28, 2026
@epugh

epugh commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

Is there a JIRA associated with this PR? Should there be?

there is already, upated it to reflect hat.

@epugh

epugh commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

The PR description here doesn't look right - it talks only about a failure in TestApiFramework, which doesn't really seem like the point of this PR.

fixed!!!

@epugh
epugh requested a review from gerlowskija August 28, 2026 18:13
@epugh

epugh commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

@gerlowskija okay, this has a had a good work out... Would love your review...

@github-actions

Copy link
Copy Markdown

This PR has had no activity for 60 days and is now labeled as stale. Any new activity will remove the stale label. To attract more reviewers, please tag people who might be familiar with the code area and/or notify the dev@solr.apache.org mailing list. To exempt this PR from being marked as stale, make it a draft PR or add the label "exempt-stale". If left unattended, this PR will be closed after another 60 days of inactivity. Thank you for your contribution!

@github-actions github-actions Bot added the stale PR not updated in 60 days label Oct 28, 2026
@gerlowskija

Copy link
Copy Markdown
Contributor

Hey @epugh - I noticed that a different PR went in recently that migrated SplitShard to JAX-RS. Is this PR still valid?

Sorry my delay caused it to sit for so long, but if we rescope the PR to be SplitCore only I can try to review more promptly this time!

@epugh

epugh commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Hey @epugh - I noticed that a different PR went in recently that migrated SplitShard to JAX-RS. Is this PR still valid?

Sorry my delay caused it to sit for so long, but if we rescope the PR to be SplitCore only I can try to review more promptly this time!

No worries! Yeah, this one is so old from that first burp of Copilot generated migrations, from before we had our V2 Apis Convention doc! Yeah, if you want to narrow to just SplitCore, that would be great. Let me update this to main branch first however...

@epugh epugh changed the title SOLR-16398: Migrate SplitCore and SplitShard APIs from @EndPoint/@Command to JAX-RS SOLR-16398: Migrate SplitCore from @EndPoint/@Command to JAX-RS Nov 4, 2026
@github-actions github-actions Bot removed the cat:cloud label Nov 4, 2026
@epugh

epugh commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

@gerlowskija okay, this has been cut down to just "SplitCore"!

@github-actions github-actions Bot removed the stale PR not updated in 60 days label Nov 5, 2026
epugh and others added 2 commits November 10, 2026 12:59
SplitOp defaulted the missing 'core' param to "" instead of null, so
SplitCoreAPI.splitCore()'s ensureRequiredParameterProvided() null-check
never fired. Execution then reached
CoreAdminAPIBase.handlePotentiallyAsynchronousTask(), whose finally
block unconditionally calls rsp.setHttpCaching(false) — in this test,
rsp is null, so that NPE masked the "core container missing"
SolrException, and CoreAdminOperation's catch-all rewrapped it as a
500. Every other CoreAdminOp uses params.required().get(CORE) or an
early ensureRequiredParameterProvided() check precisely to avoid ever
reaching that finally block when the core name is absent; SplitOp is
brought in line with that pattern.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018RwsEje8u9apx3SRzissZm
…Task's finally block

An unconditional rsp.setHttpCaching(false) in the finally block meant
that whenever rsp was null, the resulting NPE silently replaced
whatever SolrException (BAD_REQUEST or otherwise) had just been thrown
in the try block, which CoreAdminOperation's catch-all then rewrapped
as a generic 500. This affects every V2 core-admin API built on
CoreAdminAPIBase, not just split.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018RwsEje8u9apx3SRzissZm
@epugh
epugh merged commit 1c673ce into apache:main Nov 10, 2026
6 of 7 checks passed
@epugh epugh added this to the 10.x milestone Nov 10, 2026
dsmiley pushed a commit that referenced this pull request Nov 11, 2026
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: epugh <22395+epugh@users.noreply.github.com>
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
(cherry picked from commit 1c673ce)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cat:api documentation Improvements or additions to documentation tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants