Summary
The v5 client (v5preview/opensearchapi) supports only OpenSearch releases that are currently receiving patches at the time of each opensearch-go release. Users on older releases stay on the v4 client.
As of today (per https://opensearch.org/releases/) that means:
- v4 (current GA): supports OpenSearch 1.3.20+, 2.x, 3.x. No change.
- >=v5: supports 2.19.x and 3.x. Re-evaluated at every tagged release of
opensearch-go.
Each opensearch-go release pins its supported set to the OpenSearch project's then-current "still patched" lines. When OpenSearch drops a line from patches, the next opensearch-go release drops it from CI, the spec floor, and the docs.
Why a moving window instead of a fixed floor
Rather than re-pin to a new fixed number that will go stale the same way, tie the supported set to whatever OpenSearch itself is patching.
Concrete benefits:
- CI cost and signal: today's matrix spins up ~70 workers across versions that the project itself no longer ships fixes for. Most of the failures we chase on those legacy lanes are server-side bugs that will never be patched. Trimming to currently-patched lines gives faster, cleaner signal on bugs we can actually fix.
- Spec / codegen alignment: as we add
x-version-added / x-version-deprecated annotations to the spec and generated code, per-minor-version test coverage becomes redundant with the annotations. We test the supported set; the annotations document the rest.
- Predictable maintenance: contributors know exactly which versions a PR has to work on (the currently-patched set), instead of inheriting an open-ended historical compatibility burden.
- No surprises for users: anyone on a release that OpenSearch itself has stopped patching is already off the supported path;
opensearch-go just stops paying CI cost to pretend otherwise. Those users have v4 as the documented fallback until they upgrade.
Test-suite signal
The data motivating this change is the test-skip volume. Numbers are from v5preview/opensearchapi/ on this branch.
| Metric |
Count |
*_integ_gen_test.go files in v5preview |
480 |
testutil.SkipIfVersion(...) call sites |
214 |
Direct t.Skip(...) call sites (fixture / known-bug) |
374 |
Distribution of SkipIfVersion(t, c, "<", "X.Y", ...) thresholds:
| Floor |
Sites |
Status under proposal |
| 1.1 - 2.18 |
174 |
Deleted (unconditional) |
| 2.19 |
20 |
Kept (>= 2.19 is current) |
| 3.0 - 3.4 |
37 |
Kept |
| 2.18 exact |
3 |
Deleted |
| Total |
214 |
|
Plugin areas (ML, flow_framework, search_relevance, LTR, security, ...) hold most of the version churn. Tightening the supported set collapses most of that variance.
Proposal
- Define the v5 supported set as the OpenSearch releases currently receiving patches within the last 12mo of each
opensearch-go release (e.g. test against any OpenSearch version released in the last 12mo).
- Update
COMPATIBILITY.md and UPGRADING.md:
- v4: OpenSearch 1.3.20 - 3.x (unchanged).
- v5: tracks the current OpenSearch supported releases. Today: 2.19.x and 3.x.
- Trim CI to the current supported set. The next release re-evaluates the matrix.
- Delete
SkipIfVersion sites that gate on versions outside the supported set; let those tests run unconditionally.
- Re-evaluate the "response struct does not match" skips against the supported set; fix at the codegen / spec level instead of skipping.
- Lean on
x-version-added / x-version-deprecated annotations in the spec and generated code to document version provenance, instead of using CI matrix breadth as a substitute.
- Update generator templates to stop emitting
SkipIfVersion(... < <below-current> ...) for new endpoints.
Non-goals
- No change to the v4 client. Users on lines OpenSearch no longer patches stay on v4.
Migration story for users
- "I'm on OpenSearch 1.3 / 2.0 / 2.7 / ... (a line OpenSearch no longer patches)" -> use opensearch-go v4.
- "I'm on OpenSearch 2.19 or 3.x" -> v5 is the supported path.
Summary
The v5 client (
v5preview/opensearchapi) supports only OpenSearch releases that are currently receiving patches at the time of eachopensearch-gorelease. Users on older releases stay on the v4 client.As of today (per https://opensearch.org/releases/) that means:
opensearch-go.Each
opensearch-gorelease pins its supported set to the OpenSearch project's then-current "still patched" lines. When OpenSearch drops a line from patches, the nextopensearch-gorelease drops it from CI, the spec floor, and the docs.Why a moving window instead of a fixed floor
Rather than re-pin to a new fixed number that will go stale the same way, tie the supported set to whatever OpenSearch itself is patching.
Concrete benefits:
x-version-added/x-version-deprecatedannotations to the spec and generated code, per-minor-version test coverage becomes redundant with the annotations. We test the supported set; the annotations document the rest.opensearch-gojust stops paying CI cost to pretend otherwise. Those users have v4 as the documented fallback until they upgrade.Test-suite signal
The data motivating this change is the test-skip volume. Numbers are from
v5preview/opensearchapi/on this branch.*_integ_gen_test.gofiles in v5previewtestutil.SkipIfVersion(...)call sitest.Skip(...)call sites (fixture / known-bug)Distribution of
SkipIfVersion(t, c, "<", "X.Y", ...)thresholds:Plugin areas (ML, flow_framework, search_relevance, LTR, security, ...) hold most of the version churn. Tightening the supported set collapses most of that variance.
Proposal
opensearch-gorelease (e.g. test against any OpenSearch version released in the last 12mo).COMPATIBILITY.mdandUPGRADING.md:SkipIfVersionsites that gate on versions outside the supported set; let those tests run unconditionally.x-version-added/x-version-deprecatedannotations in the spec and generated code to document version provenance, instead of using CI matrix breadth as a substitute.SkipIfVersion(... < <below-current> ...)for new endpoints.Non-goals
Migration story for users