Selaa lähdekoodia

Enable bwc tests for #74784 (#75568)

Martijn van Groningen 4 vuotta sitten
vanhempi
commit
9d0140b075

+ 2 - 2
build.gradle

@@ -144,9 +144,9 @@ tasks.register("verifyVersions") {
  * after the backport of the backcompat code is complete.
  */
 
-boolean bwc_tests_enabled = false
+boolean bwc_tests_enabled = true
 // place a PR link here when committing bwc changes:
-String bwc_tests_disabled_issue = "https://github.com/elastic/elasticsearch/pull/74784"
+String bwc_tests_disabled_issue = ""
 /*
  * FIPS 140-2 behavior was fixed in 7.11.0. Before that there is no way to run elasticsearch in a
  * JVM that is properly configured to be in fips mode with BCFIPS. For now we need to disable

+ 2 - 2
server/src/main/java/org/elasticsearch/cluster/metadata/DataStreamAlias.java

@@ -108,7 +108,7 @@ public class DataStreamAlias extends AbstractDiffable<DataStreamAlias> implement
         this.name = in.readString();
         this.dataStreams = in.readStringList();
         this.writeDataStream = in.readOptionalString();
-        this.filter = in.getVersion().onOrAfter(Version.V_8_0_0) && in.readBoolean() ? CompressedXContent.readCompressedString(in) : null;
+        this.filter = in.getVersion().onOrAfter(Version.V_7_15_0) && in.readBoolean() ? CompressedXContent.readCompressedString(in) : null;
     }
 
     /**
@@ -297,7 +297,7 @@ public class DataStreamAlias extends AbstractDiffable<DataStreamAlias> implement
         out.writeString(name);
         out.writeStringCollection(dataStreams);
         out.writeOptionalString(writeDataStream);
-        if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
+        if (out.getVersion().onOrAfter(Version.V_7_15_0)) {
             if (filter != null) {
                 out.writeBoolean(true);
                 filter.writeTo(out);

+ 3 - 4
x-pack/plugin/src/yamlRestTest/resources/rest-api-spec/test/data_stream/140_data_stream_aliases.yml

@@ -73,10 +73,10 @@
   - length:   { hits.hits: 2  }
 
 ---
-"Create data stream alias with alias":
+"Create data stream alias with filter":
   - skip:
-      version: " - 7.99.99"
-      reason: "data stream alias filter not yet backported to the 7.x branch"
+      version: " - 7.14.99"
+      reason: "data stream alias filter supported was added in 7.15.0"
       features: allowed_warnings
 
   - do:
@@ -91,7 +91,6 @@
               index.number_of_replicas: 0
           data_stream: { }
 
-
   - do:
       index:
         index: log-app1