Repository navigation
SOLR-18520 | Package Uninstall should work in absence of clusterprops.json file - #5052
Merged
Merged
Conversation
8 tasks done
dsmiley
approved these changes
Oct 7, 2026
| pluginsValue = response.get(ContainerPluginsApi.PLUGIN); | ||
| } | ||
| } catch (RemoteSolrException ex) { | ||
| if (log.isDebugEnabled()) { |
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-18520
While working on this: #5047 & testing the Uninstall command, i found this issue which seems like a bug to me.
Description
Package Uninstall should work in absence of clusterprops.json file
Solution
Uninstall always looks at clusterprops first to see if the package is still deployed as a cluster plugin. That check was failing in two ways.
First, when clusterprops (or the API that serves it) isn’t there, Solr can throw a RemoteSolrException. That wasn’t caught — we only handled SolrServerException / IOException — so uninstall died before it ever called delete. For that case we now treat it as “nothing deployed at cluster level” and continue. Real I/O / server errors still fail as before.
Second, the delete call used PackageUtils.PACKAGE_PATH (/api/cluster/package) with V2Request.Builder, which already adds /api, so the request went to /api/api/cluster/package. It now uses /cluster/package, matching how the package tests build the same request.
AI Usage Disclaimer - Assitance of Cursor taken in debugging, code is fully vetted, tested & reviewed by @jaykay12
Main Branch
This feature Branch
Tests
Please describe the tests you've developed or run to confirm this patch implements the feature or solves the problem.
Checklist
Please review the following and check all that apply:
mainbranch../gradlew check.