Skip to content

Commit 07e4e89

Browse files
author
elasticsearchmachine
committed
Merge remote-tracking branch 'origin/main' into lucene_snapshot
2 parents 35f366b + 8e26d18 commit 07e4e89

File tree

174 files changed

+1780
-1623
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

174 files changed

+1780
-1623
lines changed

.buildkite/scripts/dra-workflow.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,18 @@ if [[ "$BRANCH" == "main" ]]; then
2222
fi
2323

2424
ES_VERSION=$(grep elasticsearch build-tools-internal/version.properties | sed "s/elasticsearch *= *//g")
25+
echo "ES_VERSION=$ES_VERSION"
2526

2627
VERSION_SUFFIX=""
2728
if [[ "$WORKFLOW" == "snapshot" ]]; then
2829
VERSION_SUFFIX="-SNAPSHOT"
2930
fi
3031

3132
BEATS_BUILD_ID="$(./.ci/scripts/resolve-dra-manifest.sh beats "$RM_BRANCH" "$ES_VERSION" "$WORKFLOW")"
33+
echo "BEATS_BUILD_ID=$BEATS_BUILD_ID"
34+
3235
ML_CPP_BUILD_ID="$(./.ci/scripts/resolve-dra-manifest.sh ml-cpp "$RM_BRANCH" "$ES_VERSION" "$WORKFLOW")"
36+
echo "ML_CPP_BUILD_ID=$ML_CPP_BUILD_ID"
3337

3438
LICENSE_KEY_ARG=""
3539
BUILD_SNAPSHOT_ARG=""

docs/changelog/114271.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 114271
2+
summary: "[ES|QL] Skip validating remote cluster index names in parser"
3+
area: ES|QL
4+
type: bug
5+
issues: []

docs/changelog/114784.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 114784
2+
summary: "[ES|QL] make named parameter for identifier and pattern snapshot"
3+
area: ES|QL
4+
type: bug
5+
issues: []

docs/changelog/114854.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
pr: 114854
2+
summary: Adding deprecation warnings for rrf using rank and `sub_searches`
3+
area: Search
4+
type: deprecation
5+
issues: []
6+
deprecation:
7+
title: Adding deprecation warnings for rrf using rank and `sub_searches`
8+
area: REST API
9+
details: Search API parameter `sub_searches` will no longer be a supported and will be removed in future releases. Similarly, `rrf` can only be used through the specified `retriever` and no longer though the `rank` parameter
10+
impact: Requests specifying rrf through `rank` and/or `sub_searches` elements will be disallowed in a future version. Users should instead utilize the new `retriever` parameter.

docs/changelog/114869.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 114869
2+
summary: Standardize error code when bulk body is invalid
3+
area: CRUD
4+
type: bug
5+
issues: []

docs/changelog/114924.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 114924
2+
summary: Reducing error-level stack trace logging for normal events in `GeoIpDownloader`
3+
area: Ingest Node
4+
type: bug
5+
issues: []

docs/reference/inference/inference-apis.asciidoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ the following APIs to manage {infer} models and perform {infer}:
2121
* <<get-inference-api>>
2222
* <<post-inference-api>>
2323
* <<put-inference-api>>
24+
* <<update-inference-api>>
2425

2526
[[inference-landscape]]
2627
.A representation of the Elastic inference landscape
@@ -39,6 +40,7 @@ include::delete-inference.asciidoc[]
3940
include::get-inference.asciidoc[]
4041
include::post-inference.asciidoc[]
4142
include::put-inference.asciidoc[]
43+
include::update-inference.asciidoc[]
4244
include::service-alibabacloud-ai-search.asciidoc[]
4345
include::service-amazon-bedrock.asciidoc[]
4446
include::service-anthropic.asciidoc[]
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
[role="xpack"]
2+
[[update-inference-api]]
3+
=== Update inference API
4+
5+
experimental[]
6+
7+
Updates an {infer} endpoint.
8+
9+
IMPORTANT: The {infer} APIs enable you to use certain services, such as built-in {ml} models (ELSER, E5), models uploaded through Eland, Cohere, OpenAI, Azure, Google AI Studio, Google Vertex AI or Hugging Face.
10+
For built-in models and models uploaded through Eland, the {infer} APIs offer an alternative way to use and manage trained models.
11+
However, if you do not plan to use the {infer} APIs to use these models or if you want to use non-NLP models, use the <<ml-df-trained-models-apis>>.
12+
13+
14+
[discrete]
15+
[[update-inference-api-request]]
16+
==== {api-request-title}
17+
18+
`POST _inference/<inference_id>/_update`
19+
20+
`POST _inference/<task_type>/<inference_id>/_update`
21+
22+
23+
[discrete]
24+
[[update-inference-api-prereqs]]
25+
==== {api-prereq-title}
26+
27+
* Requires the `manage_inference` <<privileges-list-cluster,cluster privilege>> (the built-in inference_admin role grants this privilege)
28+
* Requires an existing {infer} endpoint, created by using the <<put-inference-api>>
29+
30+
31+
[discrete]
32+
[[update-inference-api-desc]]
33+
==== {api-description-title}
34+
35+
The update inference API enables you to update the task_settings, secrets, and/or num_allocations of an existing {infer} endpoint.
36+
37+
To use the update API, you can modify `task_settings`, secrets (within `service_settings`), or `num_allocations`, depending on the specific endpoint service and task_type you've created.
38+
To view the updatable `task_settings`, the field names of secrets (specific to each service), and the services where `num_allocations` is applicable (only for the `elasticsearch` service), refer to the following list of services available through the {infer} API.
39+
You will find the available task types next to each service name.
40+
Click the links to review the service configuration details:
41+
42+
* <<infer-service-alibabacloud-ai-search,AlibabaCloud AI Search>> (`completion`, `rerank`, `sparse_embedding`, `text_embedding`)
43+
* <<infer-service-amazon-bedrock,Amazon Bedrock>> (`completion`, `text_embedding`)
44+
* <<infer-service-anthropic,Anthropic>> (`completion`)
45+
* <<infer-service-azure-ai-studio,Azure AI Studio>> (`completion`, `text_embedding`)
46+
* <<infer-service-azure-openai,Azure OpenAI>> (`completion`, `text_embedding`)
47+
* <<infer-service-cohere,Cohere>> (`completion`, `rerank`, `text_embedding`)
48+
* <<infer-service-elasticsearch,Elasticsearch>> (`rerank`, `sparse_embedding`, `text_embedding` - this service is for built-in models and models uploaded through Eland)
49+
* <<infer-service-elser,ELSER>> (`sparse_embedding`)
50+
* <<infer-service-google-ai-studio,Google AI Studio>> (`completion`, `text_embedding`)
51+
* <<infer-service-google-vertex-ai,Google Vertex AI>> (`rerank`, `text_embedding`)
52+
* <<infer-service-hugging-face,Hugging Face>> (`text_embedding`)
53+
* <<infer-service-mistral,Mistral>> (`text_embedding`)
54+
* <<infer-service-openai,OpenAI>> (`completion`, `text_embedding`)
55+
56+
57+
[discrete]
58+
[[update-inference-api-path-params]]
59+
==== {api-path-parms-title}
60+
61+
`<inference_id>`::
62+
(Required, string)
63+
The unique identifier of the {infer} endpoint.
64+
65+
66+
`<task_type>`::
67+
(Optional, string)
68+
The type of {infer} task that the model performs.
69+
Refer to the service list in the <<put-inference-api-desc,API description section>> for the available task types.
70+
71+
72+
[discrete]
73+
[[update-inference-api-example]]
74+
==== {api-examples-title}
75+
76+
The following example shows how to update an API key of an {infer} endpoint called `my-inference-endpoint`:
77+
78+
[source,console]
79+
------------------------------------------------------------
80+
POST _inference/my-inference-endpoint/_update
81+
{
82+
"service_settings": {
83+
"api_key": "<API_KEY>"
84+
}
85+
}
86+
------------------------------------------------------------
87+
// TEST[skip:TBD]

modules/ingest-geoip/src/main/java/org/elasticsearch/ingest/geoip/GeoIpDownloader.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
import org.apache.logging.log4j.LogManager;
1313
import org.apache.logging.log4j.Logger;
14-
import org.elasticsearch.ElasticsearchException;
1514
import org.elasticsearch.action.ActionListener;
1615
import org.elasticsearch.action.admin.indices.flush.FlushRequest;
1716
import org.elasticsearch.action.admin.indices.refresh.RefreshRequest;
@@ -139,11 +138,18 @@ void updateDatabases() throws IOException {
139138
if (geoipIndex != null) {
140139
logger.trace("The {} index is not null", GeoIpDownloader.DATABASES_INDEX);
141140
if (clusterState.getRoutingTable().index(geoipIndex.getWriteIndex()).allPrimaryShardsActive() == false) {
142-
throw new ElasticsearchException("not all primary shards of [" + DATABASES_INDEX + "] index are active");
141+
logger.debug(
142+
"Not updating geoip database because not all primary shards of the [" + DATABASES_INDEX + "] index are active."
143+
);
144+
return;
143145
}
144146
var blockException = clusterState.blocks().indexBlockedException(ClusterBlockLevel.WRITE, geoipIndex.getWriteIndex().getName());
145147
if (blockException != null) {
146-
throw blockException;
148+
logger.debug(
149+
"Not updating geoip database because there is a write block on the " + geoipIndex.getWriteIndex().getName() + " index",
150+
blockException
151+
);
152+
return;
147153
}
148154
}
149155
if (eagerDownloadSupplier.get() || atLeastOneGeoipProcessorSupplier.get()) {

modules/ingest-geoip/src/main/java/org/elasticsearch/ingest/geoip/GeoIpTaskState.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@
4444
public class GeoIpTaskState implements PersistentTaskState, VersionedNamedWriteable {
4545

4646
private static boolean includeSha256(TransportVersion version) {
47-
return version.isPatchFrom(TransportVersions.ENTERPRISE_GEOIP_DOWNLOADER_BACKPORT_8_15)
48-
|| version.onOrAfter(TransportVersions.ENTERPRISE_GEOIP_DOWNLOADER);
47+
return version.isPatchFrom(TransportVersions.V_8_15_0) || version.onOrAfter(TransportVersions.ENTERPRISE_GEOIP_DOWNLOADER);
4948
}
5049

5150
private static final ParseField DATABASES = new ParseField("databases");

0 commit comments

Comments
 (0)