[ https://issues.apache.org/jira/browse/LUCENE-7446?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Steve Rowe updated LUCENE-7446: ------------------------------- Attachment: LUCENE-7446.patch I think Anshum's fix is wrong - we shouldn't be asking the backward compatibility question when we know that the version to be added is greater than the latest version on the branch - I think the exception as currently thrown should be kept as-is (more below). I'm attaching a patch with an alternate fix. {{addVersion.py}} is used in three contexts: # The version to be added is greater than the latest on the branch - this happens on release branches, as well as on the stable and unstable branches after a release branch is copied from them. # The version to be added is less than the latest on the branch, and the latest version is backward compatible with the version to be added. # The version to be added is less than the latest on the branch, but the latest version is *not* backward compatible with the version to be added. AFAICT, Anshum and Shalin have run into problems with #1 (on release branches). scriptutil.py's {{Version.is_back_compat_with()}} is designed to distinguish between cases #2 and #3, and throws an exception in case #1. The boolean return value doesn't allow for encoding the third case ("not applicable"), so the exception should remain. So I think the correct fix is to not ask the is-back-compat-with question if we know it's not applicable (i.e. case #1). The attached patch does this. I've successfully added 6.2.2 on branch_6_2 with the patch. I'll test all the other cases before I commit. FYI, [~mikemccand] must have run into the same (or similar) problem a few weeks back and attempted a different fix on master and branch_6x (which won't work in case #1 on the unstable branch after a major release branch is cut): https://git1-us-west.apache.org/repos/asf?p=lucene-solr.git;a=blobdiff;f=dev-tools/scripts/addVersion.py;h=e95a51f4181e6ee1fb1edc9da7233cf6c58aac23;hp=75a22e0c67b9d4c14735eb85971a88b693ea62ce;hb=37649598;hpb=213bc658922ea3fd63abc5e8188db9060176ec02 - I plan on reverting Mike's change when I commit the attached patch. > Fix back-compat version check in addVersion helper script > --------------------------------------------------------- > > Key: LUCENE-7446 > URL: https://issues.apache.org/jira/browse/LUCENE-7446 > Project: Lucene - Core > Issue Type: Bug > Reporter: Anshum Gupta > Assignee: Anshum Gupta > Priority: Minor > Attachments: LUCENE-7446.patch, LUCENE-7446.patch > > > As part of the 5.5.3 post-release process, I was trying to bump up the number > to 5.5.4 on the release branch but ran into the following error: > {code} > Traceback (most recent call last): > File "dev-tools/scripts/addVersion.py", line 246, in <module> > main() > File "dev-tools/scripts/addVersion.py", line 221, in main > if current_version.is_back_compat_with(c.version): > File > "/Users/anshumgupta/workspace/lucene-solr/dev-tools/scripts/scriptutil.py", > line 75, in is_back_compat_with > raise Exception('Back compat check disallowed for newer version: %s < %s' > % (self, other)) > Exception: Back compat check disallowed for newer version: 5.5.3 < 5.5.4 > {code} > I think the check is wrong and should be reversed. I'll post a patch that I > used to work around this but would be good to have more eyes on this before I > commit this. > [~steve_rowe]: Can you take a look at the patch as I guess you added this > recently. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org