From 18d7fed5df719ffbca32d4eda1e4e696f48dd377 Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Tue, 10 Mar 2020 10:10:37 +0100 Subject: [PATCH 1/2] disable BWC in order to merge #53324 --- build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 8176f88dab74c..b0df26176f7af 100644 --- a/build.gradle +++ b/build.gradle @@ -220,8 +220,8 @@ task verifyVersions { * after the backport of the backcompat code is complete. */ -boolean bwc_tests_enabled = true -final String bwc_tests_disabled_issue = "" /* place a PR link here when committing bwc changes */ +boolean bwc_tests_enabled = false +final String bwc_tests_disabled_issue = "https://github.com/elastic/elasticsearch/pull/53324" /* place a PR link here when committing bwc changes */ if (bwc_tests_enabled == false) { if (bwc_tests_disabled_issue.isEmpty()) { throw new GradleException("bwc_tests_disabled_issue must be set when bwc_tests_enabled == false") From 97769eff98ea6287486069cf835b78b11e9a814c Mon Sep 17 00:00:00 2001 From: Hendrik Muhs Date: Tue, 10 Mar 2020 11:14:25 +0100 Subject: [PATCH 2/2] re-enable BWC and finish backport of #53324 --- build.gradle | 4 ++-- .../core/transform/transforms/pivot/SingleGroupSource.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index b0df26176f7af..8176f88dab74c 100644 --- a/build.gradle +++ b/build.gradle @@ -220,8 +220,8 @@ task verifyVersions { * after the backport of the backcompat code is complete. */ -boolean bwc_tests_enabled = false -final String bwc_tests_disabled_issue = "https://github.com/elastic/elasticsearch/pull/53324" /* place a PR link here when committing bwc changes */ +boolean bwc_tests_enabled = true +final String bwc_tests_disabled_issue = "" /* place a PR link here when committing bwc changes */ if (bwc_tests_enabled == false) { if (bwc_tests_disabled_issue.isEmpty()) { throw new GradleException("bwc_tests_disabled_issue must be set when bwc_tests_enabled == false") diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/transform/transforms/pivot/SingleGroupSource.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/transform/transforms/pivot/SingleGroupSource.java index 5686f3c9377e1..bd215126119d5 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/transform/transforms/pivot/SingleGroupSource.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/transform/transforms/pivot/SingleGroupSource.java @@ -80,7 +80,7 @@ public SingleGroupSource(final String field, final ScriptConfig scriptConfig) { public SingleGroupSource(StreamInput in) throws IOException { field = in.readOptionalString(); - if (in.getVersion().onOrAfter(Version.V_8_0_0)) { // change to 7.7.0 + if (in.getVersion().onOrAfter(Version.V_7_7_0)) { scriptConfig = in.readOptionalWriteable(ScriptConfig::new); } else { scriptConfig = null; @@ -107,7 +107,7 @@ protected void innerXContent(XContentBuilder builder, Params params) throws IOEx @Override public void writeTo(StreamOutput out) throws IOException { out.writeOptionalString(field); - if (out.getVersion().onOrAfter(Version.V_8_0_0)) { + if (out.getVersion().onOrAfter(Version.V_7_7_0)) { out.writeOptionalWriteable(scriptConfig); } }