Skip to content

Commit 2832beb

Browse files
committed
Migrate transport versions 8841_010 through 8841_006
1 parent 8cd1558 commit 2832beb

File tree

17 files changed

+79
-85
lines changed

17 files changed

+79
-85
lines changed

server/src/main/java/org/elasticsearch/TransportVersions.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -141,21 +141,13 @@ static TransportVersion def(int id) {
141141
public static final TransportVersion ML_INFERENCE_IBM_WATSONX_RERANK_ADDED = def(8_840_0_00);
142142
// TODO: add to remove_all_applicable_selector.csv
143143
public static final TransportVersion REMOVE_ALL_APPLICABLE_SELECTOR_BACKPORT_8_18 = def(8_840_0_01);
144-
// TODO: add to retry_ilm_async_action_require_error.csv
145-
public static final TransportVersion RETRY_ILM_ASYNC_ACTION_REQUIRE_ERROR_8_18 = def(8_840_0_02);
146144
public static final TransportVersion INITIAL_ELASTICSEARCH_8_19 = def(8_841_0_00);
147145
public static final TransportVersion COHERE_BIT_EMBEDDING_TYPE_SUPPORT_ADDED_BACKPORT_8_X = def(8_841_0_01);
148146
// TODO: add to remove_all_applicable_selector.csv
149147
public static final TransportVersion REMOVE_ALL_APPLICABLE_SELECTOR_BACKPORT_8_19 = def(8_841_0_02);
150148
public static final TransportVersion ESQL_RETRY_ON_SHARD_LEVEL_FAILURE_BACKPORT_8_19 = def(8_841_0_03);
151149
public static final TransportVersion ESQL_SUPPORT_PARTIAL_RESULTS_BACKPORT_8_19 = def(8_841_0_04);
152150
public static final TransportVersion VOYAGE_AI_INTEGRATION_ADDED_BACKPORT_8_X = def(8_841_0_05);
153-
public static final TransportVersion JINA_AI_EMBEDDING_TYPE_SUPPORT_ADDED_BACKPORT_8_19 = def(8_841_0_06);
154-
// TODO: add to retry_ilm_async_action_require_error.csv
155-
public static final TransportVersion RETRY_ILM_ASYNC_ACTION_REQUIRE_ERROR_8_19 = def(8_841_0_07);
156-
public static final TransportVersion INFERENCE_CONTEXT_8_X = def(8_841_0_08);
157-
public static final TransportVersion ML_INFERENCE_DEEPSEEK_8_19 = def(8_841_0_09);
158-
public static final TransportVersion ESQL_SERIALIZE_BLOCK_TYPE_CODE_8_19 = def(8_841_0_10);
159151
public static final TransportVersion COHERE_BIT_EMBEDDING_TYPE_SUPPORT_ADDED = def(9_001_0_00);
160152
public static final TransportVersion ESQL_RETRY_ON_SHARD_LEVEL_FAILURE = def(9_006_0_00);
161153
public static final TransportVersion ESQL_PROFILE_ASYNC_NANOS = def(9_007_00_0);
@@ -167,13 +159,9 @@ static TransportVersion def(int id) {
167159
public static final TransportVersion ESQL_SERIALIZE_SOURCE_FUNCTIONS_WARNINGS = def(9_016_0_00);
168160
public static final TransportVersion ESQL_DRIVER_NODE_DESCRIPTION = def(9_017_0_00);
169161
public static final TransportVersion MULTI_PROJECT = def(9_018_0_00);
170-
public static final TransportVersion JINA_AI_EMBEDDING_TYPE_SUPPORT_ADDED = def(9_020_0_00);
171162
public static final TransportVersion UNASSIGENEDINFO_RESHARD_ADDED = def(9_022_0_00);
172163
public static final TransportVersion MAX_OPERATION_SIZE_REJECTIONS_ADDED = def(9_024_0_00);
173-
public static final TransportVersion ESQL_SERIALIZE_BLOCK_TYPE_CODE = def(9_026_0_00);
174164
public static final TransportVersion ESQL_THREAD_NAME_IN_DRIVER_PROFILE = def(9_027_0_00);
175-
public static final TransportVersion INFERENCE_CONTEXT = def(9_028_0_00);
176-
public static final TransportVersion ML_INFERENCE_DEEPSEEK = def(9_029_00_0);
177165
public static final TransportVersion INDEX_RESHARDING_METADATA = def(9_031_0_00);
178166
public static final TransportVersion INDEXING_STATS_INCLUDES_RECENT_WRITE_LOAD = def(9_034_0_00);
179167
public static final TransportVersion INDEX_METADATA_INCLUDES_RECENT_WRITE_LOAD = def(9_036_0_00);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
9026000,8841010
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
9028000,8841008
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
9020000,8841006
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
9029000,8841009
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9025000,9000007
1+
9025000,9000007,8841007,8840002

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/ilm/action/RetryActionRequest.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
package org.elasticsearch.xpack.core.ilm.action;
99

1010
import org.elasticsearch.TransportVersion;
11-
import org.elasticsearch.TransportVersions;
1211
import org.elasticsearch.action.ActionRequestValidationException;
1312
import org.elasticsearch.action.IndicesRequest;
1413
import org.elasticsearch.action.support.IndicesOptions;
@@ -40,9 +39,7 @@ public RetryActionRequest(StreamInput in) throws IOException {
4039
super(in);
4140
this.indices = in.readStringArray();
4241
this.indicesOptions = IndicesOptions.readIndicesOptions(in);
43-
if (in.getTransportVersion().supports(RETRY_ILM_ASYNC_ACTION_REQUIRE_ERROR)
44-
|| in.getTransportVersion().isPatchFrom(TransportVersions.RETRY_ILM_ASYNC_ACTION_REQUIRE_ERROR_8_19)
45-
|| in.getTransportVersion().isPatchFrom(TransportVersions.RETRY_ILM_ASYNC_ACTION_REQUIRE_ERROR_8_18)) {
42+
if (in.getTransportVersion().supports(RETRY_ILM_ASYNC_ACTION_REQUIRE_ERROR)) {
4643
this.requireError = in.readBoolean();
4744
}
4845
}
@@ -86,9 +83,7 @@ public void writeTo(StreamOutput out) throws IOException {
8683
super.writeTo(out);
8784
out.writeStringArray(indices);
8885
indicesOptions.writeIndicesOptions(out);
89-
if (out.getTransportVersion().supports(RETRY_ILM_ASYNC_ACTION_REQUIRE_ERROR)
90-
|| out.getTransportVersion().isPatchFrom(TransportVersions.RETRY_ILM_ASYNC_ACTION_REQUIRE_ERROR_8_19)
91-
|| out.getTransportVersion().isPatchFrom(TransportVersions.RETRY_ILM_ASYNC_ACTION_REQUIRE_ERROR_8_18)) {
86+
if (out.getTransportVersion().supports(RETRY_ILM_ASYNC_ACTION_REQUIRE_ERROR)) {
9287
out.writeBoolean(requireError);
9388
}
9489
}

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/inference/action/BaseInferenceActionRequest.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
*/
2525
public abstract class BaseInferenceActionRequest extends LegacyActionRequest {
2626

27+
private static final TransportVersion INFERENCE_CONTEXT = TransportVersion.fromName("inference_context");
2728
static final TransportVersion INFERENCE_REQUEST_ADAPTIVE_RATE_LIMITING_REMOVED = TransportVersion.fromName(
2829
"inference_request_adaptive_rate_limiting_removed"
2930
);
@@ -42,8 +43,7 @@ public BaseInferenceActionRequest(StreamInput in) throws IOException {
4243
in.readBoolean();
4344
}
4445

45-
if (in.getTransportVersion().onOrAfter(TransportVersions.INFERENCE_CONTEXT)
46-
|| in.getTransportVersion().isPatchFrom(TransportVersions.INFERENCE_CONTEXT_8_X)) {
46+
if (in.getTransportVersion().supports(INFERENCE_CONTEXT)) {
4747
this.context = new InferenceContext(in);
4848
} else {
4949
this.context = InferenceContext.EMPTY_INSTANCE;
@@ -68,8 +68,7 @@ public void writeTo(StreamOutput out) throws IOException {
6868
out.writeBoolean(true);
6969
}
7070

71-
if (out.getTransportVersion().onOrAfter(TransportVersions.INFERENCE_CONTEXT)
72-
|| out.getTransportVersion().isPatchFrom(TransportVersions.INFERENCE_CONTEXT_8_X)) {
71+
if (out.getTransportVersion().supports(INFERENCE_CONTEXT)) {
7372
context.writeTo(out);
7473
}
7574
}

x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/inference/action/InferenceActionProxy.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
package org.elasticsearch.xpack.core.inference.action;
99

10-
import org.elasticsearch.TransportVersions;
10+
import org.elasticsearch.TransportVersion;
1111
import org.elasticsearch.action.ActionRequestValidationException;
1212
import org.elasticsearch.action.ActionType;
1313
import org.elasticsearch.action.LegacyActionRequest;
@@ -40,6 +40,8 @@ public InferenceActionProxy() {
4040

4141
public static class Request extends LegacyActionRequest {
4242

43+
private static final TransportVersion INFERENCE_CONTEXT = TransportVersion.fromName("inference_context");
44+
4345
private final TaskType taskType;
4446
private final String inferenceEntityId;
4547
private final BytesReference content;
@@ -77,8 +79,7 @@ public Request(StreamInput in) throws IOException {
7779
// streaming is not supported yet for transport traffic
7880
this.stream = false;
7981

80-
if (in.getTransportVersion().onOrAfter(TransportVersions.INFERENCE_CONTEXT)
81-
|| in.getTransportVersion().isPatchFrom(TransportVersions.INFERENCE_CONTEXT_8_X)) {
82+
if (in.getTransportVersion().supports(INFERENCE_CONTEXT)) {
8283
this.context = new InferenceContext(in);
8384
} else {
8485
this.context = InferenceContext.EMPTY_INSTANCE;
@@ -127,8 +128,7 @@ public void writeTo(StreamOutput out) throws IOException {
127128
XContentHelper.writeTo(out, contentType);
128129
out.writeTimeValue(timeout);
129130

130-
if (out.getTransportVersion().onOrAfter(TransportVersions.INFERENCE_CONTEXT)
131-
|| out.getTransportVersion().isPatchFrom(TransportVersions.INFERENCE_CONTEXT_8_X)) {
131+
if (out.getTransportVersion().supports(INFERENCE_CONTEXT)) {
132132
context.writeTo(out);
133133
}
134134
}

x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/inference/action/InferenceActionRequestTests.java

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333

3434
public class InferenceActionRequestTests extends AbstractBWCWireSerializationTestCase<InferenceAction.Request> {
3535

36+
private static final TransportVersion INFERENCE_CONTEXT = TransportVersion.fromName("inference_context");
3637
private static final TransportVersion RERANK_COMMON_OPTIONS_ADDED = TransportVersion.fromName("rerank_common_options_added");
3738

3839
@Override
@@ -698,38 +699,37 @@ protected InferenceAction.Request mutateInstanceForVersion(InferenceAction.Reque
698699
InferenceAction.Request.DEFAULT_TIMEOUT,
699700
false
700701
);
701-
} else if (version.before(TransportVersions.INFERENCE_CONTEXT)
702-
&& version.isPatchFrom(TransportVersions.INFERENCE_CONTEXT_8_X) == false) {
703-
mutated = new InferenceAction.Request(
704-
instance.getTaskType(),
705-
instance.getInferenceEntityId(),
706-
instance.getQuery(),
707-
null,
708-
null,
709-
instance.getInput(),
710-
instance.getTaskSettings(),
711-
instance.getInputType(),
712-
instance.getInferenceTimeout(),
713-
false,
714-
InferenceContext.EMPTY_INSTANCE
715-
);
716-
} else if (version.supports(RERANK_COMMON_OPTIONS_ADDED) == false) {
717-
mutated = new InferenceAction.Request(
718-
instance.getTaskType(),
719-
instance.getInferenceEntityId(),
720-
instance.getQuery(),
721-
null,
722-
null,
723-
instance.getInput(),
724-
instance.getTaskSettings(),
725-
instance.getInputType(),
726-
instance.getInferenceTimeout(),
727-
false,
728-
instance.getContext()
729-
);
730-
} else {
731-
mutated = instance;
732-
}
702+
} else if (version.supports(INFERENCE_CONTEXT) == false) {
703+
mutated = new InferenceAction.Request(
704+
instance.getTaskType(),
705+
instance.getInferenceEntityId(),
706+
instance.getQuery(),
707+
null,
708+
null,
709+
instance.getInput(),
710+
instance.getTaskSettings(),
711+
instance.getInputType(),
712+
instance.getInferenceTimeout(),
713+
false,
714+
InferenceContext.EMPTY_INSTANCE
715+
);
716+
} else if (version.supports(RERANK_COMMON_OPTIONS_ADDED) == false) {
717+
mutated = new InferenceAction.Request(
718+
instance.getTaskType(),
719+
instance.getInferenceEntityId(),
720+
instance.getQuery(),
721+
null,
722+
null,
723+
instance.getInput(),
724+
instance.getTaskSettings(),
725+
instance.getInputType(),
726+
instance.getInferenceTimeout(),
727+
false,
728+
instance.getContext()
729+
);
730+
} else {
731+
mutated = instance;
732+
}
733733

734734
return mutated;
735735
}

0 commit comments

Comments
 (0)