Skip to content

Commit d85792a

Browse files
committed
bump OpenSearch compatiblity tests to latest
Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
1 parent 7c85f67 commit d85792a

5 files changed

Lines changed: 33 additions & 7 deletions

File tree

.ci/opensearch/Dockerfile.opensearch

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,30 @@ ARG SECURE_INTEGRATION
66
ENV SECURE_INTEGRATION=$SECURE_INTEGRATION
77
ARG OPENSEARCH_INITIAL_ADMIN_PASSWORD
88

9-
# Some opensearch secuirty settings are only present since 2.8.0 and causes older versions to brake if the setting is present
10-
# https://apple.stackexchange.com/a/123408/11374
9+
# Handle plugin dependencies when removing opensearch-security
10+
# OpenSearch 3.x introduced plugin dependencies that prevent direct removal of opensearch-security.
11+
# Plugin dependency evolution:
12+
# 3.0.0: No dependencies - remove opensearch-security directly
13+
# 3.1.0-3.2.0: opensearch-anomaly-detection extends opensearch-security
14+
# 3.3.2: opensearch-skills extends opensearch-ml, which extends opensearch-security
15+
# 3.4.0+: opensearch-flow-framework also extends opensearch-security
16+
# We must remove plugins in dependency order (dependents first, then their dependencies).
17+
ARG OPENSEARCH_VERSION
1118
RUN if [ "$SECURE_INTEGRATION" != "true" ] ; then \
12-
$opensearch_path/bin/opensearch-plugin remove opensearch-security; \
19+
function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }; \
20+
if [ $(version ${OPENSEARCH_VERSION:-0.0.0}) -ge $(version "3.4.0") ] || [ "$OPENSEARCH_VERSION" = "latest" ]; then \
21+
$opensearch_path/bin/opensearch-plugin remove opensearch-flow-framework; \
22+
$opensearch_path/bin/opensearch-plugin remove opensearch-skills; \
23+
$opensearch_path/bin/opensearch-plugin remove opensearch-ml; \
24+
$opensearch_path/bin/opensearch-plugin remove opensearch-anomaly-detection; \
25+
elif [ $(version ${OPENSEARCH_VERSION:-0.0.0}) -ge $(version "3.3.2") ]; then \
26+
$opensearch_path/bin/opensearch-plugin remove opensearch-skills; \
27+
$opensearch_path/bin/opensearch-plugin remove opensearch-ml; \
28+
$opensearch_path/bin/opensearch-plugin remove opensearch-anomaly-detection; \
29+
elif [ $(version ${OPENSEARCH_VERSION:-0.0.0}) -ge $(version "3.1.0") ]; then \
30+
$opensearch_path/bin/opensearch-plugin remove opensearch-anomaly-detection; \
31+
fi; \
32+
$opensearch_path/bin/opensearch-plugin remove opensearch-security; \
1333
else \
1434
$opensearch_path/opensearch-onetime-setup.sh; \
1535
echo "plugins.security.nodes_dn_dynamic_config_enabled: true" | tee -a $opensearch_path/config/opensearch.yml > /dev/null; \
@@ -24,4 +44,4 @@ RUN if [ "$SECURE_INTEGRATION" != "true" ] ; then \
2444
HEALTHCHECK --start-period=20s --interval=30s \
2545
CMD curl -sf --retry 5 --max-time 5 --retry-delay 5 --retry-max-time 30 --retry-all-errors \
2646
$(if $SECURE_INTEGRATION; then echo "--cert config/kirk.pem --key config/kirk-key.pem -k https://"; fi)"localhost:9200" \
27-
|| bash -c 'kill -s 15 -1 && (sleep 10; kill -s 9 -1)'
47+
|| bash -c 'kill -s 15 -1 && (sleep 10; kill -s 9 -1)'

.github/workflows/test-compatibility.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,13 @@ jobs:
3030
- { opensearch_version: 2.16.0 }
3131
- { opensearch_version: 2.17.1 }
3232
- { opensearch_version: 2.18.0 }
33-
- { opensearch_version: 2.19.2 }
33+
- { opensearch_version: 2.19.4 }
3434
- { opensearch_version: 3.0.0 }
35+
- { opensearch_version: 3.1.0 }
36+
- { opensearch_version: 3.2.0 }
37+
- { opensearch_version: 3.3.2 }
38+
- { opensearch_version: 3.4.0 }
39+
- { opensearch_version: latest }
3540
steps:
3641
- uses: actions/checkout@v6
3742

.github/workflows/test-integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on: [push, pull_request]
44

55
env:
66
GITHUB_ACTIONS: true
7-
OPENSEARCH_VERSION: 2.19.2
7+
OPENSEARCH_VERSION: 2.19.4
88

99
jobs:
1010
test:

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
77
### Added
88

99
### Changed
10+
- Test against Opensearch 2.19.4, 3.1, 3.3, and 3.4 ([#782](https://github.com/opensearch-project/opensearch-go/pull/782))
1011

1112
### Deprecated
1213

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/opensearch-project/opensearch-go/v4
22

3-
go 1.24
3+
go 1.24.0
44

55
require (
66
github.com/aws/aws-sdk-go v1.55.8

0 commit comments

Comments
 (0)