summaryrefslogtreecommitdiff
path: root/rest-api-spec/src/main
diff options
context:
space:
mode:
authorAli Beyad <ali@elastic.co>2017-06-28 17:37:56 -0500
committerGitHub <noreply@github.com>2017-06-28 17:37:56 -0500
commitb18bfd6062f616da7443a7682f05eb8bbf598cee (patch)
tree08f21e9585ad3e60a8cef371b2e77e74793bbe8c /rest-api-spec/src/main
parent64d11b883170393b05316d9a4db9261fd30ae2b8 (diff)
Output all empty snapshot info fields if in verbose mode (#25455)
In #24477, a less verbose option was added to retrieve snapshot info via GET /_snapshot/{repo}/{snapshots}. The point of adding this less verbose option was so that if the repository is a cloud based one, and there are many snapshots for which the snapshot info needed to be retrieved, then each snapshot would require reading a separate snapshot metadata file to pull out the necessary information. This can be costly (performance and cost) on cloud based repositories, so a less verbose option was added that only retrieves very basic information about each snapshot that is all available in the index-N blob - requiring only one read! In order to display this less verbose snapshot info appropriately, logic was added to not display those fields which could not be populated. However, this broke integrators (e.g. ECE) that required these fields to be present, even if empty. This commit is to return these fields in the response, even if empty, if the verbose option is set.
Diffstat (limited to 'rest-api-spec/src/main')
-rw-r--r--rest-api-spec/src/main/resources/rest-api-spec/test/snapshot.get/10_basic.yml3
1 files changed, 3 insertions, 0 deletions
diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/snapshot.get/10_basic.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/snapshot.get/10_basic.yml
index 515662355d..7000841512 100644
--- a/rest-api-spec/src/main/resources/rest-api-spec/test/snapshot.get/10_basic.yml
+++ b/rest-api-spec/src/main/resources/rest-api-spec/test/snapshot.get/10_basic.yml
@@ -32,6 +32,7 @@ setup:
snapshot: test_snapshot
- is_true: snapshots
+ - is_true: snapshots.0.failures
- do:
snapshot.delete:
@@ -87,6 +88,8 @@ setup:
- is_true: snapshots
- match: { snapshots.0.snapshot: test_snapshot }
- match: { snapshots.0.state: SUCCESS }
+ - is_false: snapshots.0.failures
+ - is_false: snapshots.0.shards
- is_false: snapshots.0.version
- do: