Skip to content

Commit 05426e7

Browse files
committed
ci: trim compatibility matrix to currently-patched OpenSearch (opensearch-project#856)
Drop OpenSearch lines the project no longer patches (1.3.x-2.18.x) from the v5 compatibility matrix, leaving the supported set at 2.19.x and 3.x per the 12-month support policy agreed in opensearch-project#856. Removes the dead <2.12 password fallback and the <=2.17.x node-join race workaround, and flattens the matrix to a plain version list now that every supported line runs as a 3-node cluster. Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
1 parent b23f9db commit 05426e7

4 files changed

Lines changed: 41 additions & 54 deletions

File tree

.github/workflows/test-compatibility.yml

Lines changed: 23 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -8,49 +8,28 @@ env:
88
jobs:
99
integ-test-compat:
1010
runs-on: ubuntu-latest
11-
continue-on-error: ${{ matrix.entry.opensearch_version == 'latest' }}
11+
continue-on-error: ${{ matrix.opensearch_version == 'latest' }}
1212
strategy:
1313
fail-fast: false
14-
# OpenSearch <=2.17.x carries a node-join/node-left race condition
15-
# (fixed in 2.18 via opensearch-project/OpenSearch#15521, backported
16-
# via opensearch-project/OpenSearch#16118) that leaves a node in
17-
# cluster state but disconnected at the transport layer, breaking
18-
# NodesStats RPC fan-out indefinitely and hanging /_cat/nodes-based
19-
# readiness gates. Single-node clusters cannot hit the race, so
20-
# affected versions run with OPENSEARCH_NODE_COUNT=1 below.
14+
# The supported set tracks the OpenSearch releases still receiving patches
15+
# within the last 12 months at each opensearch-go release: every release of
16+
# the current major plus the latest release of the previous major. Today
17+
# that is 2.19.x and all of 3.x. See opensearch-project/opensearch-go#856.
18+
# Re-evaluate this list at each release. All supported lines run as 3-node
19+
# clusters.
2120
matrix:
2221
secured: ["true", "false"]
23-
entry:
24-
- { opensearch_version: 1.3.20, node_count: 1 }
25-
- { opensearch_version: 2.0.1, node_count: 1 }
26-
- { opensearch_version: 2.1.0, node_count: 1 }
27-
- { opensearch_version: 2.2.1, node_count: 1 }
28-
- { opensearch_version: 2.3.0, node_count: 1 }
29-
- { opensearch_version: 2.4.1, node_count: 1 }
30-
- { opensearch_version: 2.5.0, node_count: 1 }
31-
- { opensearch_version: 2.6.0, node_count: 1 }
32-
- { opensearch_version: 2.7.0, node_count: 1 }
33-
- { opensearch_version: 2.8.0, node_count: 1 }
34-
- { opensearch_version: 2.9.0, node_count: 1 }
35-
- { opensearch_version: 2.10.0, node_count: 1 }
36-
- { opensearch_version: 2.11.1, node_count: 1 }
37-
- { opensearch_version: 2.12.0, node_count: 1 }
38-
- { opensearch_version: 2.13.0, node_count: 1 }
39-
- { opensearch_version: 2.14.0, node_count: 1 }
40-
- { opensearch_version: 2.15.0, node_count: 1 }
41-
- { opensearch_version: 2.16.0, node_count: 1 }
42-
- { opensearch_version: 2.17.1, node_count: 1 }
43-
- { opensearch_version: 2.18.0, node_count: 3 }
44-
- { opensearch_version: 2.19.5, node_count: 3 }
45-
- { opensearch_version: 3.0.0, node_count: 3 }
46-
- { opensearch_version: 3.1.0, node_count: 3 }
47-
- { opensearch_version: 3.2.0, node_count: 3 }
48-
- { opensearch_version: 3.3.2, node_count: 3 }
49-
- { opensearch_version: 3.4.0, node_count: 3 }
50-
- { opensearch_version: 3.5.0, node_count: 3 }
51-
- { opensearch_version: 3.6.0, node_count: 3 }
52-
- { opensearch_version: 3.7.0, node_count: 3 }
53-
- { opensearch_version: latest, node_count: 3 }
22+
opensearch_version:
23+
- 2.19.5
24+
- 3.0.0
25+
- 3.1.0
26+
- 3.2.0
27+
- 3.3.2
28+
- 3.4.0
29+
- 3.5.0
30+
- 3.6.0
31+
- 3.7.0
32+
- latest
5433
steps:
5534
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
5635

@@ -68,19 +47,13 @@ jobs:
6847
6948
- name: Launch OpenSearch cluster
7049
run: |
71-
export OPENSEARCH_VERSION=${{ matrix.entry.opensearch_version }}
50+
export OPENSEARCH_VERSION=${{ matrix.opensearch_version }}
7251
export SECURE_INTEGRATION=${{ matrix.secured }}
73-
export OPENSEARCH_NODE_COUNT=${{ matrix.entry.node_count }}
52+
export OPENSEARCH_NODE_COUNT=3
7453
make cluster.clean cluster.build cluster.start
7554
if [ "${SECURE_INTEGRATION}" = "true" ]; then
7655
CURL_URL="https://localhost:9200"
77-
# Password changed in OpenSearch 2.12.0
78-
function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }
79-
if [ $(version ${OPENSEARCH_VERSION}) -ge $(version "2.12.0") ] || [ "${OPENSEARCH_VERSION}" = "latest" ]; then
80-
CURL_OPTS="-sfku admin:myStrongPassword123!"
81-
else
82-
CURL_OPTS="-sfku admin:admin"
83-
fi
56+
CURL_OPTS="-sfku admin:myStrongPassword123!"
8457
else
8558
CURL_URL="http://localhost:9200"
8659
CURL_OPTS="-sf"
@@ -114,9 +87,9 @@ jobs:
11487
11588
- name: Integration test
11689
run: |
117-
export OPENSEARCH_VERSION=${{ matrix.entry.opensearch_version }}
90+
export OPENSEARCH_VERSION=${{ matrix.opensearch_version }}
11891
export SECURE_INTEGRATION=${{ matrix.secured }}
119-
export OPENSEARCH_NODE_COUNT=${{ matrix.entry.node_count }}
92+
export OPENSEARCH_NODE_COUNT=3
12093
make cluster.get-cert test-integ-core test-integ-plugins race=true
12194
12295
- name: Stop the OpenSearch cluster

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
160160

161161
### Changed
162162

163+
- Trim the CI compatibility matrix to the currently-patched OpenSearch set (2.19.x and 3.x) per the 12-month support policy; older lines (1.3.x - 2.18.x) are no longer part of the tested matrix and the 4.x client remains their supported path. No client code change ([#856](https://github.com/opensearch-project/opensearch-go/issues/856))
163164
- **BREAKING**: Module path is now `github.com/opensearch-project/opensearch-go/v5`. Update import paths from `/v4` to `/v5`; the in-source `opensearchapi.X` package qualifier is unchanged
164165
- **BREAKING**: The code-generated API package is now the canonical `opensearchapi/`, replacing the hand-written v4 package (formerly previewed at `v5preview/opensearchapi/`). Req/Resp/Params types are fully typed and generated from the OpenAPI spec. See [`opensearchapi/MIGRATING.md`](opensearchapi/MIGRATING.md) for the field-level delta (`DocumentID` -> `ID`, optional `Params` becoming `*Params`, shared parameters moving into embedded `TimeoutParams`/`DebugParams`, `BulkResp.Items` becoming `[]BulkItem`) ([#650](https://github.com/opensearch-project/opensearch-go/issues/650))
165166
- **BREAKING**: The default Router is now on by default. `opensearchapi.NewClient`/`NewDefaultClient`, `opensearch.NewClient`, and `opensearchtransport.New` inject `opensearchtransport.NewDefaultRouter` (and enable on-start discovery) unless `OPENSEARCH_GO_ROUTER=false`. In v4 the router was opt-in via `OPENSEARCH_GO_ROUTER=true` ([#816](https://github.com/opensearch-project/opensearch-go/issues/816))
@@ -209,6 +210,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
209210
- Mark `opensearch.ToPointer` as deprecated; it remains fully functional but will be removed in a future major version. Once the module's go directive moves to 1.26, callers can drop the helper entirely in favor of native `new(value)` literal syntax (e.g. `new(false)`)
210211

211212
### Removed
213+
212214
- Remove backport.yml and dependabot_pr.yml as we are not using backport app anymore
213215
- Stop emitting `opensearchapi.Client` sub-client fields that have no operations routed to them. `cmd/osgen` now emits a sub-client only when at least one operation targets it, dropping the previously-empty `Script`, `ComponentTemplate`, `IndexTemplate`, `Template`, and `DataStream` fields. Index-template and data-stream operations are reached through `client.Indices.*` (e.g. `client.Indices.PutIndexTemplate`, `client.Indices.CreateDataStream`); stored-script operations remain top-level on `Client`
214216

COMPATIBILITY.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,20 @@
33

44
## Compatibility with OpenSearch
55

6-
The below matrix shows the compatibility of the [`opensearch-go`](https://pkg.go.dev/github.com/opensearch-project/opensearch-go) with versions of [`OpenSearch`](https://opensearch.org/downloads.html#opensearch).
6+
The below matrix shows the compatibility of the [`opensearch-go`](https://pkg.go.dev/github.com/opensearch-project/opensearch-go) with versions of [`OpenSearch`](https://opensearch.org/downloads.html#opensearch). Version ranges are inclusive of both endpoints.
77

88
| Client Version | OpenSearch Version |
99
| -------------- | ------------------ |
1010
| 1.x.0 | 1.x |
11-
| 2.x.0 | 1.3.13-2.11.0 |
12-
| 3.x.0 | 1.3.13-2.12.0 |
13-
| 4.x.0 | 1.3.20-3.0.0 |
11+
| 2.x.0 | 1.3.13 - 2.11.0 |
12+
| 3.x.0 | 1.3.13 - 2.12.0 |
13+
| 4.x.0 | 1.3.20 - 2.x |
14+
| 4.6.1 | 1.3.20 - 3.6.0 |
15+
| 5.x.0 | 2.19 - 3.x |
16+
17+
The 4.x client remains the supported path for OpenSearch lines that the OpenSearch project no longer patches (1.3.x through 2.18.x).
18+
19+
Starting with 5.x, the officially supported (CI-tested) set tracks the OpenSearch releases still receiving patches within the last 12 months at each `opensearch-go` release: every release of the current major plus the latest release of the previous major. Today that is 2.19.x and all of 3.x. This set is re-evaluated at each release. The client may still function against older servers, but those lines are not part of the tested matrix; 4.x remains the documented fallback for them.
1420

1521
## Upgrading
1622

UPGRADING.md

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

3131
## Upgrading to >= 5.0.0
3232

33+
### Supported OpenSearch versions
34+
35+
The 5.x client is supported (and CI-tested) against the OpenSearch releases still receiving patches within the last 12 months at each `opensearch-go` release: every release of the current major plus the latest release of the previous major. Today that is OpenSearch 2.19.x and all of 3.x. This set is re-evaluated at each release.
36+
37+
If you run an OpenSearch line the project no longer patches (1.3.x through 2.18.x), stay on the 4.x client, which continues to support those versions. The 5.x client may still function against older servers, but those lines are not part of the tested matrix. See [`COMPATIBILITY.md`](COMPATIBILITY.md) for the full matrix.
38+
3339
### Partial Failure Errors (Config.Errors)
3440

3541
Version 5.0.0 introduces typed partial-failure errors and a per-category bitmask that controls which categories surface as Go errors. OpenSearch returns HTTP 200 for many operations that partially succeed (bulk item failures, shard failures on search, replica failures on writes). The new model turns those partial failures into typed errors that callers can dispatch on; idiomatic partial error handling is shown below.

0 commit comments

Comments
 (0)