diff --git a/.ci/bwcVersions b/.ci/bwcVersions index c4821d127e381..44bfbfcd729d0 100644 --- a/.ci/bwcVersions +++ b/.ci/bwcVersions @@ -1,50 +1,4 @@ BWC_VERSION: - - "6.0.0" - - "6.0.1" - - "6.1.0" - - "6.1.1" - - "6.1.2" - - "6.1.3" - - "6.1.4" - - "6.2.0" - - "6.2.1" - - "6.2.2" - - "6.2.3" - - "6.2.4" - - "6.3.0" - - "6.3.1" - - "6.3.2" - - "6.4.0" - - "6.4.1" - - "6.4.2" - - "6.4.3" - - "6.5.0" - - "6.5.1" - - "6.5.2" - - "6.5.3" - - "6.5.4" - - "6.6.0" - - "6.6.1" - - "6.6.2" - - "6.7.0" - - "6.7.1" - - "6.7.2" - - "6.8.0" - - "6.8.1" - - "6.8.2" - - "6.8.3" - - "6.8.4" - - "6.8.5" - - "6.8.6" - - "6.8.7" - - "6.8.8" - - "6.8.9" - - "6.8.10" - - "6.8.11" - - "6.8.12" - - "6.8.13" - - "6.8.14" - - "6.8.15" - "7.0.0" - "7.0.1" - "7.1.0" @@ -75,9 +29,7 @@ BWC_VERSION: - "7.10.1" - "7.10.2" - "1.0.0" - - "1.0.1" - "1.1.0" - - "1.1.1" - "1.2.0" - "1.2.1" - "1.2.2" diff --git a/build.gradle b/build.gradle index 7accde344637a..4be3ce4e53cd0 100644 --- a/build.gradle +++ b/build.gradle @@ -168,8 +168,7 @@ tasks.register("verifyVersions") { // Read the list from maven central. // Fetch the metadata and parse the xml into Version instances because it's more straight forward here // rather than bwcVersion ( VersionCollection ). - //TODO OpenSearch - Update the maven repo URL for OpenSearch when available. - new URL('https://repo1.maven.org/maven2/org/elasticsearch/elasticsearch/maven-metadata.xml').openStream().withStream { s -> + new URL('https://repo1.maven.org/maven2/org/opensearch/opensearch/maven-metadata.xml').openStream().withStream { s -> BuildParams.bwcVersions.compareToAuthoritative( new XmlParser().parse(s) .versioning.versions.version @@ -433,11 +432,11 @@ allprojects { tasks.named('cleanEclipse') { dependsOn 'wipeEclipseSettings' } // otherwise the eclipse merging is *super confusing* tasks.named('eclipse') { dependsOn 'cleanEclipse', 'copyEclipseSettings' } - + afterEvaluate { tasks.findByName("eclipseJdt")?.configure { dependsOn 'copyEclipseSettings' - } + } } } diff --git a/buildSrc/src/main/java/org/opensearch/gradle/BwcVersions.java b/buildSrc/src/main/java/org/opensearch/gradle/BwcVersions.java index d6a770d7cf4ae..3f65abcc25d17 100644 --- a/buildSrc/src/main/java/org/opensearch/gradle/BwcVersions.java +++ b/buildSrc/src/main/java/org/opensearch/gradle/BwcVersions.java @@ -370,6 +370,9 @@ private List getReleased() { .stream() .flatMap(Collection::stream) .filter(each -> unreleased.contains(each) == false) + // this is to make sure we only consider OpenSearch versions + // TODO remove this filter once legacy ES versions are no longer supported + .filter(v -> v.onOrAfter("1.0.0")) .collect(Collectors.toList()); } diff --git a/buildSrc/src/test/java/org/opensearch/gradle/BwcVersionsTests.java b/buildSrc/src/test/java/org/opensearch/gradle/BwcVersionsTests.java index 94c4e66726acd..838fd2d3f8631 100644 --- a/buildSrc/src/test/java/org/opensearch/gradle/BwcVersionsTests.java +++ b/buildSrc/src/test/java/org/opensearch/gradle/BwcVersionsTests.java @@ -716,14 +716,14 @@ public void testGetGradleProjectPath() { } public void testCompareToAuthoritative() { - List listOfVersions = asList("7.0.0", "7.0.1", "7.1.0", "7.1.1", "7.2.0", "7.3.0", "8.0.0"); - List authoritativeReleasedVersions = Stream.of("7.0.0", "7.0.1", "7.1.0") + List listOfVersions = asList("1.0.0", "1.0.1", "1.1.0", "1.1.1", "1.2.0", "1.3.0", "2.0.0"); + List authoritativeReleasedVersions = Stream.of("1.0.0", "1.0.1", "1.1.0") .map(Version::fromString) .collect(Collectors.toList()); BwcVersions vc = new BwcVersions( listOfVersions.stream().map(this::formatVersionToLine).collect(Collectors.toList()), - Version.fromString("8.0.0") + Version.fromString("2.0.0") ); vc.compareToAuthoritative(authoritativeReleasedVersions); } @@ -744,11 +744,11 @@ public void testCompareToAuthoritativeUnreleasedActuallyReleased() { } public void testCompareToAuthoritativeNotReallyRelesed() { - List listOfVersions = asList("7.0.0", "7.0.1", "7.1.0", "7.1.1", "7.2.0", "7.3.0", "8.0.0"); - List authoritativeReleasedVersions = Stream.of("7.0.0", "7.0.1").map(Version::fromString).collect(Collectors.toList()); + List listOfVersions = asList("1.0.0", "1.0.1", "1.1.0", "1.1.1", "1.2.0", "1.3.0", "2.0.0"); + List authoritativeReleasedVersions = Stream.of("1.0.0", "1.0.1").map(Version::fromString).collect(Collectors.toList()); BwcVersions vc = new BwcVersions( listOfVersions.stream().map(this::formatVersionToLine).collect(Collectors.toList()), - Version.fromString("8.0.0") + Version.fromString("2.0.0") ); expectedEx.expect(IllegalStateException.class); expectedEx.expectMessage("not really released");