Repository navigation
SOLR-16398: Migrate SplitCore from @EndPoint/@Command to JAX-RS - #4179
Conversation
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>
|
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. |
|
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 { |
There was a problem hiding this comment.
[-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.
|
@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 ;-) |
…itcoreapi-to-jaxrs
…egate to V2 logic.
there is already, upated it to reflect hat. |
fixed!!! |
|
@gerlowskija okay, this has a had a good work out... Would love your review... |
|
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! |
|
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... |
|
@gerlowskija okay, this has been cut down to just "SplitCore"! |
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
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)
https://issues.apache.org/jira/browse/SOLR-16398
This migrates SplitCore to JAX-RS and moves the business logic into the v2 classes