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 2021/12/22 14:12:33 UTC

[GitHub] [solr] janhoy opened a new pull request #469: SOLR-15845 Add a new SolrVersion class

janhoy opened a new pull request #469:
URL: https://github.com/apache/solr/pull/469


   https://issues.apache.org/jira/browse/SOLR-15845
   
   This PR introduces the SolrVersion class.
   There are many places where we keep Lucene Version checks, everywhere related to index version compatibility,
   but I have cut over the places I could see Solr either printing or checking compatibility based on version.
   
   Basically the only place which is not pure display of current version is the Package Manager which needs to make package compatibility decision based on the declared supported Solr versions. @noblepaul 
   
   When reviewing, ask yourself whether there are other places in our code base where we process versions, that should use this new class instead.
   
   I have NOT tested this at all, so it is kind of DRAFT state for now.


-- 
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] janhoy commented on a change in pull request #469: SOLR-15845 Add a new SolrVersion class

Posted by GitBox <gi...@apache.org>.
janhoy commented on a change in pull request #469:
URL: https://github.com/apache/solr/pull/469#discussion_r774017366



##########
File path: dev-tools/scripts/addVersion.py
##########
@@ -44,10 +44,9 @@ def edit(buffer, match, line):
   print('done' if changed else 'uptodate')
 
 def add_constant(new_version, deprecate):
-  # TODO: Modify for new SolrVersion class, see SOLR-15845
-  filename = 'lucene/core/src/java/org/apache/lucene/util/Version.java'
+  filename = 'solr/core/src/java/org/apache/solr/util/SolrVersion.java'

Review comment:
       Do we even have a need in Solr to know what prior versions there have been? Or do we only need to know our own version? Any persisting of version can happen as a `X.Y.Z` string, that can be parsed back and compared.
   
   The Gradle build could write out a `solrVersion.properties` file into the jar file for consumption by a very simple SolrVersion class? Just throwing out thoughts here. Shoot them down please :) 




-- 
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] janhoy commented on a change in pull request #469: SOLR-15845 Add a new SolrVersion class

Posted by GitBox <gi...@apache.org>.
janhoy commented on a change in pull request #469:
URL: https://github.com/apache/solr/pull/469#discussion_r774011189



##########
File path: dev-tools/scripts/addVersion.py
##########
@@ -44,10 +44,9 @@ def edit(buffer, match, line):
   print('done' if changed else 'uptodate')
 
 def add_constant(new_version, deprecate):
-  # TODO: Modify for new SolrVersion class, see SOLR-15845
-  filename = 'lucene/core/src/java/org/apache/lucene/util/Version.java'
+  filename = 'solr/core/src/java/org/apache/solr/util/SolrVersion.java'

Review comment:
       This is completely untested. Will probably get to it during the 9.0 release, but if anyone facies to review, go ahead.
   
   Or if anyone knows of a better way for Solr to manage its own version than a SolrVersion class with enums, that could also be a way to go. Perhaps we could use code generation from gradle to insert the version somewhere and parse that statically. This huge version class seems a bit overkill imo. I also know there are various Java implementations of SemVer classes out there that could be used instead.




-- 
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] janhoy closed pull request #469: SOLR-15845 Add a new SolrVersion class

Posted by GitBox <gi...@apache.org>.
janhoy closed pull request #469:
URL: https://github.com/apache/solr/pull/469


   


-- 
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] janhoy commented on pull request #469: SOLR-15845 Add a new SolrVersion class

Posted by GitBox <gi...@apache.org>.
janhoy commented on pull request #469:
URL: https://github.com/apache/solr/pull/469#issuecomment-1002232042


   Closing this in favor of #472 


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