Skip to content

Commit 36a2900

Browse files
authored
Merge branch 'main' into fix/decimal-digit-filter-ref
2 parents a1ae44a + 38b7bfc commit 36a2900

File tree

31 files changed

+631
-249
lines changed

31 files changed

+631
-249
lines changed

docs/changelog/129090.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 129090
2+
summary: Enable force inference endpoint deleting for invalid models and after stopping
3+
model deployment fails
4+
area: Machine Learning
5+
type: enhancement
6+
issues: []

docs/reference/query-languages/esql/_snippets/functions/layout/match_phrase.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

muted-tests.yml

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,9 +427,6 @@ tests:
427427
- class: org.elasticsearch.xpack.esql.expression.function.fulltext.ScoreTests
428428
method: testSerializationOfSimple {TestCase=<boolean>}
429429
issue: https://github.com/elastic/elasticsearch/issues/131334
430-
- class: org.elasticsearch.xpack.esql.analysis.VerifierTests
431-
method: testFullTextFunctionsOnlyAllowedInWhere
432-
issue: https://github.com/elastic/elasticsearch/issues/131335
433430
- class: org.elasticsearch.xpack.esql.analysis.VerifierTests
434431
method: testMatchInsideEval
435432
issue: https://github.com/elastic/elasticsearch/issues/131336
@@ -445,6 +442,27 @@ tests:
445442
- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT
446443
method: test {p0=search/110_field_collapsing/field collapsing, inner_hits and maxConcurrentGroupRequests}
447444
issue: https://github.com/elastic/elasticsearch/issues/131348
445+
- class: org.elasticsearch.xpack.esql.vector.VectorSimilarityFunctionsIT
446+
method: testSimilarityBetweenConstantVectors {functionName=v_cosine similarityFunction=COSINE}
447+
issue: https://github.com/elastic/elasticsearch/issues/131361
448+
- class: org.elasticsearch.xpack.esql.vector.VectorSimilarityFunctionsIT
449+
method: testDifferentDimensions {functionName=v_cosine similarityFunction=COSINE}
450+
issue: https://github.com/elastic/elasticsearch/issues/131362
451+
- class: org.elasticsearch.xpack.esql.vector.VectorSimilarityFunctionsIT
452+
method: testSimilarityBetweenConstantVectorAndField {functionName=v_cosine similarityFunction=COSINE}
453+
issue: https://github.com/elastic/elasticsearch/issues/131363
454+
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
455+
method: test {p0=ml/delete_expired_data/Test delete expired data with body parameters}
456+
issue: https://github.com/elastic/elasticsearch/issues/131364
457+
- class: org.elasticsearch.packaging.test.DockerTests
458+
method: test070BindMountCustomPathConfAndJvmOptions
459+
issue: https://github.com/elastic/elasticsearch/issues/131366
460+
- class: org.elasticsearch.packaging.test.DockerTests
461+
method: test140CgroupOsStatsAreAvailable
462+
issue: https://github.com/elastic/elasticsearch/issues/131372
463+
- class: org.elasticsearch.packaging.test.DockerTests
464+
method: test130JavaHasCorrectOwnership
465+
issue: https://github.com/elastic/elasticsearch/issues/131369
448466

449467
# Examples:
450468
#

server/src/test/java/org/elasticsearch/common/util/concurrent/AbstractAsyncTaskTests.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,14 @@ protected void runInternal() {
5959
try {
6060
barrier1.await();
6161
} catch (Exception e) {
62+
logger.error("barrier1 interrupted", e);
6263
fail("interrupted");
6364
}
6465
count.incrementAndGet();
6566
try {
6667
barrier2.await();
6768
} catch (Exception e) {
69+
logger.error("barrier2 interrupted", e);
6870
fail("interrupted");
6971
}
7072
if (shouldRunThrowException) {
@@ -112,6 +114,7 @@ protected void runInternal() {
112114
try {
113115
barrier.await();
114116
} catch (Exception e) {
117+
logger.error("barrier interrupted", e);
115118
fail("interrupted");
116119
}
117120
if (shouldRunThrowException) {

x-pack/plugin/async-search/src/internalClusterTest/java/org/elasticsearch/xpack/search/AsyncSearchErrorTraceIT.java

Lines changed: 84 additions & 86 deletions
Large diffs are not rendered by default.

x-pack/plugin/esql/src/internalClusterTest/java/org/elasticsearch/xpack/esql/plugin/DataNodeRequestSenderIT.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import org.elasticsearch.action.index.IndexRequest;
1111
import org.elasticsearch.action.support.WriteRequest;
1212
import org.elasticsearch.cluster.metadata.IndexMetadata;
13+
import org.elasticsearch.cluster.metadata.ProjectId;
1314
import org.elasticsearch.common.settings.Settings;
1415
import org.elasticsearch.common.util.CollectionUtils;
1516
import org.elasticsearch.compute.operator.exchange.ExchangeService;
@@ -131,12 +132,8 @@ public void testRetryOnShardMovement() {
131132
(handler, request, channel, task) -> {
132133
// move index shard
133134
if (shouldMove.compareAndSet(true, false)) {
134-
var currentShardNodeId = clusterService().state()
135-
.routingTable()
136-
.index("index-1")
137-
.shard(0)
138-
.primaryShard()
139-
.currentNodeId();
135+
var shardRouting = clusterService().state().routingTable(ProjectId.DEFAULT).shardRoutingTable("index-1", 0);
136+
var currentShardNodeId = shardRouting.primaryShard().currentNodeId();
140137
assertAcked(
141138
client().admin()
142139
.indices()

x-pack/plugin/esql/src/main/java/org/elasticsearch/xpack/esql/expression/function/fulltext/MatchPhrase.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,7 @@ public class MatchPhrase extends FullTextFunction implements OptionalArgument, P
9090

9191
@FunctionInfo(
9292
returnType = "boolean",
93-
appliesTo = {
94-
@FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.UNAVAILABLE, version = "9.0"),
95-
@FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.GA, version = "9.1.0") },
93+
appliesTo = { @FunctionAppliesTo(lifeCycle = FunctionAppliesToLifecycle.GA, version = "9.1.0") },
9694
description = """
9795
Use `MATCH_PHRASE` to perform a [`match_phrase`](/reference/query-languages/query-dsl/query-dsl-match-query-phrase.md) on the
9896
specified field.

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/analysis/VerifierTests.java

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,7 +1213,9 @@ public void testWeightedAvg() {
12131213

12141214
public void testMatchInsideEval() throws Exception {
12151215
assertEquals(
1216-
"1:36: [:] operator is only supported in WHERE and STATS commands, or in EVAL within score(.) function\n"
1216+
"1:36: [:] operator is only supported in WHERE and STATS commands"
1217+
+ (EsqlCapabilities.Cap.SCORE_FUNCTION.isEnabled() ? ", or in EVAL within score(.) function" : "")
1218+
+ "\n"
12171219
+ "line 1:36: [:] operator cannot operate on [title], which is not a field from an index mapping",
12181220
error("row title = \"brown fox\" | eval x = title:\"fox\" ")
12191221
);
@@ -1385,7 +1387,8 @@ private void checkFullTextFunctionsOnlyAllowedInWhere(String functionName, Strin
13851387
+ functionName
13861388
+ "] "
13871389
+ functionType
1388-
+ " is only supported in WHERE and STATS commands, or in EVAL within score(.) function"
1390+
+ " is only supported in WHERE and STATS commands"
1391+
+ (EsqlCapabilities.Cap.SCORE_FUNCTION.isEnabled() ? ", or in EVAL within score(.) function" : "")
13891392
)
13901393
);
13911394
assertThat(
@@ -1400,7 +1403,14 @@ private void checkFullTextFunctionsOnlyAllowedInWhere(String functionName, Strin
14001403
if ("KQL".equals(functionName) || "QSTR".equals(functionName)) {
14011404
assertThat(
14021405
error("row a = " + functionInvocation, fullTextAnalyzer),
1403-
containsString("[" + functionName + "] " + functionType + " is only supported in WHERE and STATS commands")
1406+
containsString(
1407+
"["
1408+
+ functionName
1409+
+ "] "
1410+
+ functionType
1411+
+ " is only supported in WHERE and STATS commands"
1412+
+ (EsqlCapabilities.Cap.SCORE_FUNCTION.isEnabled() ? ", or in EVAL within score(.) function" : "")
1413+
)
14041414
);
14051415
}
14061416
}

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

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import org.elasticsearch.common.Strings;
2424
import org.elasticsearch.common.util.concurrent.EsExecutors;
2525
import org.elasticsearch.inference.InferenceServiceRegistry;
26+
import org.elasticsearch.inference.Model;
2627
import org.elasticsearch.inference.UnparsedModel;
2728
import org.elasticsearch.injection.guice.Inject;
2829
import org.elasticsearch.rest.RestStatus;
@@ -128,10 +129,38 @@ private void doExecuteForked(
128129
}
129130

130131
var service = serviceRegistry.getService(unparsedModel.service());
132+
Model model;
131133
if (service.isPresent()) {
132-
var model = service.get()
133-
.parsePersistedConfig(unparsedModel.inferenceEntityId(), unparsedModel.taskType(), unparsedModel.settings());
134-
service.get().stop(model, listener);
134+
try {
135+
model = service.get()
136+
.parsePersistedConfig(unparsedModel.inferenceEntityId(), unparsedModel.taskType(), unparsedModel.settings());
137+
} catch (Exception e) {
138+
if (request.isForceDelete()) {
139+
listener.onResponse(true);
140+
return;
141+
} else {
142+
listener.onFailure(
143+
new ElasticsearchStatusException(
144+
Strings.format(
145+
"Failed to parse model configuration for inference endpoint [%s]",
146+
request.getInferenceEndpointId()
147+
),
148+
RestStatus.INTERNAL_SERVER_ERROR,
149+
e
150+
)
151+
);
152+
return;
153+
}
154+
}
155+
service.get().stop(model, listener.delegateResponse((l, e) -> {
156+
if (request.isForceDelete()) {
157+
l.onResponse(true);
158+
} else {
159+
l.onFailure(e);
160+
}
161+
}));
162+
} else if (request.isForceDelete()) {
163+
listener.onResponse(true);
135164
} else {
136165
listener.onFailure(
137166
new ElasticsearchStatusException(

x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/sagemaker/model/SageMakerModel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public SageMakerModel override(Map<String, Object> taskSettingsOverride) {
116116
getConfigurations(),
117117
getSecrets(),
118118
serviceSettings,
119-
taskSettings.updatedTaskSettings(taskSettingsOverride),
119+
taskSettings.override(taskSettingsOverride),
120120
awsSecretSettings
121121
);
122122
}

0 commit comments

Comments
 (0)