Skip to content

Commit ff4c71b

Browse files
committed
add v3.8.0 to test matrix
Signed-off-by: Ryan Yuan <ryan.yuan@crowdstrike.com>
1 parent 13e6548 commit ff4c71b

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

.github/workflows/test-compatibility.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
- 3.5.0
3131
- 3.6.0
3232
- 3.7.0
33+
- 3.8.0
3334
- latest
3435
steps:
3536
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6

.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: 3.7.0
7+
OPENSEARCH_VERSION: 3.8.0
88
OPENSEARCH_NODE_COUNT: 3
99
SECURE_INTEGRATION: true
1010
CONTAINER_PROVIDER: docker

CHANGELOG.md

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

180180
### Changed
181181

182+
- Add OpenSearch 3.8.0 to the CI compatibility matrix and make it the default integration test version, replacing 3.7.0. 3.7.0 stays in the matrix: it remains supported under the 12-month support policy. No client code change ([#1046](https://github.com/opensearch-project/opensearch-go/pull/1046))
182183
- `cmd/osgen` now honors the OpenAPI `discriminator`, which it previously ignored entirely. Eight schemas in the spec declare one and every branch of all eight resolves to a distinct value, so 146 subtypes whose branch the payload names outright were being decoded by a JSON token-class heuristic instead. The discriminator is how OpenAPI expresses polymorphism, and the spec encodes the hierarchy through `allOf` (a subtype is `allOf[Base, {type: enum[keyword]}]`), so resolving a discriminant walks `allOf` transitively: the constant sits on the narrowing member while the inherited fields come from the base. A union is only discriminated when every branch resolves distinctly, so a partially-understood schema falls back rather than emitting a decoder with an unreachable case. Six emitted unions gain a `Type()`, discriminant constants, and an `UnmarshalJSON` that reads one property and decodes exactly that branch: `CommonMappingProperty` (on `type`, honoring the spec's `x-default` for the implicit object mapping), `CommonAnalysis{Analyzer,CharFilterDefinition,TokenFilterDefinition,TokenizerDefinition,Normalizer}`, plus `ClusterRemoteInfoCluster` on `mode`. A value naming no branch is an error rather than a silent mis-decode, and `ClusterRemoteInfoResp.Entries` becomes `map[string]ClusterRemoteInfoCluster` instead of an untyped map, dropping it from the `json.RawMessage` allowlist. Internal vocabulary follows the spec rather than the decode mechanism: `IsLazy`/`LazyAccessors` conflated "the spec provides no discriminator" with "we never read the discriminator" and become `RequestSelected`, since the aggregation and suggester unions carry `x-supports-typed-keys` and genuinely cannot be discriminated (the branch is chosen by the request and echoed only in the response map key, `avg#my_agg`); `TypeLazyUnion` becomes `TypeAmbiguousWire`, `unionNeedsTryEach` becomes `branchesCollideOnTokenClass`, and the token-class heuristic is retained and documented as the fallback it is
183184
- Union branch accessors on a request-selected union no longer return a zero value with a nil error when the payload cannot be that branch. `AsSum()` against histogram bytes returned an empty `Sum` and no error, indistinguishable from a genuine zero, because `encoding/json` ignores unknown keys and a decode-error check cannot see the mismatch; a required-property probe now rejects it. It still cannot distinguish `avg` from `sum`, which share one wire shape -- that is a property of the protocol, and is documented on the generated type. `UnionBranchError` gains an `Err` field and `Unwrap()`, so the underlying decode failure is reachable through `errors.As`, and `Got` may be `"incompatible payload"`
184185
- Generated doc comments now lead with the identifier they document, as godoc expects. Field and enum-member comments previously carried the spec description verbatim, so godoc rendered "The time taken by different phases of the search." against `PhaseTook` rather than a sentence naming the field. Prefixing cannot be uniform, because the descriptions are not one grammatical shape: 2,545 are noun phrases naming the value, where a copula reads correctly ("PhaseTook is the time taken by ..."), while 297 open with a verb or a conditional, where the same treatment yields "Found is whether the document was found". A copula is inserted only after a leading article; otherwise the description becomes its own sentence after the name. Enum members take the sentence form always, since their descriptions say what selecting the value means rather than naming an attribute of the constant, making the copula wrong for all 43 of them ("NodeRoleDataHot is the node can store hot data"). A promoted sentence is capitalized, since 161 spec descriptions are lowercase fragments. Descriptions already leading with the identifier keep their text, and a `Deprecated` marker is never prefixed, since godoc only honors it at the start of a paragraph

0 commit comments

Comments
 (0)