Skip to content

SOLR-18520 | Package Uninstall should work in absence of clusterprops.json file - #5052

Merged
dsmiley merged 10 commits into
apache:mainfrom
jaykay12:SOLR-18520-uninstall-bug
Oct 8, 2026
Merged

dsmiley merged 10 commits into
apache:mainfrom
jaykay12:SOLR-18520-uninstall-bug

Conversation

@jaykay12

@jaykay12 jaykay12 commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

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

Screenshot 2026-10-07 at 10 49 06 AM

This feature Branch

Screenshot 2026-10-07 at 11 24 05 AM

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:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended, not available for branches on forks living under an organisation)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Reference Guide
  • I have added a changelog entry for my change

@jaykay12 jaykay12 changed the title SOLR-18520 | Package Uninstall works in absence of clusterprops.json file SOLR-18520 | Package Uninstall should work in absence of clusterprops.json file Oct 7, 2026
pluginsValue = response.get(ContainerPluginsApi.PLUGIN);
}
} catch (RemoteSolrException ex) {
if (log.isDebugEnabled()) {

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.

no need for the condition

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.

removed

@jaykay12
jaykay12 requested a review from dsmiley October 8, 2026 12:31
@dsmiley dsmiley added this to the 9.x milestone Oct 8, 2026
@dsmiley
dsmiley merged commit 2f2b21b into apache:main Oct 8, 2026
1 check passed
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