Skip to content

Commit 83bc582

Browse files
sean-VijayanB
authored andcommitted
Add CI testing against OpenSearch 3.6.0
Signed-off-by: Sean Chittenden <sean.chittenden@crowdstrike.com>
1 parent 9273eff commit 83bc582

3 files changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/test-compatibility.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ jobs:
3838
- { opensearch_version: 3.3.2 }
3939
- { opensearch_version: 3.4.0 }
4040
- { opensearch_version: 3.5.0 }
41+
- { opensearch_version: 3.6.0 }
4142
- { opensearch_version: latest }
4243
steps:
4344
- uses: actions/checkout@v6

CHANGELOG.md

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

77
### Added
88

9+
- Add `primary_terms_map` and `split_shards_metadata` fields to ClusterState index metadata for OpenSearch >=3.6.0 compatibility
910
- Add `InsecureSkipVerify` config option to disable TLS certificate verification without constructing a custom `http.Transport`, preserving `DefaultTransport` connection pooling, HTTP/2, and timeout defaults ([#786](https://github.com/opensearch-project/opensearch-go/issues/786))
1011
- Add `DisableResponseBuffering` config option to skip eager `io.ReadAll` buffering of response bodies in `Perform()`, reducing per-request allocations and TTFB for proxy and streaming use cases ([#786](https://github.com/opensearch-project/opensearch-go/issues/786))
1112
- Add per-attempt `RequestTimeout` to bound individual HTTP round-trips, preventing indefinite hangs on stalled connections ([#786](https://github.com/opensearch-project/opensearch-go/issues/786))
@@ -110,6 +111,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
110111

111112
### Changed
112113

114+
- Test against Opensearch 3.6.0 ([#817](https://github.com/opensearch-project/opensearch-go/pull/817))
113115
- Consolidate test utilities into two canonical packages: opensearchtransport/testutil (env helpers, polling, version comparison) and opensearchapi/testutil (client-dependent helpers, test suite, JSON comparison)
114116
- Rename `singleConnectionPool` to `singleServerPool` and `statusConnectionPool` to `multiServerPool` for clarity ([#786](https://github.com/opensearch-project/opensearch-go/pull/786))
115117
- Refactor Client struct to use embedded mutex pattern for improved thread safety ([#775](https://github.com/opensearch-project/opensearch-go/pull/775))

opensearchapi/api_cluster-state.go

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,32 @@ type ClusterStateMetaDataIndex struct {
180180
} `json:"rollover_info"`
181181
System bool `json:"system"`
182182
IngestionStatus json.RawMessage `json:"ingestion_status"` // Available in OpenSearch 3.3.0+
183+
184+
// Added in OpenSearch 3.6.0 (opensearch-project/OpenSearch@ed2e1006,
185+
// server/src/main/java/org/opensearch/cluster/metadata/IndexMetadata.java:1057-1059).
186+
PrimaryTermsMap map[string]int `json:"primary_terms_map,omitempty"`
187+
SplitShardsMetadata *ClusterStateSplitShardsMeta `json:"split_shards_metadata,omitempty"`
188+
}
189+
190+
// ClusterStateSplitShardsMeta contains shard-split metadata for an index.
191+
// Added in OpenSearch 3.6.0 (opensearch-project/OpenSearch@ed2e1006,
192+
// server/src/main/java/org/opensearch/cluster/metadata/SplitShardsMetadata.java).
193+
type ClusterStateSplitShardsMeta struct {
194+
NumOfRootShards int `json:"num_of_root_shards"`
195+
MaxShardID int `json:"max_shard_id"`
196+
InProgressSplitShardID []int `json:"in_progress_split_shard_id,omitempty"`
197+
ActiveShardIDs []int `json:"active_shard_ids"`
198+
RootShardsToAllChildren map[string][]ClusterStateShardRange `json:"root_shards_to_all_children"`
199+
ParentToChildShards map[string][]ClusterStateShardRange `json:"parent_to_child_shards"`
200+
}
201+
202+
// ClusterStateShardRange describes the hash-range owned by a single shard.
203+
// Added in OpenSearch 3.6.0 (opensearch-project/OpenSearch@ed2e1006,
204+
// server/src/main/java/org/opensearch/cluster/metadata/ShardRange.java).
205+
type ClusterStateShardRange struct {
206+
ShardID int `json:"shard_id"`
207+
Start int `json:"start"`
208+
End int `json:"end"`
183209
}
184210

185211
// ClusterStateMetaDataStream is a sub type of ClusterStateMetaData containing information about a data stream

0 commit comments

Comments
 (0)