You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/06/08 08:08:51 UTC

[GitHub] [lucene-solr] cpoerschke opened a new pull request #2509: Fix 8.9.0 < 8.10.0 comparison in smokeTestRelease.py script.

cpoerschke opened a new pull request #2509:
URL: https://github.com/apache/lucene-solr/pull/2509


   (Please note this pull request is for `lucene-solr/branch_8_9` branch and after merge the changes would have to be cherry-picked to `lucene-solr/branch_8x` branch and (I'm guessing) also `lucene/main` and `solr/main` branches.)
   
   ### Local testing
   
   #### Script
   ```
   $ cat ./versionToTuple_test.py
   #!/usr/bin/env python3
   
   import re
   
   reVersion = re.compile(r'(\d+)\.(\d+)(?:\.(\d+))?\s*(-alpha|-beta|final|RC\d+)?\s*(?:\[.*\])?', re.IGNORECASE)
   
   priorVersionTuple1 = None
   priorVersionTuple2 = None
   for version in [ "4.0.0-beta", "8.9.0", "8.10.0" ]:
     versionMatch = reVersion.match(version)
     versionTuple = versionMatch.groups()
   
     if priorVersionTuple1 is not None:
       print("before: ({} < {}) evaluates to {}".format(priorVersionTuple1, versionTuple, (priorVersionTuple1 < versionTuple)))
     priorVersionTuple1 = versionTuple
   
     versionTuple = tuple(int(x) if x is not None and x.isnumeric() else x for x in versionTuple)
   
     if priorVersionTuple2 is not None:
       print(" after: ({} < {}) evaluates to {}".format(priorVersionTuple2, versionTuple, (priorVersionTuple2 < versionTuple)))
     priorVersionTuple2 = versionTuple
   ```
   
   #### Output
   
   ```
   $ ./versionToTuple_test.py
   before: (('4', '0', '0', '-beta') < ('8', '9', '0', None)) evaluates to True
    after: ((4, 0, 0, '-beta') < (8, 9, 0, None)) evaluates to True
   before: (('8', '9', '0', None) < ('8', '10', '0', None)) evaluates to False
    after: ((8, 9, 0, None) < (8, 10, 0, None)) evaluates to True
   ```


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] cpoerschke commented on pull request #2509: Fix 8.9.0 < 8.10.0 comparison in smokeTestRelease.py script.

Posted by GitBox <gi...@apache.org>.
cpoerschke commented on pull request #2509:
URL: https://github.com/apache/lucene-solr/pull/2509#issuecomment-856829661


   > good find
   
   not my find, apologies, i could have attributed the find better in pull request from the outset. updated now retrospectively.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] cpoerschke commented on pull request #2509: Fix 8.9.0 < 8.10.0 comparison in smokeTestRelease.py script.

Posted by GitBox <gi...@apache.org>.
cpoerschke commented on pull request #2509:
URL: https://github.com/apache/lucene-solr/pull/2509#issuecomment-856844229


   cherry-picking to `lucene-solr/branch_8x` and `lucene/main` and `solr/main` branches is complete.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


[GitHub] [lucene-solr] cpoerschke merged pull request #2509: Fix 8.9.0 < 8.10.0 comparison in smokeTestRelease.py script.

Posted by GitBox <gi...@apache.org>.
cpoerschke merged pull request #2509:
URL: https://github.com/apache/lucene-solr/pull/2509


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org