Skip to content

Commit aaf974d

Browse files
Xtansiahye-onleewjae
authored
Update test spec 3.x docker image to 3.0.0-alpha1 (#852)
* Update 3.0.0 snapshot image to 3.0.0-alpha1 Signed-off-by: Thomas Farr <[email protected]> * Allow prerelease versions in semver matching Signed-off-by: Thomas Farr <[email protected]> * Fixed swapped schema references in nodes info API buffer fields (#808) * Fixed swapped schema references in nodes info API buffer fields Signed-off-by: hye-on <[email protected]> * Add version specific schema handling for total_indexing_buffer and total_indexing_buffer_in_bytes fields Signed-off-by: hye-on <[email protected]> * Fix version number format in nodes.info.yaml Signed-off-by: hye-on <[email protected]> * Remove version tags and add notes for schema changes Signed-off-by: hye-on <[email protected]> * Revert "Remove version tags and add notes for schema changes" This reverts commit 1622f24. Signed-off-by: Thomas Farr <[email protected]> --------- Signed-off-by: hye-on <[email protected]> Signed-off-by: Thomas Farr <[email protected]> Co-authored-by: Thomas Farr <[email protected]> * Added paginationDepth to HybridQuery (#848) * Added paginationDepth to HybridQuery Signed-off-by: Wonjae Lee <[email protected]> * Fixed diff and added test with pagination_depth Signed-off-by: Wonjae Lee <[email protected]> * Lint & changelog Signed-off-by: Wonjae Lee <[email protected]> --------- Signed-off-by: Wonjae Lee <[email protected]> Co-authored-by: Thomas Farr <[email protected]> * Added `warm` to `ClusterNodeCount` Signed-off-by: Thomas Farr <[email protected]> * Support indices and shards on nodes stats cache Signed-off-by: Thomas Farr <[email protected]> * Add total_primary_shards_per_node Signed-off-by: Thomas Farr <[email protected]> * Fix flow framework provision response status code Signed-off-by: Thomas Farr <[email protected]> * Fix security status codes Signed-off-by: Thomas Farr <[email protected]> --------- Signed-off-by: Thomas Farr <[email protected]> Signed-off-by: hye-on <[email protected]> Signed-off-by: Wonjae Lee <[email protected]> Co-authored-by: 조혜온 <[email protected]> Co-authored-by: Wonjae Lee <[email protected]>
1 parent b82a7a8 commit aaf974d

File tree

14 files changed

+192
-35
lines changed

14 files changed

+192
-35
lines changed

.github/workflows/test-spec.yml

+17-19
Original file line numberDiff line numberDiff line change
@@ -28,47 +28,45 @@ jobs:
2828
admin_password: admin
2929
- version: 2.0.0
3030
admin_password: admin
31-
- version: 2.19.0
32-
- version: 2.19.0
31+
- version: 2.19.1
32+
- version: 2.19.1
3333
tests: plugins/index_state_management
34-
- version: 2.19.0
34+
- version: 2.19.1
3535
tests: plugins/ml
36-
- version: 2.19.0
36+
- version: 2.19.1
3737
tests: routing
38-
- version: 2.19.0
38+
- version: 2.19.1
3939
tests: snapshot
40-
- version: 2.19.0
40+
- version: 2.19.1
4141
tests: remote_store
42-
- version: 2.19.0
42+
- version: 2.19.1
4343
tests: dangling
4444
url: http://localhost:9200
45-
- version: 2.19.0
45+
- version: 2.19.1
4646
tests: plugins/replication
4747
url: http://localhost:9200
48-
- version: 2.19.0
48+
- version: 2.19.1
4949
tests: plugins/streaming
50-
- version: 2.19.0
50+
- version: 2.19.1
5151
tests: plugins/notifications
52-
- version: 2.19.0
52+
- version: 2.19.1
5353
tests: plugins/query_insights
54-
- version: 2.19.0
54+
- version: 2.19.1
5555
tests: plugins/workload-management
56-
- version: 2.19.0
56+
- version: 2.19.1
5757
tests: plugins/analysis
58-
- version: 2.19.0
58+
- version: 2.19.1
5959
tests: plugins/knn
60-
- version: 2.19.0
60+
- version: 2.19.1
6161
tests: plugins/learning_to_rank
62-
- version: 2.19.0
62+
- version: 2.19.1
6363
tests: plugins/security
6464
cert: tests/plugins/security/.kirk.pem
6565
key: tests/plugins/security/.kirk-key.pem
6666
- version: 2.20.0
6767
hub: opensearchstaging
6868
ref: '@sha256:037a2eb5a4f48b9a9a29950be5e5fae4ebd82d41de1066e00bb8d8b0ce7871b1'
69-
- version: 3.0.0
70-
hub: opensearchstaging
71-
ref: '@sha256:727643acdfebed77bfdb26362dbcff536b7ea02a0cc4ae2da2521729171333de'
69+
- version: 3.0.0-alpha1
7270

7371
name: test-opensearch-spec (version=${{ matrix.entry.version }}, hub=${{ matrix.entry.hub || 'opensearchproject' }}, tests=${{ matrix.entry.tests || 'default' }})
7472
runs-on: ubuntu-latest

CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6969
- Added `optional_extended_plugins` field to `PluginStats` ([#814](https://github.com/opensearch-project/opensearch-api-specification/pull/814))
7070
- Added `id` & `group_by` fields to `TopQuery` ([#814](https://github.com/opensearch-project/opensearch-api-specification/pull/814))
7171
- Added `normalizer` to `WildcardProperty` ([#847](https://github.com/opensearch-project/opensearch-api-specification/pull/847))
72+
- Added `pagination_depth` to `HybridQuery` ([#848](https://github.com/opensearch-project/opensearch-api-specification/pull/848))
73+
- Added `warm` to `ClusterNodeCount` ([#852](https://github.com/opensearch-project/opensearch-api-specification/pull/852))
74+
- Added `total_primary_shards_per_node` to `IndexRoutingAllocation` ([#852](https://github.com/opensearch-project/opensearch-api-specification/pull/852))
7275

7376
### Removed
7477
- Removed unsupported `_common.mapping:SourceField`'s `mode` field and associated `_common.mapping:SourceFieldMode` enum ([#652](https://github.com/opensearch-project/opensearch-api-specification/pull/652))
@@ -122,7 +125,8 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
122125
- Fixed Aggregation schemas ([#801](https://github.com/opensearch-project/opensearch-api-specification/pull/801))
123126
- Fixed FilterQueryRequestProcessor to use correct query type ([#821](https://github.com/opensearch-project/opensearch-api-specification/pull/821))
124127
- Fixed `knn.train_model`'s request body `method` field to accept an object rather than a string ([#814](https://github.com/opensearch-project/opensearch-api-specification/pull/814))
125-
- Fixed REST status codes for RBAC and provisioning for Flow Framework plugin ([#842](https://github.com/opensearch-project/opensearch-api-specification/pull/842))
128+
- Fixed REST status codes for RBAC and provisioning for Flow Framework plugin ([#842](https://github.com/opensearch-project/opensearch-api-specification/pull/842), [#852](https://github.com/opensearch-project/opensearch-api-specification/pull/852))
129+
- Fixed swapped schema references in nodes info API buffer fields ([#808](https://github.com/opensearch-project/opensearch-api-specification/pull/808))
126130

127131
### Changed
128132
- 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))

spec/namespaces/flow_framework.yaml

+23
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ paths:
2323
responses:
2424
'201':
2525
$ref: '#/components/responses/flow_framework.create@201'
26+
'202':
27+
$ref: '#/components/responses/flow_framework.create@202'
2628
'403':
2729
$ref: '#/components/responses/flow_framework.create@403'
2830
'400':
@@ -157,6 +159,8 @@ paths:
157159
responses:
158160
'200':
159161
$ref: '#/components/responses/flow_framework.provision@200'
162+
'202':
163+
$ref: '#/components/responses/flow_framework.provision@202'
160164
'403':
161165
$ref: '#/components/responses/flow_framework.provision@403'
162166
'400':
@@ -393,6 +397,18 @@ components:
393397
description: The ID of the workflow to be updated. Required for the PUT method.
394398
required:
395399
- workflow_id
400+
flow_framework.create@202:
401+
x-version-added: '3.0'
402+
content:
403+
application/json:
404+
schema:
405+
type: object
406+
properties:
407+
workflow_id:
408+
type: string
409+
description: The ID of the workflow to be updated. Required for the PUT method.
410+
required:
411+
- workflow_id
396412
flow_framework.create@403:
397413
content:
398414
application/json:
@@ -513,6 +529,13 @@ components:
513529
schema:
514530
$ref: '../schemas/flow_framework.common.yaml#/components/schemas/WorkflowIDResponse'
515531
flow_framework.provision@200:
532+
x-version-removed: '3.0'
533+
content:
534+
application/json:
535+
schema:
536+
$ref: '../schemas/flow_framework.common.yaml#/components/schemas/WorkflowIDResponse'
537+
flow_framework.provision@202:
538+
x-version-added: '3.0'
516539
content:
517540
application/json:
518541
schema:

spec/namespaces/security.yaml

+23-2
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,8 @@ paths:
457457
- amazon-serverless
458458
description: Not supported for the Cache API.
459459
responses:
460+
'405':
461+
$ref: '#/components/responses/security.cache@405'
460462
'501':
461463
$ref: '#/components/responses/security.cache@501'
462464
post:
@@ -469,6 +471,8 @@ paths:
469471
x-ignorable: true
470472
description: Not supported for the Cache API.
471473
responses:
474+
'405':
475+
$ref: '#/components/responses/security.cache@405'
472476
'501':
473477
$ref: '#/components/responses/security.cache@501'
474478
put:
@@ -481,6 +485,8 @@ paths:
481485
x-ignorable: true
482486
description: Not supported for the Cache API.
483487
responses:
488+
'405':
489+
$ref: '#/components/responses/security.cache@405'
484490
'501':
485491
$ref: '#/components/responses/security.cache@501'
486492
delete:
@@ -1559,7 +1565,14 @@ components:
15591565
application/json:
15601566
schema:
15611567
$ref: '../schemas/security._common.yaml#/components/schemas/Ok'
1568+
security.cache@405:
1569+
x-version-added: '3.0'
1570+
content:
1571+
application/json:
1572+
schema:
1573+
$ref: '../schemas/security._common.yaml#/components/schemas/ClientError'
15621574
security.cache@501:
1575+
x-version-removed: '3.0'
15631576
content:
15641577
application/json:
15651578
schema:
@@ -1978,7 +1991,11 @@ components:
19781991
content:
19791992
application/json:
19801993
schema:
1981-
$ref: '../schemas/security._common.yaml#/components/schemas/Error'
1994+
oneOf:
1995+
- x-version-removed: '3.0'
1996+
$ref: '../schemas/security._common.yaml#/components/schemas/Error'
1997+
- x-version-added: '3.0'
1998+
$ref: '../schemas/security._common.yaml#/components/schemas/ClientError'
19821999
security.patch_action_group@200:
19832000
content:
19842001
application/json:
@@ -2216,7 +2233,11 @@ components:
22162233
content:
22172234
application/json:
22182235
schema:
2219-
$ref: '../schemas/security._common.yaml#/components/schemas/Error'
2236+
oneOf:
2237+
- x-version-removed: '3.0'
2238+
$ref: '../schemas/security._common.yaml#/components/schemas/Error'
2239+
- x-version-added: '3.0'
2240+
$ref: '../schemas/security._common.yaml#/components/schemas/ClientError'
22202241
security.who_am_i@200:
22212242
content:
22222243
application/json:

spec/schemas/_common.query_dsl.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,9 @@ components:
868868
type: array
869869
items:
870870
$ref: '#/components/schemas/QueryContainer'
871+
pagination_depth:
872+
type: integer
873+
format: int32
871874
IdsQuery:
872875
allOf:
873876
- $ref: '#/components/schemas/QueryBase'

spec/schemas/cluster.stats.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,10 @@ components:
286286
voting_only:
287287
type: integer
288288
format: int32
289+
warm:
290+
type: integer
291+
format: int32
292+
x-version-added: '3.0'
289293
required:
290294
- coordinating_only
291295
- data

spec/schemas/indices._common.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,9 @@ components:
412412
$ref: '#/components/schemas/IndexRoutingAllocationDisk'
413413
total_shards_per_node:
414414
$ref: '_common.yaml#/components/schemas/StringifiedInteger'
415+
total_primary_shards_per_node:
416+
$ref: '_common.yaml#/components/schemas/StringifiedInteger'
417+
x-version-added: '3.0'
415418
IndexRoutingAllocationOptions:
416419
type: string
417420
enum:

spec/schemas/nodes.info.yaml

+10-3
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,19 @@ components:
6464
type: object
6565
additionalProperties:
6666
$ref: '#/components/schemas/NodeThreadPoolInfo'
67-
# NOTE: total_indexing_buffer and total_indexing_buffer_in_bytes inverted according to the standard pattern, this is a bug: https://github.com/opensearch-project/OpenSearch/issues/16910
6867
total_indexing_buffer:
6968
description: Total heap allowed to be used to hold recently indexed documents before they must be written to disk. This size is a shared pool across all shards on this node, and is controlled by Indexing Buffer settings.
70-
$ref: '_common.yaml#/components/schemas/ByteCount'
69+
oneOf:
70+
- $ref: '_common.yaml#/components/schemas/ByteCount'
71+
x-version-removed: '3.0'
72+
- $ref: '_common.yaml#/components/schemas/HumanReadableByteCount'
73+
x-version-added: '3.0'
7174
total_indexing_buffer_in_bytes:
72-
$ref: '_common.yaml#/components/schemas/HumanReadableByteCount'
75+
oneOf:
76+
- $ref: '_common.yaml#/components/schemas/HumanReadableByteCount'
77+
x-version-removed: '3.0'
78+
- $ref: '_common.yaml#/components/schemas/ByteCount'
79+
x-version-added: '3.0'
7380
transport:
7481
$ref: '#/components/schemas/NodeInfoTransport'
7582
transport_address:

spec/schemas/nodes.stats.yaml

+29-6
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ components:
145145
admission_control:
146146
$ref: '#/components/schemas/ShardAdmissionControlStats'
147147
caches:
148-
$ref: '#/components/schemas/ShardCachesStats'
148+
$ref: '#/components/schemas/CachesStats'
149149
Http:
150150
type: object
151151
properties:
@@ -470,11 +470,11 @@ components:
470470
additionalProperties:
471471
type: integer
472472
format: int64
473-
ShardCachesStats:
473+
CachesStats:
474474
type: object
475475
additionalProperties:
476-
$ref: '#/components/schemas/ShardCacheStats'
477-
ShardCacheStats:
476+
$ref: '#/components/schemas/CacheStats'
477+
CacheStatsBase:
478478
type: object
479479
properties:
480480
size:
@@ -493,8 +493,31 @@ components:
493493
item_count:
494494
type: integer
495495
format: int64
496-
store_name:
497-
type: string
496+
CacheStats:
497+
allOf:
498+
- $ref: '#/components/schemas/CacheStatsBase'
499+
- type: object
500+
properties:
501+
store_name:
502+
type: string
503+
indices:
504+
type: object
505+
additionalProperties:
506+
$ref: '#/components/schemas/CacheIndicesStats'
507+
shards:
508+
type: object
509+
additionalProperties:
510+
$ref: '#/components/schemas/CacheShardStats'
511+
CacheIndicesStats:
512+
allOf:
513+
- $ref: '#/components/schemas/CacheStatsBase'
514+
- type: object
515+
properties: {}
516+
CacheShardStats:
517+
allOf:
518+
- $ref: '#/components/schemas/CacheStatsBase'
519+
- type: object
520+
properties: {}
498521
AdaptiveSelection:
499522
type: object
500523
properties:

spec/schemas/security._common.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,14 @@ components:
471471
message:
472472
type: string
473473

474+
ClientError:
475+
type: object
476+
properties:
477+
status:
478+
type: integer
479+
error:
480+
type: string
481+
474482
InternalServerError:
475483
type: object
476484
properties:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
$schema: ../../../../json_schemas/test_story.schema.yaml
2+
3+
description: Test hybrid query with pagination_depth property.
4+
version: '>=2.19'
5+
warnings:
6+
invalid-path-detected: false
7+
prologues:
8+
- path: /books
9+
method: PUT
10+
request:
11+
payload:
12+
mappings:
13+
properties:
14+
title:
15+
type: text
16+
fields:
17+
keyword:
18+
type: keyword
19+
author:
20+
type: text
21+
year:
22+
type: integer
23+
24+
- path: /_bulk
25+
method: POST
26+
parameters:
27+
refresh: true
28+
request:
29+
content_type: application/x-ndjson
30+
payload:
31+
- {index: {_index: books, _id: book1}}
32+
- {title: To Kill a Mockingbird, author: Harper Lee, year: 1960}
33+
- {index: {_index: books, _id: book2}}
34+
- {title: '1984', author: George Orwell, year: 1949}
35+
- {index: {_index: books, _id: book3}}
36+
- {title: The Great Gatsby, author: F. Scott Fitzgerald, year: 1925}
37+
epilogues:
38+
- path: /books
39+
method: DELETE
40+
status: [200, 404]
41+
chapters:
42+
- synopsis: Search with hybrid query including pagination_depth property.
43+
path: /{index}/_search
44+
method: POST
45+
parameters:
46+
index: books
47+
request:
48+
payload:
49+
query:
50+
hybrid:
51+
queries:
52+
- match:
53+
title: Kill
54+
- match:
55+
title: Gatsby
56+
pagination_depth: 10
57+
response:
58+
status: 200
59+
payload:
60+
hits:
61+
total:
62+
relation: eq

0 commit comments

Comments
 (0)