Skip to content

Commit

Permalink
Added missing cancellation_time_millis. (opensearch-project#747)
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock authored Dec 18, 2024
1 parent 7a32419 commit 1b6935f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added support for using a certificate and key in tests ([#731](https://github.com/opensearch-project/opensearch-api-specification/pull/731))
- Added `_type` to `termvector` and `mtermvector` ([#734](https://github.com/opensearch-project/opensearch-api-specification/pull/734))
- Added missing `cancelled` and `resource_stats` to `/_reindex/{task_id}/_rethrottle` ([#740](https://github.com/opensearch-project/opensearch-api-specification/pull/740))
- Added missing `cancellation_time_millis` to `POST /_tasks/_cancel` ([#747](https://github.com/opensearch-project/opensearch-api-specification/pull/747))

### Removed
- 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))
Expand Down
2 changes: 2 additions & 0 deletions spec/schemas/tasks._common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ components:
type: boolean
cancellable:
type: boolean
cancellation_time_millis:
$ref: '_common.yaml#/components/schemas/EpochTimeUnitMillis'
description:
type: string
headers:
Expand Down
20 changes: 13 additions & 7 deletions tests/default/_core/tasks/cancel.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
$schema: ../../../../json_schemas/test_story.schema.yaml

description: Test tasks endpoint.
epilogues:
- path: /books
method: DELETE
status: [200, 404]
prologues:
- path: /_bulk
method: POST
parameters:
refresh: true
request:
content_type: application/x-ndjson
payload:
- {create: {_index: books}}
- {author: Harper Lee, title: To Kill a Mockingbird, year: 1960}
- path: /books/_delete_by_query
id: task
method: POST
Expand All @@ -24,10 +37,3 @@ chapters:
method: POST
parameters:
task_id: ${task.id}
response:
status: 200
payload:
node_failures:
- type: failed_node_exception
caused_by:
type: resource_not_found_exception

0 comments on commit 1b6935f

Please sign in to comment.