You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/05/13 23:45:36 UTC

[GitHub] [solr] gerlowskija opened a new pull request, #863: SOLR-15744: Convert task-mgmt v2 APIs to annotations

gerlowskija opened a new pull request, #863:
URL: https://github.com/apache/solr/pull/863

   # 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:
   
   - [x] I have reviewed the guidelines for [How to Contribute](https://wiki.apache.org/solr/HowToContribute) and my code conforms to the standards described there to the best of my ability.
   - [x] I have created a Jira issue and added the issue ID to my pull request title.
   - [x] 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)
   - [x] I have developed this patch against the `main` branch.
   - [x] 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)
   


-- 
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


[GitHub] [solr] gerlowskija merged pull request #863: SOLR-15744: Convert task-mgmt v2 APIs to annotations

Posted by GitBox <gi...@apache.org>.
gerlowskija merged PR #863:
URL: https://github.com/apache/solr/pull/863


-- 
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


[GitHub] [solr] gerlowskija commented on a diff in pull request #863: SOLR-15744: Convert task-mgmt v2 APIs to annotations

Posted by GitBox <gi...@apache.org>.
gerlowskija commented on code in PR #863:
URL: https://github.com/apache/solr/pull/863#discussion_r875840486


##########
solr/core/src/java/org/apache/solr/handler/admin/api/CancelTaskAPI.java:
##########
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.solr.handler.admin.api;
+
+import static org.apache.solr.client.solrj.SolrRequest.METHOD.GET;
+
+import org.apache.solr.api.EndPoint;
+import org.apache.solr.handler.component.QueryCancellationHandler;
+import org.apache.solr.request.SolrQueryRequest;
+import org.apache.solr.response.SolrQueryResponse;
+import org.apache.solr.security.PermissionNameProvider;
+
+/**
+ * V2 API for cancelling a currently running "task".
+ *
+ * <p>This API (GET /v2/collections/collectionName/tasks/cancel) is analogous to the v1

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



-- 
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


[GitHub] [solr] epugh commented on a diff in pull request #863: SOLR-15744: Convert task-mgmt v2 APIs to annotations

Posted by GitBox <gi...@apache.org>.
epugh commented on code in PR #863:
URL: https://github.com/apache/solr/pull/863#discussion_r873636747


##########
solr/core/src/java/org/apache/solr/handler/admin/api/CancelTaskAPI.java:
##########
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.solr.handler.admin.api;
+
+import static org.apache.solr.client.solrj.SolrRequest.METHOD.GET;
+
+import org.apache.solr.api.EndPoint;
+import org.apache.solr.handler.component.QueryCancellationHandler;
+import org.apache.solr.request.SolrQueryRequest;
+import org.apache.solr.response.SolrQueryResponse;
+import org.apache.solr.security.PermissionNameProvider;
+
+/**
+ * V2 API for cancelling a currently running "task".
+ *
+ * <p>This API (GET /v2/collections/collectionName/tasks/cancel) is analogous to the v1

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



##########
solr/core/src/java/org/apache/solr/handler/admin/api/CancelTaskAPI.java:
##########
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.solr.handler.admin.api;
+
+import static org.apache.solr.client.solrj.SolrRequest.METHOD.GET;
+
+import org.apache.solr.api.EndPoint;
+import org.apache.solr.handler.component.QueryCancellationHandler;
+import org.apache.solr.request.SolrQueryRequest;
+import org.apache.solr.response.SolrQueryResponse;
+import org.apache.solr.security.PermissionNameProvider;
+
+/**
+ * V2 API for cancelling a currently running "task".
+ *
+ * <p>This API (GET /v2/collections/collectionName/tasks/cancel) is analogous to the v1

Review Comment:
   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!



-- 
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