Skip to content

SOLR-16396 | Migrate GET config sections updateHandler, directoryFactory, indexConfig, and codecFactory to JAX-RS. - #5023

Merged
epugh merged 21 commits into
apache:mainfrom
jaykay12:SOLR-16396-config-get-components
Oct 13, 2026
Merged

epugh merged 21 commits into
apache:mainfrom
jaykay12:SOLR-16396-config-get-components

Conversation

@jaykay12

@jaykay12 jaykay12 commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

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

Description

Part of SOLR-16396 (Config GET → JAX-RS)

This PR: migrate the five same-shape section GETs to JAX-RS:

  • GET /config/query
  • GET /config/updateHandler
  • GET /config/directoryFactory
  • GET /config/indexConfig
  • GET /config/codecFactory

Already landed / related:

Solution

  • Add ConfigApi.Get#getConfigComponent with an allow-listed @path regex for those five names & reused ConfigInfoResponse.

  • Implement on GetConfig: convert SolrConfig, slice one section, wrap with NullKeyTolerantMap (shared solrConfigAsMap / jsonSafeCopy with full getConfig). Do not run implicit-handler / expandParams logic — those sections never had it.

  • V1 SolrConfigHandler.handleGET squashes these five through the same Jersey method (MIGRATED_CONFIG_COMPONENTS). Other sections stay on the legacy branch.

  • Leave AnnotatedApi GET /config/{component} in place for unmigrated names.

  • TODOs: keep the path regex in sync with the Set; drop the Set when remaining sections migrate.

AI Disclaimer: Used Cursor for Approach formulation, code is fully vetted & reviewed by me.

Tests

  • GetConfigTest / GetConfigSolrCloudTest: SolrJ GetConfigComponent for each
    migrated section; assert single-key config map.
  • Existing v1 TestSolrConfigHandler paths (e.g. /config/updateHandler) continue
    to exercise squash.

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 left a comment

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.

self-review ✅

@jaykay12

jaykay12 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Testing for codecFactory

type main branch feature branch
v1 api Screenshot 2026-10-13 at 8 59 36 AM Screenshot 2026-10-13 at 9 05 57 AM
- - -
v2 api Screenshot 2026-10-13 at 8 59 44 AM Screenshot 2026-10-13 at 9 06 10 AM

@jaykay12

jaykay12 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Testing for indexConfig

type main branch feature branch
v1 api Screenshot 2026-10-13 at 9 00 55 AM Screenshot 2026-10-13 at 9 06 22 AM
- - -
v2 api Screenshot 2026-10-13 at 9 01 03 AM Screenshot 2026-10-13 at 9 06 33 AM

v1 API gives 404 for /indexConfig in production as well, its missing in the subpath registration done in SolrConfigHandler, @epugh lmk if we should fix it? I will create jira for it & raise minor fix PR for the same.

since, v2 is the new future & it works there, so not raising any PR before confirmation. that 404 behaviour remains the same in this PR right now.

@jaykay12

Copy link
Copy Markdown
Contributor Author

Testing for directoryFactory

type main branch feature branch
v1 api Screenshot 2026-10-13 at 9 17 51 AM Screenshot 2026-10-13 at 9 23 55 AM
- - -
v2 api Screenshot 2026-10-13 at 9 17 59 AM Screenshot 2026-10-13 at 9 24 07 AM

@jaykay12

Copy link
Copy Markdown
Contributor Author

Testing for updateHandler

type main branch feature branch
v1 api Screenshot 2026-10-13 at 9 18 14 AM Screenshot 2026-10-13 at 9 24 19 AM
- - -
v2 api Screenshot 2026-10-13 at 9 18 27 AM Screenshot 2026-10-13 at 9 24 29 AM

@jaykay12

jaykay12 commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor Author

Testing for query

type main branch feature branch
v1 api Screenshot 2026-10-13 at 10 17 01 AM Screenshot 2026-10-13 at 10 18 27 AM
- - -
v2 api Screenshot 2026-10-13 at 10 17 14 AM Screenshot 2026-10-13 at 10 18 37 AM

Update

Encountered cases like:
http://localhost:8983/solr/techproducts/config/query?componentName=filterCache&meta=true
http://localhost:8983/api/collections/techproducts/config/query?componentName=filterCache&meta=true

which i came to know via failing test in TestPackages

query would be migrated to V2 alongside others of its own type.

Moving out query from this PR scope for now.

@jaykay12 jaykay12 changed the title SOLR-16396 | Migrate GET config sections query, updateHandler, directoryFactory, indexConfig, and codecFactory to JAX-RS. SOLR-16396 | Migrate GET config sections updateHandler, directoryFactory, indexConfig, and codecFactory to JAX-RS. Oct 13, 2026

@jaykay12 jaykay12 left a comment

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.

self review ✅
local testing ✅
precommit passes ✅

@epugh can you please review & run workflow triggers on this?


// TODO: Keep this regex in sync with GetConfig.MIGRATED_CONFIG_COMPONENTS
@GET
@Path("/{component:updateHandler|directoryFactory|indexConfig|codecFactory}")

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.

interesting! I mean, why not...

@epugh epugh left a comment

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.

LGTM. tested locallyl

@epugh
epugh merged commit b5e8ae1 into apache:main Oct 13, 2026
6 checks passed
@jaykay12
jaykay12 deleted the SOLR-16396-config-get-components branch October 13, 2026 09:35
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