Skip to content

Commit

Permalink
Merge pull request #40271 from yrodiere/elasticsearch-8.13
Browse files Browse the repository at this point in the history
Bump Elasticsearch/OpenSearch versions for tests/devservices to 8.13/2.13
  • Loading branch information
gsmet authored Apr 26, 2024
2 parents 7731366 + d1b4071 commit eb7e6a8
Show file tree
Hide file tree
Showing 28 changed files with 39 additions and 29 deletions.
4 changes: 2 additions & 2 deletions build-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@
<volume.access.modifier>:Z</volume.access.modifier>

<!-- Defaults for integration tests -->
<elasticsearch-server.version>8.12.1</elasticsearch-server.version>
<elasticsearch-server.version>8.13.2</elasticsearch-server.version>
<elasticsearch.image>docker.io/elastic/elasticsearch:${elasticsearch-server.version}</elasticsearch.image>
<logstash.image>docker.io/elastic/logstash:${elasticsearch-server.version}</logstash.image>
<kibana.image>docker.io/elastic/kibana:${elasticsearch-server.version}</kibana.image>
<elasticsearch.protocol>http</elasticsearch.protocol>
<opensearch-server.version>2.11.1</opensearch-server.version>
<opensearch-server.version>2.13.0</opensearch-server.version>
<opensearch.image>docker.io/opensearchproject/opensearch:${opensearch-server.version}</opensearch.image>
<opensearch.protocol>http</opensearch.protocol>
<junit-pioneer.version>2.2.0</junit-pioneer.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ as shown below.

[source,properties]
----
quarkus.hibernate-search-orm.elasticsearch.version=opensearch:2.11
quarkus.hibernate-search-orm.elasticsearch.version=opensearch:2.13
----

All other configuration options and APIs are exactly the same as with Elasticsearch.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ as shown below.

[source,properties]
----
quarkus.hibernate-search-standalone.elasticsearch.version=opensearch:2.11
quarkus.hibernate-search-standalone.elasticsearch.version=opensearch:2.13
----

All other configuration options and APIs are exactly the same as with Elasticsearch.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ private GenericContainer<?> createElasticsearchContainer(ElasticsearchDevService
// Disable disk-based shard allocation thresholds:
// in a single-node setup they just don't make sense,
// and lead to problems on large disks with little space left.
// See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/modules-cluster.html#disk-based-shard-allocation
// See https://www.elastic.co/guide/en/elasticsearch/reference/8.13/modules-cluster.html#disk-based-shard-allocation
container.addEnv("cluster.routing.allocation.disk.threshold_enabled", "false");
container.addEnv("ES_JAVA_OPTS", config.javaOpts);
return container;
Expand All @@ -260,6 +260,10 @@ private GenericContainer<?> createOpensearchContainer(ElasticsearchDevServicesBu
// See https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-settings/
container.addEnv("cluster.routing.allocation.disk.threshold_enabled", "false");
container.addEnv("OPENSEARCH_JAVA_OPTS", config.javaOpts);
// OpenSearch 2.12 and later requires an admin password, or it won't start.
// Considering dev services are transient and not intended for production by nature,
// we'll just set some hardcoded password.
container.addEnv("OPENSEARCH_INITIAL_ADMIN_PASSWORD", "NotActua11y$trongPa$$word");
return container;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ quarkus.hibernate-orm."namedpu".database.generation=drop-and-create

# Hibernate Search is inactive for the default PU
quarkus.hibernate-search-orm.active=false
quarkus.hibernate-search-orm.elasticsearch.version=8.12
quarkus.hibernate-search-orm.elasticsearch.version=8.13
quarkus.hibernate-search-orm.elasticsearch.hosts=${elasticsearch.hosts:localhost:9200}
quarkus.hibernate-search-orm.schema-management.strategy=drop-and-create-and-drop

# ... but it's (implicitly) active for a named PU
quarkus.hibernate-search-orm."namedpu".elasticsearch.version=8.12
quarkus.hibernate-search-orm."namedpu".elasticsearch.version=8.13
quarkus.hibernate-search-orm."namedpu".elasticsearch.hosts=${elasticsearch.hosts:localhost:9200}
quarkus.hibernate-search-orm."namedpu".schema-management.strategy=drop-and-create-and-drop
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ quarkus.datasource.jdbc.url=jdbc:h2:mem:default;DB_CLOSE_DELAY=-1
quarkus.hibernate-orm.database.generation=drop-and-create

quarkus.hibernate-search-orm.active=false
quarkus.hibernate-search-orm.elasticsearch.version=8.12
quarkus.hibernate-search-orm.elasticsearch.version=8.13
quarkus.hibernate-search-orm.elasticsearch.hosts=${elasticsearch.hosts:localhost:9200}
quarkus.hibernate-search-orm.schema-management.strategy=drop-and-create-and-drop
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ quarkus.datasource.jdbc.url=jdbc:h2:mem:default;DB_CLOSE_DELAY=-1

quarkus.hibernate-orm.database.generation=drop-and-create

quarkus.hibernate-search-orm.elasticsearch.version=8.12
quarkus.hibernate-search-orm.elasticsearch.version=8.13
quarkus.hibernate-search-orm.elasticsearch.hosts=${elasticsearch.hosts:localhost:9200}
quarkus.hibernate-search-orm.schema-management.strategy=drop-and-create-and-drop
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ quarkus.datasource.jdbc.url=jdbc:h2:mem:default;DB_CLOSE_DELAY=-1

quarkus.hibernate-orm.database.generation=drop-and-create

quarkus.hibernate-search-orm.elasticsearch.version=8.12
quarkus.hibernate-search-orm.elasticsearch.version=8.13
# Simulate an offline Elasticsearch instance by pointing to a non-existing cluster
quarkus.hibernate-search-orm.elasticsearch.hosts=localhost:14800
quarkus.hibernate-search-orm.schema-management.strategy=none
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
quarkus.devservices.enabled=false

quarkus.hibernate-search-standalone.active=false
quarkus.hibernate-search-standalone.elasticsearch.version=8.12
quarkus.hibernate-search-standalone.elasticsearch.version=8.13
quarkus.hibernate-search-standalone.elasticsearch.hosts=${elasticsearch.hosts:localhost:9200}
quarkus.hibernate-search-standalone.schema-management.strategy=drop-and-create-and-drop
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# We already start Elasticsearch with Maven
quarkus.devservices.enabled=false

quarkus.hibernate-search-standalone.elasticsearch.version=8.12
quarkus.hibernate-search-standalone.elasticsearch.version=8.13
quarkus.hibernate-search-standalone.elasticsearch.hosts=${elasticsearch.hosts:localhost:9200}
quarkus.hibernate-search-standalone.schema-management.strategy=drop-and-create-and-drop
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
quarkus.hibernate-search-standalone.elasticsearch.version=8.12
quarkus.hibernate-search-standalone.elasticsearch.version=8.13
# Simulate an offline Elasticsearch instance by pointing to a non-existing cluster
quarkus.hibernate-search-standalone.elasticsearch.hosts=localhost:14800
quarkus.hibernate-search-standalone.schema-management.strategy=none
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/elasticsearch-java-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
<!-- Disable disk-based shard allocation thresholds:
in a single-node setup they just don't make sense,
and lead to problems on large disks with little space left.
See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/modules-cluster.html#disk-based-shard-allocation
See https://www.elastic.co/guide/en/elasticsearch/reference/8.13/modules-cluster.html#disk-based-shard-allocation
-->
<cluster.routing.allocation.disk.threshold_enabled>false</cluster.routing.allocation.disk.threshold_enabled>
<!-- Disable some features that are not needed in our tests and just slow down startup -->
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/elasticsearch-rest-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
<!-- Disable disk-based shard allocation thresholds:
in a single-node setup they just don't make sense,
and lead to problems on large disks with little space left.
See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/modules-cluster.html#disk-based-shard-allocation
See https://www.elastic.co/guide/en/elasticsearch/reference/8.13/modules-cluster.html#disk-based-shard-allocation
-->
<cluster.routing.allocation.disk.threshold_enabled>false</cluster.routing.allocation.disk.threshold_enabled>
<!-- Disable some features that are not needed in our tests and just slow down startup -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@
<!-- Disable disk-based shard allocation thresholds:
in a single-node setup they just don't make sense,
and lead to problems on large disks with little space left.
See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/modules-cluster.html#disk-based-shard-allocation
See https://www.elastic.co/guide/en/elasticsearch/reference/8.13/modules-cluster.html#disk-based-shard-allocation
-->
<cluster.routing.allocation.disk.threshold_enabled>false</cluster.routing.allocation.disk.threshold_enabled>
<!-- Disable some features that are not needed in our tests and just slow down startup -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@
<!-- Disable disk-based shard allocation thresholds:
in a single-node setup they just don't make sense,
and lead to problems on large disks with little space left.
See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/modules-cluster.html#disk-based-shard-allocation
See https://www.elastic.co/guide/en/elasticsearch/reference/8.13/modules-cluster.html#disk-based-shard-allocation
-->
<cluster.routing.allocation.disk.threshold_enabled>false</cluster.routing.allocation.disk.threshold_enabled>
<!-- Disable some features that are not needed in our tests and just slow down startup -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@
<!-- Disable disk-based shard allocation thresholds:
in a single-node setup they just don't make sense,
and lead to problems on large disks with little space left.
See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/modules-cluster.html#disk-based-shard-allocation
See https://www.elastic.co/guide/en/elasticsearch/reference/8.13/modules-cluster.html#disk-based-shard-allocation
-->
<cluster.routing.allocation.disk.threshold_enabled>false</cluster.routing.allocation.disk.threshold_enabled>
<!-- Disable some features that are not needed in our tests and just slow down startup -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public Map<String, String> getConfigOverrides() {
// But here it doesn't matter as we won't send a request to Elasticsearch anyway,
// so we're free to put anything.
// Just make sure to set something consistent with what we have in application.properties.
"quarkus.hibernate-search-orm.elasticsearch.version", "8.12"));
"quarkus.hibernate-search-orm.elasticsearch.version", "8.13"));
return config;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public Map<String, String> getConfigOverrides() {
// But here it doesn't matter as we won't send a request to Elasticsearch anyway,
// so we're free to put anything.
// Just make sure to set something consistent with what we have in application.properties.
"quarkus.hibernate-search-orm.elasticsearch.version", "8.12");
"quarkus.hibernate-search-orm.elasticsearch.version", "8.13");
}

@Override
Expand Down
3 changes: 3 additions & 0 deletions integration-tests/hibernate-search-orm-opensearch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@
-->
<plugins.index_state_management.enabled>false</plugins.index_state_management.enabled>
<OPENSEARCH_JAVA_OPTS>-Xms512m -Xmx512m</OPENSEARCH_JAVA_OPTS>
<!-- OpenSearch 2.12 and later requires an admin password, or it won't start.
Considering this is just tests, we'll just set some hardcoded password. -->
<OPENSEARCH_INITIAL_ADMIN_PASSWORD>NotActua11y$trongPa$$word</OPENSEARCH_INITIAL_ADMIN_PASSWORD>
<!-- Disable disk-based shard allocation thresholds: on large, relatively full disks (>90% used),
it will lead to index creation to get stuck waiting for other nodes to join the cluster,
which will never happen since we only have one node.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ public Map<String, String> getConfigOverrides() {
return Map.of(
"quarkus.elasticsearch.devservices.enabled", "true",
// This needs to be different from the default image, or the test makes no sense.
"quarkus.elasticsearch.devservices.image-name", "docker.io/opensearchproject/opensearch:2.10.0",
"quarkus.elasticsearch.devservices.image-name", "docker.io/opensearchproject/opensearch:2.12.0",
// This needs to match the version used just above,
// so that Hibernate Search itself will assert that we're using a custom version.
"quarkus.hibernate-search-orm.elasticsearch.version", "opensearch:2.10");
"quarkus.hibernate-search-orm.elasticsearch.version", "opensearch:2.12");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public Map<String, String> getConfigOverrides() {
// But here it doesn't matter as we won't send a request to OpenSearch anyway,
// so we're free to put anything.
// Just make sure to set something consistent with what we have in application.properties.
"quarkus.hibernate-search-orm.elasticsearch.version", "opensearch:2.11"));
"quarkus.hibernate-search-orm.elasticsearch.version", "opensearch:2.13"));
return config;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public Map<String, String> getConfigOverrides() {
// But here it doesn't matter as we won't send a request to OpenSearch anyway,
// so we're free to put anything.
// Just make sure to set something consistent with what we have in application.properties.
"quarkus.hibernate-search-orm.elasticsearch.version", "opensearch:2.11");
"quarkus.hibernate-search-orm.elasticsearch.version", "opensearch:2.13");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public Map<String, String> getConfigOverrides() {
// But here it doesn't matter as we won't send a request to Elasticsearch anyway,
// so we're free to put anything.
// Just make sure to set something consistent with what we have in application.properties.
"quarkus.hibernate-search-standalone.elasticsearch.version", "8.12"));
"quarkus.hibernate-search-standalone.elasticsearch.version", "8.13"));
return config;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public Map<String, String> getConfigOverrides() {
// But here it doesn't matter as we won't send a request to Elasticsearch anyway,
// so we're free to put anything.
// Just make sure to set something consistent with what we have in application.properties.
"quarkus.hibernate-search-standalone.elasticsearch.version", "8.12");
"quarkus.hibernate-search-standalone.elasticsearch.version", "8.13");
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,9 @@
-->
<plugins.index_state_management.enabled>false</plugins.index_state_management.enabled>
<OPENSEARCH_JAVA_OPTS>-Xms512m -Xmx512m</OPENSEARCH_JAVA_OPTS>
<!-- OpenSearch 2.12 and later requires an admin password, or it won't start.
Considering this is just tests, we'll just set some hardcoded password. -->
<OPENSEARCH_INITIAL_ADMIN_PASSWORD>NotActua11y$trongPa$$word</OPENSEARCH_INITIAL_ADMIN_PASSWORD>
<!-- Disable disk-based shard allocation thresholds: on large, relatively full disks (>90% used),
it will lead to index creation to get stuck waiting for other nodes to join the cluster,
which will never happen since we only have one node.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public Map<String, String> getConfigOverrides() {
// But here it doesn't matter as we won't send a request to OpenSearch anyway,
// so we're free to put anything.
// Just make sure to set something consistent with what we have in application.properties.
"quarkus.hibernate-search-standalone.elasticsearch.version", "opensearch:2.9"));
"quarkus.hibernate-search-standalone.elasticsearch.version", "opensearch:2.13"));
return config;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public Map<String, String> getConfigOverrides() {
// But here it doesn't matter as we won't send a request to OpenSearch anyway,
// so we're free to put anything.
// Just make sure to set something consistent with what we have in application.properties.
"quarkus.hibernate-search-standalone.elasticsearch.version", "opensearch:2.9");
"quarkus.hibernate-search-standalone.elasticsearch.version", "opensearch:2.13");
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/logging-gelf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
<!-- Disable disk-based shard allocation thresholds:
in a single-node setup they just don't make sense,
and lead to problems on large disks with little space left.
See https://www.elastic.co/guide/en/elasticsearch/reference/8.12/modules-cluster.html#disk-based-shard-allocation
See https://www.elastic.co/guide/en/elasticsearch/reference/8.13/modules-cluster.html#disk-based-shard-allocation
-->
<cluster.routing.allocation.disk.threshold_enabled>false</cluster.routing.allocation.disk.threshold_enabled>
<!-- Disable some features that are not needed in our tests and just slow down startup -->
Expand Down

0 comments on commit eb7e6a8

Please sign in to comment.