Skip to content

Comments

SOLR-16825: Migrate api definitions to submodule, pt 3#1902

Merged
gerlowskija merged 7 commits intoapache:mainfrom
gerlowskija:SOLR-16825-api-migration-pt-3
Sep 11, 2023
Merged

SOLR-16825: Migrate api definitions to submodule, pt 3#1902
gerlowskija merged 7 commits intoapache:mainfrom
gerlowskija:SOLR-16825-api-migration-pt-3

Conversation

@gerlowskija
Copy link
Contributor

@gerlowskija gerlowskija commented Sep 7, 2023

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

Description

SOLR-16825 added a new gradle module, 'api', which holds v2 API definitions as interfaces. This allows us to generate an OAS (and SolrRequest implementations from that) as a part of the solrj build.

But these artifacts (the OAS and generated Java code), only cover the v2 APIs that have interfaces in the 'api' module. We need to extract interfaces to live in 'api' for each v2 API in 'core' that doesn't already have one.

Solution

This PR creates 'api' interfaces for a number of v2 APIs, allowing SolrRequest implementations to be generated for them. The following APIs are covered in this PR:

  • rename-collection
  • get-node-public-key
  • sync-shard
  • balance-replicas
  • force-leader
  • replace-node

Tests

PR is a refactor, so doesn't add any additional tests. But manual testing has been done to make sure the affected v2 APIs continue to work, and existing tests continue to pass.

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)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.

Copy link
Contributor

@epugh epugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really hope that you had a code refactoring tool for this?!

@gerlowskija gerlowskija merged commit 88b5571 into apache:main Sep 11, 2023
@gerlowskija gerlowskija deleted the SOLR-16825-api-migration-pt-3 branch September 11, 2023 17:58
gerlowskija added a commit that referenced this pull request Sep 11, 2023
This commit covers the rename-collection, get-public-key, sync-shard, balance-
replicas, force-leader, and replace-node APIs.

Extracting annotated interfaces for these APIs includes them in the SolrRequest-
generation we now do in SolrJ.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants