Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed content-type for /hot_threads. #543

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fixed required parameters in `NodeInfo` and `NodeOperatingSystemInfo` ([#483](https://github.com/opensearch-project/opensearch-api-specification/pull/483))
- Fixed query DSL `neural` field `query_image` set `contentEncoding` and `model_id` as optional ([#512](https://github.com/opensearch-project/opensearch-api-specification/pull/512))
- Fixed `knn` query specification ([#538](https://github.com/opensearch-project/opensearch-api-specification/pull/538))
- Fixed content-type for `/hot_threads` ([#543](https://github.com/opensearch-project/opensearch-api-specification/pull/543))

### Security

Expand Down
16 changes: 16 additions & 0 deletions spec/_superseded_operations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -594,3 +594,19 @@ $schema: ./json_schemas/_superseded_operations.schema.yaml
operations:
- GET
- POST
/_cluster/nodes/hotthreads:
superseded_by: /_cluster/nodes/hot_threads
operations:
- GET
/_cluster/nodes/{node_id}/hotthreads:
superseded_by: /_cluster/nodes/{node_id}/hot_threads
operations:
- GET
/_nodes/{node_id}/hotthreads:
superseded_by: /_nodes/{node_id}/hot_threads
operations:
- GET
/_nodes/hotthreads:
superseded_by: /_nodes/hot_threads
operations:
- GET
Comment on lines +597 to +612
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loving seeing a bunch of deletions thanks to this 🥳

94 changes: 3 additions & 91 deletions spec/namespaces/nodes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,6 @@ paths:
responses:
'200':
$ref: '#/components/responses/nodes.hot_threads@200'
/_cluster/nodes/hotthreads:
get:
operationId: nodes.hot_threads.1
x-operation-group: nodes.hot_threads
x-ignorable: true
deprecated: true
x-deprecation-message: The hot threads API accepts `hotthreads` but only `hot_threads` is documented
x-version-added: '1.0'
x-version-deprecated: '1.0'
description: Returns information about hot threads on each node in the cluster.
externalDocs:
url: https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-hot-threads/
parameters:
- $ref: '#/components/parameters/nodes.hot_threads::query.ignore_idle_threads'
- $ref: '#/components/parameters/nodes.hot_threads::query.interval'
- $ref: '#/components/parameters/nodes.hot_threads::query.snapshots'
- $ref: '#/components/parameters/nodes.hot_threads::query.threads'
- $ref: '#/components/parameters/nodes.hot_threads::query.timeout'
- $ref: '#/components/parameters/nodes.hot_threads::query.type'
responses:
'200':
$ref: '#/components/responses/nodes.hot_threads@200'
/_cluster/nodes/{node_id}/hot_threads:
get:
operationId: nodes.hot_threads.2
Expand All @@ -71,29 +49,6 @@ paths:
responses:
'200':
$ref: '#/components/responses/nodes.hot_threads@200'
/_cluster/nodes/{node_id}/hotthreads:
get:
operationId: nodes.hot_threads.3
x-operation-group: nodes.hot_threads
x-ignorable: true
deprecated: true
x-deprecation-message: The hot threads API accepts `hotthreads` but only `hot_threads` is documented
x-version-added: '1.0'
x-version-deprecated: '1.0'
description: Returns information about hot threads on each node in the cluster.
externalDocs:
url: https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-hot-threads/
parameters:
- $ref: '#/components/parameters/nodes.hot_threads::path.node_id'
- $ref: '#/components/parameters/nodes.hot_threads::query.ignore_idle_threads'
- $ref: '#/components/parameters/nodes.hot_threads::query.interval'
- $ref: '#/components/parameters/nodes.hot_threads::query.snapshots'
- $ref: '#/components/parameters/nodes.hot_threads::query.threads'
- $ref: '#/components/parameters/nodes.hot_threads::query.timeout'
- $ref: '#/components/parameters/nodes.hot_threads::query.type'
responses:
'200':
$ref: '#/components/responses/nodes.hot_threads@200'
/_nodes:
get:
operationId: nodes.info.0
Expand Down Expand Up @@ -126,28 +81,6 @@ paths:
responses:
'200':
$ref: '#/components/responses/nodes.hot_threads@200'
/_nodes/hotthreads:
get:
operationId: nodes.hot_threads.5
x-operation-group: nodes.hot_threads
x-ignorable: true
deprecated: true
x-deprecation-message: The hot threads API accepts `hotthreads` but only `hot_threads` is documented
x-version-added: '1.0'
x-version-deprecated: '1.0'
description: Returns information about hot threads on each node in the cluster.
externalDocs:
url: https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-hot-threads/
parameters:
- $ref: '#/components/parameters/nodes.hot_threads::query.ignore_idle_threads'
- $ref: '#/components/parameters/nodes.hot_threads::query.interval'
- $ref: '#/components/parameters/nodes.hot_threads::query.snapshots'
- $ref: '#/components/parameters/nodes.hot_threads::query.threads'
- $ref: '#/components/parameters/nodes.hot_threads::query.timeout'
- $ref: '#/components/parameters/nodes.hot_threads::query.type'
responses:
'200':
$ref: '#/components/responses/nodes.hot_threads@200'
/_nodes/reload_secure_settings:
post:
operationId: nodes.reload_secure_settings.0
Expand Down Expand Up @@ -287,29 +220,6 @@ paths:
responses:
'200':
$ref: '#/components/responses/nodes.hot_threads@200'
/_nodes/{node_id}/hotthreads:
get:
operationId: nodes.hot_threads.7
x-operation-group: nodes.hot_threads
x-ignorable: true
deprecated: true
x-deprecation-message: The hot threads API accepts `hotthreads` but only `hot_threads` is documented
x-version-added: '1.0'
x-version-deprecated: '1.0'
description: Returns information about hot threads on each node in the cluster.
externalDocs:
url: https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-hot-threads/
parameters:
- $ref: '#/components/parameters/nodes.hot_threads::path.node_id'
- $ref: '#/components/parameters/nodes.hot_threads::query.ignore_idle_threads'
- $ref: '#/components/parameters/nodes.hot_threads::query.interval'
- $ref: '#/components/parameters/nodes.hot_threads::query.snapshots'
- $ref: '#/components/parameters/nodes.hot_threads::query.threads'
- $ref: '#/components/parameters/nodes.hot_threads::query.timeout'
- $ref: '#/components/parameters/nodes.hot_threads::query.type'
responses:
'200':
$ref: '#/components/responses/nodes.hot_threads@200'
/_nodes/{node_id}/reload_secure_settings:
post:
operationId: nodes.reload_secure_settings.1
Expand Down Expand Up @@ -449,7 +359,9 @@ components:
$ref: '../schemas/_common.yaml#/components/schemas/Password'
description: An object containing the password for the opensearch keystore
responses:
nodes.hot_threads@200: {}
nodes.hot_threads@200:
content:
text/plain: {}
nodes.info@200:
content:
application/json:
Expand Down
32 changes: 32 additions & 0 deletions tests/default/cluster/nodes/hot_threads.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
$schema: ../../../../json_schemas/test_story.schema.yaml

description: Provides information about busy JVM threads for selected cluster nodes.
chapters:
- synopsis: Get busy JVM threads for all nodes.
path: /_cluster/nodes/hot_threads
method: GET
response:
status: 200
content_type: text/plain
- synopsis: Get busy JVM threads for all nodes with parameters.
path: /_cluster/nodes/hot_threads
method: GET
parameters:
snapshots: 3
interval: 100ms
threads: 1
ignore_idle_threads: false
type: wait
timeout: 10s
response:
status: 200
content_type: text/plain
- synopsis: Get _all node busy JVM threads (node_id).
path: /_cluster/nodes/{node_id}/hot_threads
method: GET
parameters:
node_id:
- _all
response:
status: 200
content_type: text/plain
32 changes: 32 additions & 0 deletions tests/default/nodes/hot_threads.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
$schema: ../../../json_schemas/test_story.schema.yaml

description: Provides information about busy JVM threads for selected cluster nodes.
chapters:
- synopsis: Get busy JVM threads for all nodes.
path: /_nodes/hot_threads
method: GET
response:
status: 200
content_type: text/plain
- synopsis: Get busy JVM threads for all nodes with parameters.
path: /_nodes/hot_threads
method: GET
parameters:
snapshots: 3
interval: 100ms
threads: 1
ignore_idle_threads: false
type: wait
timeout: 10s
response:
status: 200
content_type: text/plain
- synopsis: Get _all node busy JVM threads (node_id).
path: /_nodes/{node_id}/hot_threads
method: GET
parameters:
node_id:
- _all
response:
status: 200
content_type: text/plain
Loading