Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,12 @@ jobs:
service:
# Latest OpenSearch and MongoDB
- search-server-distribution: "OpenSearch"
search-server-version: "2.19.3"
search-server-version: "3.5.0"
mongodb-version: "8.0"

# Latest OpenSearch 2.19 version
- search-server-distribution: "OpenSearch"
search-server-version: "2.19.4"
mongodb-version: "8.0"

# Data Node
Expand Down
18 changes: 18 additions & 0 deletions graylog-storage-opensearch2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,24 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@
import java.util.stream.Stream;

import static org.graylog2.indexer.Constants.COMPOSABLE_INDEX_TEMPLATES_FEATURE;
import static org.graylog2.shared.utilities.StringUtils.f;
import static org.junit.jupiter.api.Assertions.fail;

public class ClientOS implements Client {
private static final Logger LOG = LoggerFactory.getLogger(ClientOS.class);
Expand Down Expand Up @@ -192,6 +194,24 @@ public void cleanUp() {
deleteIndices(existingIndices());
deleteAllTemplates();
refreshNode();
try {
opensearchClient.syncWithoutErrorMapping().cluster().health(req -> req.waitForStatus(HealthStatus.Green));
} catch (IOException e) {
try {
final var catShards = opensearchClient.syncWithoutErrorMapping().cat().shards();
final String table = catShards.valueBody().stream()
.filter(r -> "UNASSIGNED".equalsIgnoreCase(r.state()))
.map(r -> f("%-40s %-8s %-12s %-12s %-20s %s",
r.index(), r.shard(), r.prirep(), r.state(), r.unassignedReason(), r.unassignedDetails()))
.collect(Collectors.joining("\n",
f("%-40s %-8s %-12s %-12s %-20s %s\n",
"index", "shard", "prirep", "state", "reason", "details"),
""));
fail("Unassigned shards after clean up of OpenSearch:\n" + table);
} catch (Exception catException) {
LOG.error("OpenSearch test server clean up failed and could not retrieve _cat/shards", catException);
}
}
}

private String[] existingIndices() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ protected void afterContainerCreated() {
if (version().satisfies(SearchVersion.Distribution.OPENSEARCH, "2.9.0")) {
fixNumberOfReplicaForMlPlugin();
}
if (version().satisfies(SearchVersion.Distribution.OPENSEARCH, "2.19.3")) {
if (version().satisfies(SearchVersion.Distribution.OPENSEARCH, ">=2.19.0")) {
fixDefaultNumberOfReplicasForIsmConfigs();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*/
package org.graylog.storage.opensearch3.testing;

import org.graylog.storage.opensearch3.testing.OpenSearchInstanceBuilder;
import org.graylog.testing.completebackend.SearchServerBuilder;
import org.graylog.testing.completebackend.SearchServerInterfaceProvider;
import org.graylog2.storage.SearchVersion;
Expand All @@ -26,7 +25,7 @@
public class OpenSearchInstanceProvider implements SearchServerInterfaceProvider {
@Override
public SearchServerBuilder getBuilderFor(final SearchVersion version) {
if(version.satisfies(OPENSEARCH, "^2.0.0")) {
if (version.satisfies(OPENSEARCH, ">=2.0.0")) {
return new OpenSearchInstanceBuilder(version);
}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import org.graylog2.storage.SearchVersion;

public class SearchServer {
private static final String DEFAULT_VERSION_STRING = "2.19.3";
private static final String DEFAULT_VERSION_STRING = "3.5.0";

public static final SearchVersion DEFAULT_VERSION = SearchVersion.create(SearchVersion.Distribution.OPENSEARCH, Version.parse(DEFAULT_VERSION_STRING));

Expand Down
28 changes: 14 additions & 14 deletions graylog2-web-interface/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7914,15 +7914,15 @@ escodegen@^2.1.0:
eslint-config-prettier "10.1.5"
eslint-import-resolver-webpack "0.13.10"
eslint-plugin-compat "7.0.1"
eslint-plugin-graylog "file:packages/eslint-plugin-graylog"
eslint-plugin-graylog "file:../../../../../Library/Caches/Yarn/v6/npm-eslint-config-graylog-1.3.0-05b0d1bf-a4f0-46cc-b1b6-3661419bf7ee-1774872557327/node_modules/eslint-plugin-graylog"
eslint-plugin-import "2.32.0"
eslint-plugin-jest "29.15.0"
eslint-plugin-jest-dom "5.5.0"
eslint-plugin-jest-formatting "3.1.0"
eslint-plugin-jsx-a11y "6.10.2"
eslint-plugin-react "7.37.5"
eslint-plugin-react-hooks "7.0.1"
eslint-plugin-testing-library "7.16.0"
eslint-plugin-testing-library "7.16.1"
typescript-eslint "^8.44.1"

eslint-config-prettier@10.1.5:
Expand Down Expand Up @@ -8079,10 +8079,10 @@ eslint-plugin-react@7.37.5:
string.prototype.matchall "^4.0.12"
string.prototype.repeat "^1.0.0"

eslint-plugin-testing-library@7.16.0:
version "7.16.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-testing-library/-/eslint-plugin-testing-library-7.16.0.tgz#ac8dd5e4069e9264d997079b4cb5f45e79d2b8a7"
integrity sha512-lHZI6/Olb2oZqxd1+s1nOLCtL2PXKrc1ERz6oDbUKS0xZAMFH3Fy6wJo75z3pXTop3BV6+loPi2MSjIYt3vpAg==
eslint-plugin-testing-library@7.16.1:
version "7.16.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-testing-library/-/eslint-plugin-testing-library-7.16.1.tgz#9378976d98aeaa6a7dd724a46d4e54f7cbbc90b0"
integrity sha512-/pCFzJuro/wOq6FCp43DwS3fpCr0hM2gByJAxi8bPdL7DXKdmH3p3BEpVKQkneUxT6T2XbUXG4J+c5GSAm12lA==
dependencies:
"@typescript-eslint/scope-manager" "^8.56.0"
"@typescript-eslint/utils" "^8.56.0"
Expand Down Expand Up @@ -9527,14 +9527,14 @@ graphemer@^1.4.0:
"@reduxjs/toolkit" "^2.5.1"
"@tanstack/react-query" "5.90.21"
"@types/react" "18.3.13"
babel-preset-graylog "file:packages/babel-preset-graylog"
eslint-config-graylog "file:packages/eslint-config-graylog"
babel-preset-graylog "file:../../../../../Library/Caches/Yarn/v6/npm-graylog-web-plugin-7.1.0-SNAPSHOT-056fe95c-4c84-4801-9d98-9852434f8c66-1774872557257/node_modules/babel-preset-graylog"
eslint-config-graylog "file:../../../../../Library/Caches/Yarn/v6/npm-graylog-web-plugin-7.1.0-SNAPSHOT-056fe95c-4c84-4801-9d98-9852434f8c66-1774872557257/node_modules/eslint-config-graylog"
formik "2.4.9"
history "^5.3.0"
html-webpack-plugin "^5.5.0"
jest-preset-graylog "file:packages/jest-preset-graylog"
jest-preset-graylog "file:../../../../../Library/Caches/Yarn/v6/npm-graylog-web-plugin-7.1.0-SNAPSHOT-056fe95c-4c84-4801-9d98-9852434f8c66-1774872557257/node_modules/jest-preset-graylog"
moment "2.30.1"
moment-timezone "0.6.0"
moment-timezone "0.6.1"
react "18.3.1"
react-dom "18.2.0"
react-redux "^9.2.0"
Expand Down Expand Up @@ -12152,10 +12152,10 @@ moment-precise-range-plugin@^1.3.0:
resolved "https://registry.yarnpkg.com/moment-precise-range-plugin/-/moment-precise-range-plugin-1.3.0.tgz#60ac075fdfd14689f6d102af751d171a80b4ab60"
integrity sha1-YKwHX9/RRon20QKvdR0XGoC0q2A=

moment-timezone@0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.6.0.tgz#c5a6519171f31a64739ea75d33f5c136c08ff608"
integrity sha512-ldA5lRNm3iJCWZcBCab4pnNL3HSZYXVb/3TYr75/1WCTWYuTqYUb5f/S384pncYjJ88lbO8Z4uPDvmoluHJc8Q==
moment-timezone@0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/moment-timezone/-/moment-timezone-0.6.1.tgz#c324a71a8285583eb679ced4ba3dcfa53fdce500"
integrity sha512-1B9lmAhB9D9/sHaPC1N7wLFEVUoFldxOpOO96lOD1PvJ43vCd0ozDPbu0FEL3++VvawOlDkq8YD373tJmP5JHw==
dependencies:
moment "^2.29.4"

Expand Down
Loading