You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "jaykay12 (via GitHub)" <gi...@apache.org> on 2026/06/18 19:46:37 UTC
[PR] SOLR-18248 : Refactor List APIs to use Nested Interfaces [solr]
jaykay12 opened a new pull request, #4537:
URL: https://github.com/apache/solr/pull/4537
https://issues.apache.org/jira/browse/SOLR-XXXXX
<!--
_(If you are a project committer then you may remove some/all of the following template.)_
Before creating a pull request, please file an issue in the ASF Jira system for Solr:
* https://issues.apache.org/jira/projects/SOLR
For something minor (i.e. that wouldn't be worth putting in release notes), you can skip JIRA.
To create a Jira issue, you will need to create an account there first.
The title of the PR should reference the Jira issue number in the form:
* SOLR-####: <short description of problem or changes>
SOLR must be fully capitalized. A short description helps people scanning pull requests for items they can work on.
Properly referencing the issue in the title ensures that Jira is correctly updated with code review comments and commits. -->
# Description
This will be a follow-up to this PR: https://github.com/apache/solr/pull/4452
# Solution
Please provide a short description of the approach taken to implement your solution.
We appreciate transparent disclosure of significant [AI Coding assistants](https://github.com/apache/solr/blob/main/dev-docs/how-to-contribute.adoc#setup-for-contributing) usage.
# Tests
Please describe the tests you've developed or run to confirm this patch implements the feature or solves the problem.
# 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: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-18248 : Refactor List APIs to use Nested Interfaces [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on PR #4537:
URL: https://github.com/apache/solr/pull/4537#issuecomment-5303625674
Also @jaykay12 can you fix the changelog entry?
--
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: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-18248 : Refactor List APIs to use Nested Interfaces [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh commented on PR #4537:
URL: https://github.com/apache/solr/pull/4537#issuecomment-5303612861
Can you remind me what we needed this PR as a follow up to #4452? It looks better, but I can't quite remember what the issue was that we had in 4452 that made us decide to punt it...
--
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: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-18248 : Refactor List APIs to use Nested Interfaces [solr]
Posted by "jaykay12 (via GitHub)" <gi...@apache.org>.
jaykay12 commented on PR #4537:
URL: https://github.com/apache/solr/pull/4537#issuecomment-5381144688
> Can you remind me what we needed this PR as a follow up to #4452? It looks better, but I can't quite remember what the issue was that we had in 4452 that made us decide to punt it...
hey @epugh yes, this suggestion to use Interface this way came from your suggestion: https://github.com/apache/solr/pull/4452#discussion_r3314008365 which I tried incorporating in the PR: https://github.com/apache/solr/pull/4452 but i faced some issue related to v2 API not getting registered correctly & me getting 404.
https://github.com/apache/solr/pull/4452#issuecomment-4606416964 -> then we decided to take those delta changes to a follow-up PR, which is this one now.
That 404 issue got fixed after addressing this suggestion by copilot: 🚀 https://github.com/apache/solr/pull/4537#discussion_r3789973260
> Also @jaykay12 can you fix the changelog entry?
yes, @epugh have fixed it.
--
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: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-18248 : Refactor List APIs to use Nested Interfaces [solr]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #4537:
URL: https://github.com/apache/solr/pull/4537#discussion_r3789973260
##########
solr/api/src/java/org/apache/solr/client/api/endpoint/TasksApi.java:
##########
@@ -30,18 +30,23 @@
@Path(INDEX_PATH_PREFIX + "/tasks")
public interface TasksApi {
- @GET
- @StoreApiParameters
- @Operation(
- summary = "Lists all the active tasks",
- tags = {"tasks"})
- ListActiveTaskResponse listAllActiveTasks() throws Exception;
+ @Path("")
+ interface List {
+ @GET
+ @StoreApiParameters
+ @Operation(
+ summary = "Lists all the active tasks.",
+ tags = {"tasks"})
+ ListActiveTaskResponse listAllActiveTasks() throws Exception;
+ }
- @GET
@Path("/{taskID}")
- @StoreApiParameters
- @Operation(
- summary = "Status of a specific task",
- tags = {"tasks"})
- TaskStatusResponse getTaskStatus(@PathParam("taskID") String taskID) throws Exception;
+ interface Status {
+ @GET
+ @StoreApiParameters
+ @Operation(
+ summary = "Status of a specific task.",
+ tags = {"tasks"})
+ TaskStatusResponse getTaskStatus(@PathParam("taskID") String taskID) throws Exception;
+ }
Review Comment:
`TasksApi.List` and `TasksApi.Status` are nested interfaces but they do not appear to inherit the enclosing `TasksApi` type-level `@Path`. Since the implementing resources now implement `TasksApi.List`/`TasksApi.Status` (not `TasksApi`), the base `INDEX_PATH_PREFIX + "/tasks"` path will be lost and these endpoints may no longer be registered under `/tasks`. Other nested endpoint interfaces in this codebase typically declare the full `@Path` directly on the nested interface (e.g., `GetSchemaApi.Fields` and `ConfigsetsApi.List`).
--
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: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-18248 : Refactor List APIs to use Nested Interfaces [solr]
Posted by "jaykay12 (via GitHub)" <gi...@apache.org>.
jaykay12 commented on PR #4537:
URL: https://github.com/apache/solr/pull/4537#issuecomment-5380993130
# Local Testing Done
Identifier|Endpoint|main|feature
---|---|---|---
V1 list tasks API|http://localhost:8983/solr/techproducts/tasks/list||
V1 GetTask Status API|http://localhost:8983/solr/techproducts/tasks/list?taskUUID=my-delayed-task-3||
V2 list tasks API|http://localhost:8983/v2/collections/techproducts/tasks||
V2 GetTask Status API|http://localhost:8983/v2/collections/techproducts/tasks/my-delayed-task-5||
--
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: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-18248 : Refactor List APIs to use Nested Interfaces [solr]
Posted by "epugh (via GitHub)" <gi...@apache.org>.
epugh merged PR #4537:
URL: https://github.com/apache/solr/pull/4537
--
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: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org
Re: [PR] SOLR-18248 : Refactor List APIs to use Nested Interfaces [solr]
Posted by "jaykay12 (via GitHub)" <gi...@apache.org>.
jaykay12 commented on code in PR #4537:
URL: https://github.com/apache/solr/pull/4537#discussion_r3836302554
##########
solr/api/src/java/org/apache/solr/client/api/endpoint/TasksApi.java:
##########
@@ -30,18 +30,23 @@
@Path(INDEX_PATH_PREFIX + "/tasks")
public interface TasksApi {
- @GET
- @StoreApiParameters
- @Operation(
- summary = "Lists all the active tasks",
- tags = {"tasks"})
- ListActiveTaskResponse listAllActiveTasks() throws Exception;
+ @Path("")
+ interface List {
+ @GET
+ @StoreApiParameters
+ @Operation(
+ summary = "Lists all the active tasks.",
+ tags = {"tasks"})
+ ListActiveTaskResponse listAllActiveTasks() throws Exception;
+ }
- @GET
@Path("/{taskID}")
- @StoreApiParameters
- @Operation(
- summary = "Status of a specific task",
- tags = {"tasks"})
- TaskStatusResponse getTaskStatus(@PathParam("taskID") String taskID) throws Exception;
+ interface Status {
+ @GET
+ @StoreApiParameters
+ @Operation(
+ summary = "Status of a specific task.",
+ tags = {"tasks"})
+ TaskStatusResponse getTaskStatus(@PathParam("taskID") String taskID) throws Exception;
+ }
Review Comment:
thank you!
this was the miss why i couldn't do this way in the PR: https://github.com/apache/solr/pull/4452#issuecomment-4606416964 & was facing this issue. My V2 endpoints were not getting registered.
This got fixed with the Copilot suggestion.
--
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: issues-unsubscribe@solr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org