Skip to content

SOLR-18214: Default configset clone base to _default when omitted#4368

Open
openworld-maker wants to merge 1 commit intoapache:mainfrom
openworld-maker:pr-18214-local
Open

SOLR-18214: Default configset clone base to _default when omitted#4368
openworld-maker wants to merge 1 commit intoapache:mainfrom
openworld-maker:pr-18214-local

Conversation

@openworld-maker
Copy link
Copy Markdown
Contributor

@openworld-maker openworld-maker commented Apr 27, 2026

What

Fixes SOLR-18214 by making baseConfigSet optional in the v2 configset clone/create API path.

When baseConfigSet is omitted, the API now uses _default (matching documented behavior and v1 mapping semantics).

Changes

  • In CloneConfigSet, resolve omitted/empty requestBody.baseConfigSet to CloneConfigsetRequestBody.DEFAULT_CONFIGSET.
  • Use the resolved value consistently for existence validation and command payload construction.
  • Add focused unit test for defaulting behavior:
    • CloneConfigSetAPITest.testMissingBaseConfigSetDefaultsToDefaultConfigset
  • Add SolrCloud integration coverage for the real v2 request path:
    • TestConfigSetsAPI.testV2CreateWithoutBaseConfigsetUsesDefault

Validation

Ran in Docker (JDK 21):

  • :solr:core:test --tests 'org.apache.solr.cloud.TestConfigSetsAPI' --tests 'org.apache.solr.handler.configsets.*'
  • :solr:core:spotlessCheck

Result: BUILD SUCCESSFUL (56 tests, 1 skipped for selected test scope).

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.

1 participant