Skip to content

Commit

Permalink
Merge branch 'main' into replication-tests
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Farr <tsfarr@amazon.com>
  • Loading branch information
Xtansia authored Dec 10, 2024
2 parents 995eb84 + 8b9a491 commit b534fa8
Show file tree
Hide file tree
Showing 18 changed files with 517 additions and 77 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added missing `status` to `/_search/template` response ([#702](https://github.com/opensearch-project/opensearch-api-specification/pull/702))
- Added `_type` to `rank_eval` API specs ([#704](https://github.com/opensearch-project/opensearch-api-specification/pull/704))
- Added request body to `_search_shards` API specs ([#709](https://github.com/opensearch-project/opensearch-api-specification/pull/709))
- Added NodeAttributes as additional property in `shard_stores` API specs ([#715](https://github.com/opensearch-project/opensearch-api-specification/pull/715))
- Added missing `repository` query parameter to `/_cat/snapshots` ([#700](https://github.com/opensearch-project/opensearch-api-specification/pull/700))
- Added `sm` namespace API specifications ([#701](https://github.com/opensearch-project/opensearch-api-specification/pull/701))
- Added schema for `/_plugins/_knn/stats`, `/_plugins/_knn/models/{model_id}`, `_train` and `_search` ([#704](https://github.com/opensearch-project/opensearch-api-specification/pull/704))
- Added `retry` support in `prologues` and `epilogues` ([#713](https://github.com/opensearch-project/opensearch-api-specification/pull/713))

### Removed
Expand Down Expand Up @@ -52,9 +56,10 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fixed `/_ingest/pipeline/{id}/_simulate` response `docs/_source` field schema ([#689](https://github.com/opensearch-project/opensearch-api-specification/pull/689))
- Fixed `/_scripts/painless/_execute` request and response schema ([#699](https://github.com/opensearch-project/opensearch-api-specification/pull/699))
- Fixed `fields` in `Hit` allowing primitive arrays ([#699](https://github.com/opensearch-project/opensearch-api-specification/pull/699))
- Added missing `repository` query parameter to `/_cat/snapshots` ([#700](https://github.com/opensearch-project/opensearch-api-specification/pull/700))
- Fixed `hits` in `rank_eval` allowing numbers ([#704](https://github.com/opensearch-project/opensearch-api-specification/pull/704))
- Fixed query DSL schemas ([#706](https://github.com/opensearch-project/opensearch-api-specification/pull/706))
- Fixed content-type of `GET /_plugins/_observability/_local/stats` ([#711](https://github.com/opensearch-project/opensearch-api-specification/pull/711))
- Fixed `tenant` in `ObservabilityObject` request body to not be required ([#711](https://github.com/opensearch-project/opensearch-api-specification/pull/711))

### Changed
- Changed `tasks._common:TaskInfo` and `tasks._common:TaskGroup` to be composed of a `tasks._common:TaskInfoBase` ([#683](https://github.com/opensearch-project/opensearch-api-specification/pull/683))
Expand Down Expand Up @@ -165,7 +170,6 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added API spec for `adjust_pure_negative` for bool queries ([#641](https://github.com/opensearch-project/opensearch-api-specification/pull/641))
- Added a spec style checker [#620](https://github.com/opensearch-project/opensearch-api-specification/pull/620).
- Added `remote_store` to node `Stats` ([#643](https://github.com/opensearch-project/opensearch-api-specification/pull/643))
- Added `sm` namespace API specifications ([#701](https://github.com/opensearch-project/opensearch-api-specification/pull/701))

### Changed

Expand Down
2 changes: 1 addition & 1 deletion spec/namespaces/_core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2710,7 +2710,7 @@ components:
additionalProperties:
type: object
indices_boost:
description: Allows increasing the relevance of specific indices in the search.
description: Allows increasing the relevance of specific indexes in the search.
type: object
additionalProperties:
type: number
Expand Down
56 changes: 23 additions & 33 deletions spec/namespaces/knn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -251,45 +251,28 @@ components:
content:
application/json:
schema:
type: object
properties:
training_index:
type: string
training_field:
type: string
dimension:
type: integer
format: int32
max_training_vector_count:
type: integer
format: int32
search_size:
type: integer
format: int32
description:
type: string
mode:
type: string
compression_level:
type: string
method:
type: string
spaceType:
type: string
required:
- dimension
- training_field
- training_index
required: true
$ref: '../schemas/knn._common.yaml#/components/schemas/TrainedModel'
responses:
knn.delete_model@200: {}
knn.delete_model@200:
content:
application/json:
schema:
$ref: '../schemas/knn._common.yaml#/components/schemas/DeletedModel'
knn.get_model@200:
content:
application/json:
schema:
type: object
knn.search_models@200: {}
knn.stats@200: {}
knn.search_models@200:
content:
application/json:
schema:
$ref: '../schemas/_core.search.yaml#/components/schemas/ResponseBody'
knn.stats@200:
content:
application/json:
schema:
$ref: '../schemas/knn._common.yaml#/components/schemas/Stats'
knn.train_model@200:
content:
application/json:
Expand Down Expand Up @@ -681,12 +664,19 @@ components:
- graph_memory_usage_percentage
- graph_query_errors
- graph_query_requests
- graph_stats
- hit_count
- indexing_from_model_degraded
- indices_in_cache
- knn_query_requests
- knn_query_with_filter_requests
- load_exception_count
- load_success_count
- lucene_initialized
- max_distance_query_requests
- max_distance_query_with_filter_requests
- min_score_query_requests
- min_score_query_with_filter_requests
- miss_count
- model_index_status
- nmslib_initialized
Expand Down
6 changes: 3 additions & 3 deletions spec/namespaces/observability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ paths:
get:
operationId: observability.get_localstats.0
x-operation-group: observability.get_localstats
x-version-added: '1.1'
description: Retrieves Local Stats of all observability objects.
x-version-added: '2.5'
description: Retrieves local stats of all observability objects.
responses:
'200':
$ref: '#/components/responses/observability.get_localstats@200'
Expand Down Expand Up @@ -177,7 +177,7 @@ components:
observability.get_localstats@200:
description: Retrieves
content:
application/json:
text/plain:
schema:
type: string
parameters:
Expand Down
2 changes: 2 additions & 0 deletions spec/schemas/indices.shard_stores.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ components:
$ref: '_common.yaml#/components/schemas/Id'
store_exception:
$ref: '#/components/schemas/ShardStoreException'
additionalProperties:
$ref: '_common.yaml#/components/schemas/NodeAttributes'
required:
- allocation
ShardStoreAllocation:
Expand Down
161 changes: 161 additions & 0 deletions spec/schemas/knn._common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,164 @@ components:
- always
- missing
- popular
Stats:
type: object
properties:
_nodes:
$ref: '_common.yaml#/components/schemas/NodeStatistics'
cluster_name:
$ref: '_common.yaml#/components/schemas/Name'
circuit_breaker_triggered:
type: boolean
model_index_status:
oneOf:
- $ref: '_common.yaml#/components/schemas/HealthStatusCapitalized'
- type: 'null'
nodes:
type: object
additionalProperties:
$ref: '#/components/schemas/NodeStats'
NodeStats:
type: object
properties:
max_distance_query_with_filter_requests:
type: number
graph_memory_usage_percentage:
$ref: '_common.yaml#/components/schemas/PercentageNumber'
graph_query_requests:
type: number
graph_memory_usage:
type: number
cache_capacity_reached:
type: boolean
load_success_count:
type: number
training_memory_usage:
type: number
indices_in_cache:
type: object
additionalProperties: true
script_query_errors:
type: number
hit_count:
type: number
knn_query_requests:
type: number
total_load_time:
type: number
miss_count:
type: number
min_score_query_requests:
type: number
knn_query_with_filter_requests:
type: number
training_memory_usage_percentage:
$ref: '_common.yaml#/components/schemas/PercentageNumber'
max_distance_query_requests:
type: number
lucene_initialized:
type: boolean
graph_index_requests:
type: number
faiss_initialized:
type: boolean
load_exception_count:
type: number
training_errors:
type: number
min_score_query_with_filter_requests:
type: number
eviction_count:
type: number
nmslib_initialized:
type: boolean
script_compilations:
type: number
script_query_requests:
type: number
graph_stats:
$ref: '#/components/schemas/GraphStats'
graph_query_errors:
type: number
indexing_from_model_degraded:
type: boolean
graph_index_errors:
type: number
training_requests:
type: number
script_compilation_errors:
type: number
GraphStats:
type: object
properties:
merge:
$ref: '#/components/schemas/GraphMergeStats'
refresh:
$ref: '#/components/schemas/GraphRefreshStats'
GraphRefreshStats:
type: object
properties:
total:
type: number
total_time_in_millis:
$ref: '_common.yaml#/components/schemas/DurationValueUnitMillis'
GraphMergeStats:
type: object
properties:
current:
type: number
total:
type: number
total_time_in_millis:
$ref: '_common.yaml#/components/schemas/DurationValueUnitMillis'
current_docs:
type: number
total_docs:
type: number
total_size_in_bytes:
$ref: '_common.yaml#/components/schemas/ByteCount'
current_size_in_bytes:
$ref: '_common.yaml#/components/schemas/ByteCount'
TrainedModel:
type: object
properties:
training_index:
type: string
training_field:
type: string
dimension:
type: integer
format: int32
max_training_vector_count:
type: integer
format: int32
search_size:
type: integer
format: int32
description:
type: string
mode:
type: string
compression_level:
type: string
method:
type: string
spaceType:
type: string
required:
- dimension
- training_field
- training_index
DeletedModel:
type: object
properties:
model_id:
type: string
result:
type: string
enum:
- deleted
- error
required:
- model_id
- result
1 change: 0 additions & 1 deletion spec/schemas/observability._common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ components:
$ref: '#/components/schemas/SavedQuery'
required:
- objectId
- tenant

OperationalPanel:
type: object
Expand Down
26 changes: 26 additions & 0 deletions tests/default/_core/shard_stores.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
$schema: ../../../json_schemas/test_story.schema.yaml

description: Test _shard_stores API.
prologues:
- path: /_bulk
method: POST
parameters:
refresh: true
request:
content_type: application/x-ndjson
payload:
- {create: {_index: movies, _id: movie1}}
- {director: Quentin Tarantino, title: Pulp Fiction, year: 1994}
- {create: {_index: movies, _id: movie2}}
- {director: Christopher Nolan, title: Inception, year: 2010}
epilogues:
- path: /movies
method: DELETE
status: [200, 404]

chapters:
- synopsis: Verify shard store information across all indices.
path: /_shard_stores
method: GET
response:
status: 200
28 changes: 28 additions & 0 deletions tests/default/indices/shard_stores.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
$schema: ../../../json_schemas/test_story.schema.yaml

description: Test _shard_stores API.
prologues:
- path: /_bulk
method: POST
parameters:
refresh: true
request:
content_type: application/x-ndjson
payload:
- {create: {_index: movies, _id: movie1}}
- {director: Quentin Tarantino, title: Pulp Fiction, year: 1994}
- {create: {_index: movies, _id: movie2}}
- {director: Christopher Nolan, title: Inception, year: 2010}
epilogues:
- path: /movies
method: DELETE
status: [200, 404]

chapters:
- synopsis: Verify shard store information for a specific index.
path: /{index}/_shard_stores
parameters:
index: movies
method: GET
response:
status: 200
Loading

0 comments on commit b534fa8

Please sign in to comment.