Upgrade to Elasticsearch 8.3.1.

Original Pull Request #2212
Closes #2210
This commit is contained in:
Peter-Josef Meisch 2022-07-06 22:21:47 +02:00 committed by GitHub
parent 094e79d601
commit e0acc5a2f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 7 deletions

View File

@ -21,7 +21,7 @@
<!-- version of the RestHighLevelClient --> <!-- version of the RestHighLevelClient -->
<elasticsearch-rhlc>7.17.4</elasticsearch-rhlc> <elasticsearch-rhlc>7.17.4</elasticsearch-rhlc>
<!-- version of the new ElasticsearchClient --> <!-- version of the new ElasticsearchClient -->
<elasticsearch-java>8.2.3</elasticsearch-java> <elasticsearch-java>8.3.1</elasticsearch-java>
<log4j>2.17.2</log4j> <log4j>2.17.2</log4j>
<netty>4.1.65.Final</netty> <netty>4.1.65.Final</netty>

View File

@ -37,7 +37,7 @@ built and tested.
[cols="^,^,^,^,^",options="header"] [cols="^,^,^,^,^",options="header"]
|=== |===
| Spring Data Release Train | Spring Data Elasticsearch | Elasticsearch | Spring Framework | Spring Boot | Spring Data Release Train | Spring Data Elasticsearch | Elasticsearch | Spring Framework | Spring Boot
| 2022.0 (Turing) | 5.0.x | 8.2.3 | 6.0.x | 3.0.x? | 2022.0 (Turing) | 5.0.x | 8.3.1 | 6.0.x | 3.0.x?
| 2021.2 (Raj) | 4.4.x | 7.17.3 | 5.3.x | 2.7.x | 2021.2 (Raj) | 4.4.x | 7.17.3 | 5.3.x | 2.7.x
| 2021.1 (Q) | 4.3.x | 7.15.2 | 5.3.x | 2.6.x | 2021.1 (Q) | 4.3.x | 7.15.2 | 5.3.x | 2.6.x
| 2021.0 (Pascal) | 4.2.xfootnote:oom[Out of maintenance] | 7.12.0 | 5.3.x | 2.5.x | 2021.0 (Pascal) | 4.2.xfootnote:oom[Out of maintenance] | 7.12.0 | 5.3.x | 2.5.x

View File

@ -122,4 +122,4 @@ your application as Spring Data Elasticsearch does not pull it in automatically
---- ----
==== ====
Make sure to specify the version 7.17.4 explicitly, otherwise maven will resolve to 8.2.3, and this does not exist. Make sure to specify the version 7.17.4 explicitly, otherwise maven will resolve to 8.3.1, and this does not exist.

View File

@ -15,6 +15,7 @@
*/ */
package org.springframework.data.elasticsearch.client.elc; package org.springframework.data.elasticsearch.client.elc;
import static co.elastic.clients.util.ApiTypeHelper.*;
import static org.springframework.data.elasticsearch.client.elc.TypeUtils.*; import static org.springframework.data.elasticsearch.client.elc.TypeUtils.*;
import co.elastic.clients.elasticsearch.ElasticsearchClient; import co.elastic.clients.elasticsearch.ElasticsearchClient;
@ -274,8 +275,11 @@ public class ElasticsearchTemplate extends AbstractElasticsearchTemplate {
@Override @Override
public String getClusterVersion() { public String getClusterVersion() {
return execute(client -> client.info().version().number()); return execute(client -> {
try (var ignored = DANGEROUS_disableRequiredPropertiesCheck(true)) {
return client.info().version().number();
}
});
} }
@Override @Override

View File

@ -15,6 +15,7 @@
*/ */
package org.springframework.data.elasticsearch.client.elc; package org.springframework.data.elasticsearch.client.elc;
import static co.elastic.clients.util.ApiTypeHelper.*;
import static org.springframework.data.elasticsearch.client.elc.TypeUtils.*; import static org.springframework.data.elasticsearch.client.elc.TypeUtils.*;
import co.elastic.clients.elasticsearch._types.Result; import co.elastic.clients.elasticsearch._types.Result;
@ -422,7 +423,11 @@ public class ReactiveElasticsearchTemplate extends AbstractReactiveElasticsearch
@Override @Override
public Mono<String> getClusterVersion() { public Mono<String> getClusterVersion() {
return Mono.from(execute(ReactiveElasticsearchClient::info)).map(infoResponse -> infoResponse.version().number()); return Mono.from(execute((ReactiveElasticsearchClient reactiveElasticsearchClient) -> {
try (var ignored = DANGEROUS_disableRequiredPropertiesCheck(true)) {
return reactiveElasticsearchClient.info();
}
})).map(infoResponse -> infoResponse.version().number());
} }
@Override @Override

View File

@ -15,7 +15,7 @@
# #
# #
sde.testcontainers.image-name=docker.elastic.co/elasticsearch/elasticsearch sde.testcontainers.image-name=docker.elastic.co/elasticsearch/elasticsearch
sde.testcontainers.image-version=8.2.3 sde.testcontainers.image-version=8.3.1
# #
# #
# needed as we do a DELETE /* at the end of the tests, will be required from 8.0 on, produces a warning since 7.13 # needed as we do a DELETE /* at the end of the tests, will be required from 8.0 on, produces a warning since 7.13