From 9e3eacec357a7d79199d755fab628560449aff8e Mon Sep 17 00:00:00 2001 From: Nik Everett Date: Fri, 28 Oct 2016 10:29:29 -0400 Subject: [PATCH] Fix generation of versions to upgrade from Vagrant tests use a static list of dependencies to upgrade from and we weren't including 5.0.0 deps in that list. Also when the list was incorrect we weren't sorting the "current" list so it was difficult to read. Also adds 2.4.1 to the list but *doesn't* add 5.0.0 because we still can't resolve it yet. We still only print an error when the list is wrong but don't abort the build. We'll abort the build once we've fixed resolution for 5.0.0 and we can re-add it. --- qa/vagrant/build.gradle | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/qa/vagrant/build.gradle b/qa/vagrant/build.gradle index 1923a8b6a1e..edad98b5fbd 100644 --- a/qa/vagrant/build.gradle +++ b/qa/vagrant/build.gradle @@ -125,10 +125,7 @@ Set getVersions() { new URL('https://repo1.maven.org/maven2/org/elasticsearch/elasticsearch/maven-metadata.xml').openStream().withStream { s -> xml = new XmlParser().parse(s) } - - // List all N-1 releases from maven central - int major = Integer.parseInt(project.version.substring(0, project.version.indexOf('.'))) - 1 - Set versions = new TreeSet<>(xml.versioning.versions.version.collect { it.text() }.findAll { it ==~ /$major\.\d\.\d/ }) + Set versions = new TreeSet<>(xml.versioning.versions.version.collect { it.text() }.findAll { it ==~ /[5]\.\d\.\d/ }) if (versions.isEmpty() == false) { return versions; } @@ -151,7 +148,7 @@ task verifyPackagingTestUpgradeFromVersions { String maybeUpdateFromVersions = System.getProperty("tests.packaging.upgrade.from.versions", null) if (maybeUpdateFromVersions == null) { Set versions = getVersions() - Set actualVersions = new HashSet<>(Arrays.asList(upgradeFromVersions)) + Set actualVersions = new TreeSet<>(Arrays.asList(upgradeFromVersions)) if (!versions.equals(actualVersions)) { println("out-of-date versions [" + actualVersions + "], expected [" + versions + "]; run gradle updatePackagingTestUpgradeFromVersions") // throw new GradleException("out-of-date versions [" + actualVersions + "], expected [" + versions + "]; run gradle updatePackagingTestUpgradeFromVersions")