Skip to content

Commit 6bc0916

Browse files
[ML] Adjust BWC versions after backporting reset API (#74107)
Relates #73908
1 parent 84a7310 commit 6bc0916

File tree

3 files changed

+7
-21
lines changed

3 files changed

+7
-21
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,9 @@ tasks.register("verifyVersions") {
170170
* after the backport of the backcompat code is complete.
171171
*/
172172

173-
boolean bwc_tests_enabled = false
173+
boolean bwc_tests_enabled = true
174174
// place a PR link here when committing bwc changes:
175-
String bwc_tests_disabled_issue = "https://github.com/elastic/elasticsearch/pull/74093"
175+
String bwc_tests_disabled_issue = ""
176176
/*
177177
* FIPS 140-2 behavior was fixed in 7.11.0. Before that there is no way to run elasticsearch in a
178178
* JVM that is properly configured to be in fips mode with BCFIPS. For now we need to disable

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/Job.java

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -245,11 +245,7 @@ public Job(StreamInput in) throws IOException {
245245
resultsIndexName = in.readString();
246246
deleting = in.readBoolean();
247247
allowLazyOpen = in.readBoolean();
248-
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
249-
blocked = new Blocked(in);
250-
} else {
251-
blocked = deleting ? new Blocked(Blocked.Reason.DELETE, null) : Blocked.none();
252-
}
248+
blocked = new Blocked(in);
253249
}
254250

255251
/**
@@ -526,9 +522,7 @@ public void writeTo(StreamOutput out) throws IOException {
526522
out.writeString(resultsIndexName);
527523
out.writeBoolean(deleting);
528524
out.writeBoolean(allowLazyOpen);
529-
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
530-
blocked.writeTo(out);
531-
}
525+
blocked.writeTo(out);
532526
}
533527

534528
@Override
@@ -972,9 +966,7 @@ public void writeTo(StreamOutput out) throws IOException {
972966
out.writeOptionalString(resultsIndexName);
973967
out.writeBoolean(deleting);
974968
out.writeBoolean(allowLazyOpen);
975-
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
976-
blocked.writeTo(out);
977-
}
969+
blocked.writeTo(out);
978970
}
979971

980972
public boolean equals(Object o) {

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ml/job/config/JobUpdate.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,7 @@ public JobUpdate(StreamInput in) throws IOException {
159159
modelSnapshotMinVersion = null;
160160
}
161161
allowLazyOpen = in.readOptionalBoolean();
162-
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
163-
blocked = in.readOptionalWriteable(Blocked::new);
164-
} else {
165-
blocked = null;
166-
}
162+
blocked = in.readOptionalWriteable(Blocked::new);
167163
}
168164

169165
@Override
@@ -204,9 +200,7 @@ public void writeTo(StreamOutput out) throws IOException {
204200
out.writeBoolean(false);
205201
}
206202
out.writeOptionalBoolean(allowLazyOpen);
207-
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
208-
out.writeOptionalWriteable(blocked);
209-
}
203+
out.writeOptionalWriteable(blocked);
210204
}
211205

212206
public String getJobId() {

0 commit comments

Comments
 (0)