Lucene - Core
  1. Lucene - Core
  2. LUCENE-5936

Add BWC checks to verify what is tested matches what versions we know about

    Details

    • Type: Test Test
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.10.1, 5.0, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      This is a follow up from LUCENE-5934. Mike has already has something like this for the smoke tester, but here I am suggesting a test within the test (similar to other Version tests we have which check things like deprecation status of old versions).

      1. LUCENE-5936.patch
        7 kB
        Ryan Ernst
      2. LUCENE-5936.patch
        5 kB
        Ryan Ernst

        Activity

        Hide
        Ryan Ernst added a comment -

        Here's a patch, but it doesn't quite work yet. Currently it fails because it thinks there should be a 411.cfs filename. I already have a special check for LATEST; this just fails on trunk, since 4.11 is also not yet released (and thus doesn't have a bwc index). Still working on a solution..

        Show
        Ryan Ernst added a comment - Here's a patch, but it doesn't quite work yet. Currently it fails because it thinks there should be a 411.cfs filename. I already have a special check for LATEST; this just fails on trunk, since 4.11 is also not yet released (and thus doesn't have a bwc index). Still working on a solution..
        Hide
        Uwe Schindler added a comment -

        Cool. Somehow I know the Version-field reflection loop already! I cloned it several times today.

        +1 to add something like this!

        Show
        Uwe Schindler added a comment - Cool. Somehow I know the Version-field reflection loop already! I cloned it several times today. +1 to add something like this!
        Hide
        Uwe Schindler added a comment -

        In my opinion, smoketester should simply check Version.java that it contains a version for every item in the apache archives? So this test together with a cheap smoker test is all we need.

        Show
        Uwe Schindler added a comment - In my opinion, smoketester should simply check Version.java that it contains a version for every item in the apache archives? So this test together with a cheap smoker test is all we need.
        Hide
        Uwe Schindler added a comment -

        We could also add a test to TestVersion that checks http://archives.apache.org with the list of Versions?

        Show
        Uwe Schindler added a comment - We could also add a test to TestVersion that checks http://archives.apache.org with the list of Versions?
        Hide
        Ryan Ernst added a comment -

        New patch that handles 4.11 when on trunk. It's a little hacky but tests pass...

        Show
        Ryan Ernst added a comment - New patch that handles 4.11 when on trunk. It's a little hacky but tests pass...
        Hide
        Ryan Ernst added a comment -

        We could also add a test to TestVersion that checks http://archives.apache.org with the list of Versions?

        I was trying to avoid a unit test which hit the network (to maintain the ability to run offline). But even so, that test would only check released versions have a version constant? I think the missing piece (which is what mikes script is doing + every other version) is do we have a unique version for this which we are release testing.

        Show
        Ryan Ernst added a comment - We could also add a test to TestVersion that checks http://archives.apache.org with the list of Versions? I was trying to avoid a unit test which hit the network (to maintain the ability to run offline). But even so, that test would only check released versions have a version constant? I think the missing piece (which is what mikes script is doing + every other version) is do we have a unique version for this which we are release testing.
        Hide
        Robert Muir added a comment -

        yes please, lets not do the network. the smoketester can do that. In fact mike already wrote the code.

        Show
        Robert Muir added a comment - yes please, lets not do the network. the smoketester can do that. In fact mike already wrote the code.
        Hide
        Michael McCandless added a comment -

        +1, this patch looks good, thanks Ryan!

        Show
        Michael McCandless added a comment - +1, this patch looks good, thanks Ryan!
        Hide
        ASF subversion and git services added a comment -

        Commit 1624326 from Ryan Ernst in branch 'dev/trunk'
        [ https://svn.apache.org/r1624326 ]

        LUCENE-5936: Add backcompat checks to verify what is tested matches known versions

        Show
        ASF subversion and git services added a comment - Commit 1624326 from Ryan Ernst in branch 'dev/trunk' [ https://svn.apache.org/r1624326 ] LUCENE-5936 : Add backcompat checks to verify what is tested matches known versions
        Hide
        ASF subversion and git services added a comment -

        Commit 1624330 from Ryan Ernst in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1624330 ]

        LUCENE-5936: Add backcompat checks to verify what is tested matches known versions

        Show
        ASF subversion and git services added a comment - Commit 1624330 from Ryan Ernst in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1624330 ] LUCENE-5936 : Add backcompat checks to verify what is tested matches known versions
        Hide
        ASF subversion and git services added a comment -

        Commit 1624804 from Michael McCandless in branch 'dev/branches/lucene_solr_4_10'
        [ https://svn.apache.org/r1624804 ]

        LUCENE-5936: Add backcompat checks to verify what is tested matches known versions

        Show
        ASF subversion and git services added a comment - Commit 1624804 from Michael McCandless in branch 'dev/branches/lucene_solr_4_10' [ https://svn.apache.org/r1624804 ] LUCENE-5936 : Add backcompat checks to verify what is tested matches known versions
        Hide
        Uwe Schindler added a comment -

        The "special detection" of Lucene is trunk in the new branch_5x is not working, because minor and bugfix version == 0.

        For now I disabled this fragment only in branch_5x, its still there in trunk:

            if (Version.LATEST.minor == 0 && Version.LATEST.bugfix == 0 && Version.LATEST.prerelease == 0) {
              // we are on trunk (latest is a first major release) so the last minor index
              // for the previous major version is also not yet tested
              assertNotNull(lastPrevMajorVersion);
              expectedVersions.remove(lastPrevMinorIndex);
            }
        

        My proposal: Add a boolean at the beginning of TestBackwords test thats named: boolean isLuceneTrunk = true/false

        This is easier to maintain, it will be true in Lucene trunk only, false otherwise.

        Show
        Uwe Schindler added a comment - The "special detection" of Lucene is trunk in the new branch_5x is not working, because minor and bugfix version == 0. For now I disabled this fragment only in branch_5x, its still there in trunk: if (Version.LATEST.minor == 0 && Version.LATEST.bugfix == 0 && Version.LATEST.prerelease == 0) { // we are on trunk (latest is a first major release) so the last minor index // for the previous major version is also not yet tested assertNotNull(lastPrevMajorVersion); expectedVersions.remove(lastPrevMinorIndex); } My proposal: Add a boolean at the beginning of TestBackwords test thats named: boolean isLuceneTrunk = true/false This is easier to maintain, it will be true in Lucene trunk only, false otherwise.
        Hide
        Ryan Ernst added a comment -

        I'd rather just make this unconditional, and only exist in trunk, with a note that it should only exist in trunk. This way there is not known dead code in the stable branch?

        Show
        Ryan Ernst added a comment - I'd rather just make this unconditional, and only exist in trunk, with a note that it should only exist in trunk. This way there is not known dead code in the stable branch?
        Hide
        ASF subversion and git services added a comment -

        Commit 1626258 from Ryan Ernst in branch 'dev/trunk'
        [ https://svn.apache.org/r1626258 ]

        LUCENE-5936: Tweak test to isolate trunk only code

        Show
        ASF subversion and git services added a comment - Commit 1626258 from Ryan Ernst in branch 'dev/trunk' [ https://svn.apache.org/r1626258 ] LUCENE-5936 : Tweak test to isolate trunk only code
        Hide
        ASF subversion and git services added a comment -

        Commit 1626262 from Ryan Ernst in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1626262 ]

        LUCENE-5936: Remove test code only needed for trunk

        Show
        ASF subversion and git services added a comment - Commit 1626262 from Ryan Ernst in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1626262 ] LUCENE-5936 : Remove test code only needed for trunk
        Hide
        Michael McCandless added a comment -

        Ryan Ernst this is done now right?

        Show
        Michael McCandless added a comment - Ryan Ernst this is done now right?
        Hide
        Michael McCandless added a comment -

        Bulk close for Lucene/Solr 4.10.1 release

        Show
        Michael McCandless added a comment - Bulk close for Lucene/Solr 4.10.1 release

          People

          • Assignee:
            Ryan Ernst
            Reporter:
            Ryan Ernst
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development