Skip to content

Commit a1b1737

Browse files
committed
Merge branch 'main' of https://github.com/elastic/elasticsearch into esql-reranker-boostrap
2 parents 0f8362d + 56027da commit a1b1737

File tree

33 files changed

+388
-93
lines changed

33 files changed

+388
-93
lines changed

.buildkite/hooks/pre-command

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ if [[ "${USE_PROD_DOCKER_CREDENTIALS:-}" == "true" ]]; then
9494
fi
9595
fi
9696

97+
# Authenticate to the Docker Hub public read-only registry
98+
if which docker > /dev/null 2>&1; then
99+
DOCKERHUB_REGISTRY_USERNAME="$(vault read -field=username secret/ci/elastic-elasticsearch/docker_hub_public_ro_credentials)"
100+
DOCKERHUB_REGISTRY_PASSWORD="$(vault read -field=password secret/ci/elastic-elasticsearch/docker_hub_public_ro_credentials)"
101+
102+
echo "$DOCKERHUB_REGISTRY_PASSWORD" | docker login --username "$DOCKERHUB_REGISTRY_USERNAME" --password-stdin docker.io
103+
fi
104+
97105
if [[ "$BUILDKITE_AGENT_META_DATA_PROVIDER" != *"k8s"* ]]; then
98106
# Run in the background, while the job continues
99107
nohup .buildkite/scripts/setup-monitoring.sh </dev/null >/dev/null 2>&1 &

REST_API_COMPATIBILITY.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,11 @@ if (request.getRestApiVersion() == RestApiVersion.V_7 && request.hasParam("limit
154154

155155
The above code checks the request's compatible version and if the request has the parameter in question. In this case the deprecation warning is not automatic and requires the developer to manually log the warning. `request.param` is also required since it consumes the value as to avoid the error of unconsumed parameters.
156156

157-
### Testing
157+
### Testing Backwards Compatibility
158158

159-
The primary means of testing compatibility is via the prior major version's YAML REST tests. The build system will download the latest prior version of the YAML rest tests and execute them against the current cluster version. Prior to execution the tests will be transformed by injecting the correct headers to enable compatibility as well as other custom changes to the tests to allow the tests to pass. These customizations are configured via the build.gradle and happen just prior to test execution. Since the compatibility tests are manipulated version of the tests stored in Github (via the past major version), it is important to find the local (on disk) version for troubleshooting compatibility tests.
159+
The primary means of testing compatibility is via the prior major version's YAML REST tests. The build system will download the latest prior version of the YAML rest tests and execute them against the current cluster version. For example if you are testing main versioned as 9.0.0 the build system will download the yaml tests in the 8.x branch and execute those against the current cluster version for 9.0.0.
160+
161+
Prior to execution the tests will be transformed by injecting the correct headers to enable compatibility as well as other custom changes to the tests to allow the tests to pass. These customizations are configured via the build.gradle and happen just prior to test execution. Since the compatibility tests are manipulated version of the tests stored in Github (via the past major version), it is important to find the local (on disk) version for troubleshooting compatibility tests.
160162

161163
The tests are wired into the `check` task, so that is the easiest way to test locally prior to committing. More specifically the task is called `yamlRestCompatTest`. These behave nearly identical to it's non-compat `yamlRestTest` task. The only variance is that the tests are sourced from the prior version branch and the tests go through a transformation phase before execution. The transformation task is `yamlRestCompatTestTransform`.
162164

@@ -170,6 +172,36 @@ Since these are a variation of backward compatibility testing, the entire suite
170172

171173
In some cases the prior version of the YAML REST tests are not sufficient to fully test changes. This can happen when the prior version has insufficient test coverage. In those cases, you can simply add more testing to the prior version or you can add custom REST tests that will run along side of the other compatibility tests. These custom tests can be found in the `yamlRestCompatTest` sourceset. Custom REST tests for compatibility will not be modified prior to execution, so the correct headers need to be manually added.
172174

175+
#### Breaking Changes
176+
177+
It is possible to be in a state where you have intentionally made a breaking change and the compatibility tests will fail irrespective of checks for `skip` or `requires` cluster or test features in the current version such as 9.0.0. In this state, assuming the breaking changes are reasonable and agreed upon by the breaking change committee, the correct behavior is to skip the test in the `build.gradle` in 9.0.0. For example, if you make a breaking change that causes the `range/20_synthetic_source/Date range` to break then this test can be disabled temporarily in this file `rest-api-spec/build.gradle` like within this snippet:
178+
179+
```groovy
180+
tasks.named("yamlRestCompatTestTransform").configure({task ->
181+
task.skipTest("range/20_synthetic_source/Date range", "date range breaking change causes tests to produce incorrect values for compatibility")
182+
task.skipTest("indices.sort/10_basic/Index Sort", "warning does not exist for compatibility")
183+
task.skipTest("search/330_fetch_fields/Test search rewrite", "warning does not exist for compatibility")
184+
task.skipTestsByFilePattern("indices.create/synthetic_source*.yml", "@UpdateForV9 -> tests do not pass after bumping API version to 9 [ES-9597]")
185+
})
186+
```
187+
188+
When skipping a test temporarily in 9.0.0, we have to implement the proper `skip` and `requires` conditions to previous branches, such as 8.latest. After these conditions are implemented in 8.latest, you can re-enable the test in 9.0.0 by removing the `skipTest` condition.
189+
190+
The team implementing the changes can decide how to clean up or modify tests based on how breaking changes were backported. e.g.:
191+
192+
In 8.latest:
193+
194+
* Add `skip` / `requires` conditions to existing tests that check the old behavior. This prevents those tests from failing during backward compatibility or upgrade testing from 8.latest to 9.0.0
195+
196+
In 9.0.0:
197+
198+
* Add `requires` conditions for new tests that validate the updated API or output format
199+
* Add `skip` conditions for older tests that would break in 9.0.0
200+
201+
#### Test Features
202+
203+
Both cluster and test features exist. Cluster features are meant for new capability and test features can specifically be used to gate and manage `skip` and `requires` yaml test operations. For more information, see [Versioning.md](docs/internal/Versioning.md#cluster-features). When backporting and using these features they can not overlap in name and must be consistent when backported so that clusters built with these features are compatible.
204+
173205
### Developer's workflow
174206

175207
There should not be much, if any, deviation in a developers normal workflow to introduce and back-port changes. Changes should be applied in main, then back ported as needed.

docs/changelog/124669.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
pr: 124669
2+
summary: Release semantic_text as a GA feature
3+
area: Mapping
4+
type: feature
5+
issues: []
6+
highlight:
7+
title: Release semantic_text as a GA feature
8+
body: semantic_text is now an official GA (generally available) feature!
9+
This field type allows you to easily set up and perform semantic search with minimal ramp up time.
10+
notable: true

docs/changelog/125171.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 125171
2+
summary: Reindex data stream indices on different nodes
3+
area: Data streams
4+
type: enhancement
5+
issues: []

docs/changelog/125244.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
pr: 125244
2+
summary: Disable logging in `ClusterFormationFailureHelper` on shutdown
3+
area: Cluster Coordination
4+
type: bug
5+
issues:
6+
- 105559

docs/changelog/125259.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 125259
2+
summary: Leverage scorer supplier in `QueryFeatureExtractor`
3+
area: Ranking
4+
type: enhancement
5+
issues: []

docs/reference/elasticsearch/mapping-reference/semantic-text.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ mapped_pages:
66

77
# Semantic text field type [semantic-text]
88

9-
10-
::::{warning}
11-
This functionality is in beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.
12-
::::
13-
14-
159
The `semantic_text` field type automatically generates embeddings for text content using an inference endpoint. Long passages are [automatically chunked](#auto-text-chunking) to smaller sections to enable the processing of larger corpuses of text.
1610

1711
The `semantic_text` field type specifies an inference endpoint identifier that will be used to generate embeddings. You can create the inference endpoint by using the [Create {{infer}} API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put). This field type and the [`semantic` query](/reference/query-languages/query-dsl/query-dsl-semantic-query.md) type make it simpler to perform semantic search on your data. The `semantic_text` field type may also be queried with [match](/reference/query-languages/query-dsl/query-dsl-match-query.md), [sparse_vector](/reference/query-languages/query-dsl/query-dsl-sparse-vector-query.md) or [knn](/reference/query-languages/query-dsl/query-dsl-knn-query.md) queries.

docs/reference/query-languages/query-dsl/query-dsl-semantic-query.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@ mapped_pages:
66

77
# Semantic query [query-dsl-semantic-query]
88

9-
10-
::::{warning}
11-
This functionality is in beta and is subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.
12-
::::
13-
14-
159
The `semantic` query type enables you to perform [semantic search](docs-content://solutions/search/semantic-search.md) on data stored in a [`semantic_text`](/reference/elasticsearch/mapping-reference/semantic-text.md) field.
1610

1711

muted-tests.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -360,9 +360,6 @@ tests:
360360
- class: org.elasticsearch.datastreams.lifecycle.DataStreamLifecycleServiceIT
361361
method: testErrorRecordingOnRetention
362362
issue: https://github.com/elastic/elasticsearch/issues/124950
363-
- class: org.elasticsearch.xpack.esql.qa.single_node.EsqlSpecIT
364-
method: test {lookup-join.MvJoinKeyFromRow SYNC}
365-
issue: https://github.com/elastic/elasticsearch/issues/124951
366363
- class: org.elasticsearch.xpack.esql.action.CrossClusterAsyncQueryStopIT
367364
method: testStopQueryLocalNoRemotes
368365
issue: https://github.com/elastic/elasticsearch/issues/124959
@@ -387,9 +384,6 @@ tests:
387384
- class: org.elasticsearch.datastreams.lifecycle.DataStreamLifecycleServiceIT
388385
method: testLifecycleAppliedToFailureStore
389386
issue: https://github.com/elastic/elasticsearch/issues/124999
390-
- class: org.elasticsearch.backwards.MixedClusterClientYamlTestSuiteIT
391-
method: test {p0=search/610_function_score/Random}
392-
issue: https://github.com/elastic/elasticsearch/issues/125010
393387
- class: org.elasticsearch.xpack.ilm.DataStreamAndIndexLifecycleMixingTests
394388
method: testGetDataStreamResponse
395389
issue: https://github.com/elastic/elasticsearch/issues/125083
@@ -402,6 +396,9 @@ tests:
402396
- class: org.elasticsearch.index.engine.ThreadPoolMergeSchedulerTests
403397
method: testSchedulerCloseWaitsForRunningMerge
404398
issue: https://github.com/elastic/elasticsearch/issues/125236
399+
- class: org.elasticsearch.reservedstate.service.ReservedClusterStateServiceTests
400+
method: testProcessMultipleChunks
401+
issue: https://github.com/elastic/elasticsearch/issues/125305
405402

406403
# Examples:
407404
#

rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/search/610_function_score.yml

Lines changed: 44 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,55 @@
7171
}
7272
},
7373
"random_score": {
74-
"seed": 10
74+
"seed": 10,
75+
"field": "uuid"
7576
}
7677
}
7778

7879
- length: { hits.hits: 2 }
7980
- match: { hits.total.value: 2 }
8081

82+
---
83+
"No field only runs on 9.x":
84+
- requires:
85+
cluster_features: [ "gte_v9.0.0" ]
86+
reason: "empty field works seamlessly (relying on _seqno since 9.x)"
87+
- do:
88+
indices.create:
89+
index: test
90+
body:
91+
mappings:
92+
properties:
93+
text:
94+
type: text
95+
96+
- do:
97+
index:
98+
index: test
99+
id: "1"
100+
body: { text: "foo bar", uuid: 1234 }
101+
102+
- do:
103+
index:
104+
index: test
105+
id: "2"
106+
body: { text: "high bar", uuid: 5678 }
107+
108+
- do:
109+
index:
110+
index: test
111+
id: "3"
112+
body: { text: "raise bar", uuid: 9012 }
113+
114+
- do:
115+
index:
116+
index: test
117+
id: "3"
118+
body: { text: "raise hands", uuid: 3456 }
119+
120+
- do:
121+
indices.refresh:
122+
index: [ test ]
81123
- do:
82124
search:
83125
index: test
@@ -91,10 +133,8 @@
91133
}
92134
},
93135
"random_score": {
94-
"seed": 10,
95-
"field": "uuid"
136+
"seed": 10
96137
}
97138
}
98-
99139
- length: { hits.hits: 2 }
100140
- match: { hits.total.value: 2 }

0 commit comments

Comments
 (0)