Skip to content

Commit

Permalink
Adjust component for Human readable Bytes (opensearch-project#552)
Browse files Browse the repository at this point in the history
* tests/default: add human paramete to some tests, repalce
expand_wildcards none with all

Signed-off-by: Jakob Hahn <[email protected]>

* spec: replace Bytes component with StorageType, add StorageSize component

Signed-off-by: Jakob Hahn <[email protected]>

* add changelog

Signed-off-by: Jakob Hahn <[email protected]>

* tests/routing: Fix reroute test

Signed-off-by: Jakob Hahn <[email protected]>

---------

Signed-off-by: Jakob Hahn <[email protected]>
  • Loading branch information
Jakob3xD authored Sep 5, 2024
1 parent 0733e62 commit 62e21f0
Show file tree
Hide file tree
Showing 33 changed files with 476 additions and 289 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added `terminated_early` to `count@200` ([#547](https://github.com/opensearch-project/opensearch-api-specification/pull/547))
- Added request and response schemas for `/_cluster/routing/awareness/{attribute}/weights` ([#524](https://github.com/opensearch-project/opensearch-api-specification/pull/524))
- Added request and response schemas for `/_cluster/decommission/awareness` ([#524](https://github.com/opensearch-project/opensearch-api-specification/pull/524))
- Added `Bytes` component of type number ([#552](https://github.com/opensearch-project/opensearch-api-specification/pull/552))

### Changed

Expand All @@ -104,6 +105,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Split test suite ([#472])(https://github.com/opensearch-project/opensearch-api-specification/pull/472)
- Changed `WriteResponseBase`'s `_primary_term`, `_seq_no` & `_version` to have `int64` format ([#530](https://github.com/opensearch-project/opensearch-api-specification/pull/530))
- Adjust indices, shards cat API to test against unassigned indices ([#551](https://github.com/opensearch-project/opensearch-api-specification/pull/551))
- Rename `Bytes` component to `StorageType` ([#552](https://github.com/opensearch-project/opensearch-api-specification/pull/552))
- Rename `ByteSize` to `StorageSize` ([#552](https://github.com/opensearch-project/opensearch-api-specification/pull/552))

### Deprecated

Expand Down
20 changes: 10 additions & 10 deletions spec/namespaces/cat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,7 @@ components:
in: query
description: The unit in which to display byte values.
schema:
$ref: '../schemas/_common.yaml#/components/schemas/Bytes'
$ref: '../schemas/_common.yaml#/components/schemas/StorageType'
cat.all_pit_segments::query.format:
name: format
in: query
Expand Down Expand Up @@ -1164,7 +1164,7 @@ components:
name: bytes
description: The unit used to display byte values.
schema:
$ref: '../schemas/_common.yaml#/components/schemas/Bytes'
$ref: '../schemas/_common.yaml#/components/schemas/StorageType'
style: form
cat.allocation::query.cluster_manager_timeout:
name: cluster_manager_timeout
Expand Down Expand Up @@ -1374,7 +1374,7 @@ components:
name: bytes
description: The unit used to display byte values.
schema:
$ref: '../schemas/_common.yaml#/components/schemas/Bytes'
$ref: '../schemas/_common.yaml#/components/schemas/StorageType'
style: form
cat.fielddata::query.fields:
in: query
Expand Down Expand Up @@ -1503,7 +1503,7 @@ components:
name: bytes
description: The unit used to display byte values.
schema:
$ref: '../schemas/_common.yaml#/components/schemas/Bytes'
$ref: '../schemas/_common.yaml#/components/schemas/StorageType'
style: form
cat.indices::query.cluster_manager_timeout:
name: cluster_manager_timeout
Expand Down Expand Up @@ -1754,7 +1754,7 @@ components:
name: bytes
description: The unit used to display byte values.
schema:
$ref: '../schemas/_common.yaml#/components/schemas/Bytes'
$ref: '../schemas/_common.yaml#/components/schemas/StorageType'
style: form
cat.nodes::query.cluster_manager_timeout:
name: cluster_manager_timeout
Expand Down Expand Up @@ -1924,7 +1924,7 @@ components:
in: query
description: The unit in which to display byte values.
schema:
$ref: '../schemas/_common.yaml#/components/schemas/Bytes'
$ref: '../schemas/_common.yaml#/components/schemas/StorageType'
cat.pit_segments::query.format:
name: format
in: query
Expand Down Expand Up @@ -2062,7 +2062,7 @@ components:
name: bytes
description: The unit used to display byte values.
schema:
$ref: '../schemas/_common.yaml#/components/schemas/Bytes'
$ref: '../schemas/_common.yaml#/components/schemas/StorageType'
style: form
cat.recovery::query.detailed:
in: query
Expand Down Expand Up @@ -2233,7 +2233,7 @@ components:
in: query
description: The unit in which to display byte values.
schema:
$ref: '../schemas/_common.yaml#/components/schemas/Bytes'
$ref: '../schemas/_common.yaml#/components/schemas/StorageType'
cat.segment_replication::query.completed_only:
name: completed_only
in: query
Expand Down Expand Up @@ -2365,7 +2365,7 @@ components:
name: bytes
description: The unit used to display byte values.
schema:
$ref: '../schemas/_common.yaml#/components/schemas/Bytes'
$ref: '../schemas/_common.yaml#/components/schemas/StorageType'
style: form
cat.segments::query.cluster_manager_timeout:
name: cluster_manager_timeout
Expand Down Expand Up @@ -2444,7 +2444,7 @@ components:
name: bytes
description: The unit used to display byte values.
schema:
$ref: '../schemas/_common.yaml#/components/schemas/Bytes'
$ref: '../schemas/_common.yaml#/components/schemas/StorageType'
style: form
cat.shards::query.cluster_manager_timeout:
name: cluster_manager_timeout
Expand Down
4 changes: 2 additions & 2 deletions spec/namespaces/indices.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2385,10 +2385,10 @@ components:
items:
$ref: '../schemas/indices.data_streams_stats.yaml#/components/schemas/DataStreamsStatsItem'
total_store_sizes:
$ref: '../schemas/_common.yaml#/components/schemas/ByteSize'
$ref: '../schemas/_common.yaml#/components/schemas/StorageSize'
total_store_size_bytes:
description: Total size, in bytes, of all shards for the selected data streams.
type: number
$ref: '../schemas/_common.yaml#/components/schemas/Bytes'
required:
- _shards
- backing_indices
Expand Down
Loading

0 comments on commit 62e21f0

Please sign in to comment.