gerlowskija opened a new pull request, #3991: URL: https://github.com/apache/solr/pull/3991
https://issues.apache.org/jira/browse/SOLR-16738 # Description AdminHandlersProxy, in its current form, is a bit unwieldy to extend to cover our v2 API: it relies on GenericSolrRequest to send requests, assumes a NamedList<Object> in several method signatures, assumes certain parameter names as triggers for proxying, and even has special cases for certain "wt" values. To truly support v2-proxying, AdminHandlersProxy would need to be more flexible about parameter names and SolrJ return types. # Solution This PR refactors AdminHandlersProxy to make it more amendable for use with v2 APIs going forward. The refactor makes the following changes: 1. Rather than a cluster of static methods, AdminHandlersProxy is now an abstract parent class that provides the general structure of request proxying, error-handling, and response-parsing and aggregation. 2. Specific details that might vary on an API-by-API basis are now isolated in concrete AdminHandlersProxy implementations. These concrete impls act essentially as "strategies" defining nitty-gritty details of how proxying should happen and how responses should be handled. Two implementations are provided in this PR: PrometheusRequestProxy and NormalV1RequestProxy (better name pending - 😬). - This doesn't totally cover everything we need for v2 APIs but the division of "abstract-parent" and "concrete-strategy-impl" gives us a much firmer foundation for v2 to build on. 4. All of the involved classes are moved into a new "core" package: `o.a.s.handler.admin.proxy` # Tests Unit tests for AdminHandlersProxy, PrometheusRequestProxy, and NormalV1RequestProxy will be added prior to coming out of "draft" mode. # Checklist Please review the following and check all that apply: - [ ] I have reviewed the guidelines for [How to Contribute](https://github.com/apache/solr/blob/main/CONTRIBUTING.md) 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](https://help.github.com/en/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork) 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](https://github.com/apache/solr/tree/main/solr/solr-ref-guide) - [ ] I have added a [changelog entry](https://github.com/apache/solr/blob/main/dev-docs/changelog.adoc) for my change -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
