Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOLR-15744: Convert task-mgmt v2 APIs to annotations #863

Conversation

gerlowskija
Copy link
Contributor

Description

Solr is slowly moving over to standardize on the "annotation-based" framework for implementing APIs, but many APIs remain using the old apispec framework.

Solution

This commit switches over the two apispec files holding our "task management" APIs to the new annotation framework.

Tests

Since there is no difference between the v2 and v1 task management APIs (other than path prefix), this commit isn't adding any new functionality to test. It's just refactoring existing functionality and relying on existing tests. I have tested it manually though.

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.
  • I have added tests for my changes.
  • I have added documentation for the Reference Guide

Solr's been in the slow process of moving its v2 APIs away from the
existing apispec/mapping framework towards one that relies on more
explicit annotations to specify API properties.

This commit converts the APIs from the core.tasks.cancel.json and
core.tasks.list.json apispec files to the "new" framework.
/**
* V2 API for cancelling a currently running "task".
*
* <p>This API (GET /v2/collections/collectionName/tasks/cancel) is analogous to the v1
Copy link
Contributor

@epugh epugh May 16, 2022

Choose a reason for hiding this comment

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

tiny nit pick.. in the docs we use both collName and collectionName, but here we use collectionName.. ;-(. I think I'm saying I like you spelled it out!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(I updated the docs PR to use the full "collectionName" based on your comment here 👍 )

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.

LGTM

@gerlowskija gerlowskija merged commit 7b1aa1b into apache:main May 18, 2022
@gerlowskija gerlowskija deleted the SOLR-15744-convert-tasks-APIs-to-annotations branch May 18, 2022 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants