You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "gerlowskija (via GitHub)" <gi...@apache.org> on 2023/08/22 17:35:20 UTC

[GitHub] [solr] gerlowskija opened a new pull request, #1859: SOLR-16825: Migrate v2 definitions to 'api' module

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

   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:
   
   - delete replica property
   - delete replica
   - delete (i.e. "clear") node
   - delete collection snapshot
   - delete collection backup
   
   
   # Tests
   
   Manual inspection of the generated OAS and SolrRequest implementations.
   
   # 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.
   - [ ] 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 commented on a diff in pull request #1859: SOLR-16825: Migrate v2 definitions to 'api' module

Posted by "gerlowskija (via GitHub)" <gi...@apache.org>.
gerlowskija commented on code in PR #1859:
URL: https://github.com/apache/solr/pull/1859#discussion_r1301983681


##########
solr/api/src/java/org/apache/solr/client/api/model/Constants.java:
##########
@@ -0,0 +1,51 @@
+/*
+ * 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.client.api.model;
+
+public class Constants {
+
+  private Constants() {
+    /* Private ctor prevents instantiation */
+  }
+
+  /** A parameter to specify the name of the backup repository to be used. */
+  public static final String BACKUP_REPOSITORY = "repository";

Review Comment:
   [0] The additions here are a real shame, as they're duplicates of constants that already exist in SolrJ.
   
   Should we move some of the solrj "constants" files (i.e. CollectionAdminParams, CommonParams) into 'api' to avoid the duplication?  (To handle backcompat, in 9.x we could have a deprecated copy of each of these constants files in solrj that extends its 'api' module counterpart)



-- 
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 pull request #1859: SOLR-16825: Migrate v2 definitions to 'api' module

Posted by "gerlowskija (via GitHub)" <gi...@apache.org>.
gerlowskija commented on PR #1859:
URL: https://github.com/apache/solr/pull/1859#issuecomment-1690318842

   Yeah, the diff is large for sure. 
   
   I'd argue though that this is pretty deceptive though, re: "verbosity".  This commit adds lines in isolation sure, but if it ultimately lets us delete a bunch of existing SolrJ (and maybe even ref-guide) code that we've been maintaining by hand up to this point...well then the end result will be a huge "net-negative" in terms of LOC.
   
   (In theory we could nuke the v1 SolrRequest classes in this PR, if we wanted to commit to removing them in 10.0.  I was reluctant to do that here though, since there's a lot of v2 api work remaining and the 10.0 timeline being a real unknown...) 
   
   Anyway in the short term I def agree it's non-ideal.


-- 
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 #1859: SOLR-16825: Migrate v2 definitions to 'api' module

Posted by "gerlowskija (via GitHub)" <gi...@apache.org>.
gerlowskija commented on code in PR #1859:
URL: https://github.com/apache/solr/pull/1859#discussion_r1301983681


##########
solr/api/src/java/org/apache/solr/client/api/model/Constants.java:
##########
@@ -0,0 +1,51 @@
+/*
+ * 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.client.api.model;
+
+public class Constants {
+
+  private Constants() {
+    /* Private ctor prevents instantiation */
+  }
+
+  /** A parameter to specify the name of the backup repository to be used. */
+  public static final String BACKUP_REPOSITORY = "repository";

Review Comment:
   [0] The additions here are a real shame, as they're duplicates of constants that already exist in SolrJ.
   
   Should we move some of the solrj "constants" files (i.e. CollectionAdminParams, CommonParams) into 'api' to avoid the duplication?  They're a good fit conceptually and prevents duplication, but consumers may not love having to depend on 'api' maybe?  Idk...
   
   (To handle backcompat, in 9.x we could have a deprecated copy of each of these constants files in solrj that extends its 'api' module counterpart)



-- 
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 #1859: SOLR-16825: Migrate v2 definitions to 'api' module

Posted by "gerlowskija (via GitHub)" <gi...@apache.org>.
gerlowskija merged PR #1859:
URL: https://github.com/apache/solr/pull/1859


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