-
Notifications
You must be signed in to change notification settings - Fork 59
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
fix snapshot restore and recovery endpoint #611
fix snapshot restore and recovery endpoint #611
Conversation
Signed-off-by: Tatsuya Kawakami <43780506+hogesako@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DCO is failing + some nits
spec/namespaces/snapshot.yaml
Outdated
@@ -427,10 +427,11 @@ components: | |||
schema: | |||
type: object | |||
properties: | |||
accepted: | |||
description: Equals `true` if the restore was accepted. Present when the request had `wait_for_completion` set to `false` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: Equals `true` if the restore was accepted. Present when the request had `wait_for_completion` set to `false` | |
description: Returns `true` if the restore was accepted. Present when the request had `wait_for_completion` set to `false`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unified with existing comments.
Should the existing comments also be amended?
https://github.com/opensearch-project/opensearch-api-specification/blob/main/spec/namespaces/snapshot.yaml#L386
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please.
Changes AnalysisCommit SHA: c483acb API ChangesSummary
ReportThe full API changes report is available at: https://github.com/opensearch-project/opensearch-api-specification/actions/runs/11366888933/artifacts/2063666302 API Coverage
|
Spec Test Coverage Analysis
|
Signed-off-by: Tatsuya Kawakami <43780506+hogesako@users.noreply.github.com>
d3d66f1
to
f3e6158
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more small stuff, LMK when it's ready! Thanks!
@dblock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry one more nit. It should say "Returns" in the description and let's split the test file.
Thanks for opening opensearch-project/OpenSearch#16334.
spec/namespaces/snapshot.yaml
Outdated
@@ -383,7 +383,7 @@ components: | |||
type: object | |||
properties: | |||
accepted: | |||
description: Equals `true` if the snapshot was accepted. Present when the request had `wait_for_completion` set to `false` | |||
description: Return `true` if the snapshot was accepted. Present when the request had `wait_for_completion` set to `false`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: Return `true` if the snapshot was accepted. Present when the request had `wait_for_completion` set to `false`. | |
description: Returns `true` if the snapshot was accepted. Present when the request had `wait_for_completion` set to `false`. |
spec/namespaces/snapshot.yaml
Outdated
@@ -427,10 +427,11 @@ components: | |||
schema: | |||
type: object | |||
properties: | |||
accepted: | |||
description: Return `true` if the restore was accepted. Present when the request had `wait_for_completion` set to `false`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description: Return `true` if the restore was accepted. Present when the request had `wait_for_completion` set to `false`. | |
description: Returns `true` if the restore was accepted. Present when the request had `wait_for_completion` set to `false`. |
status: 200 | ||
payload: | ||
accepted: true | ||
- synopsis: Wait finish async restore. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should live in its own file, so restore.yaml
and recovery.yaml
where the snapshot would be a prologue. This way you don't need multiple-paths-detected
warning suppression and the sample can be used in a separate documentation page for _recovery
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following error occurs when a snapshot is deleted in the epilogue immediately after an asynchronous restore.
ERROR EPILOGUES
ERROR DELETE /_snapshot/{repository}/{snapshot} ([my-fs-repository:my-test-snapshot/KIVGLRXyR168qOKeAS1sIw] cannot delete snapshot during a restore in progress in [RestoreInProgress[{9gz8AVvDRPm9e2ZU8Gdw9A}{my-fs-repository:my-test-snapshot/KIVGLRXyR168qOKeAS1sIw}]])
Therefore, I placed the test for the _recovery endpoint in the chapters to wait for the restore to complete(response cannot be specified in epilogue).
I would be grateful if you could let me know if there is a better method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can leave it like this for now, no big deal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please open an issue describing this? I think epilogues should be able to deal with the response, too.
Signed-off-by: Tatsuya Kawakami <43780506+hogesako@users.noreply.github.com>
f460d47
to
c483acb
Compare
Description
Fixed snapshot restore endpoint when wait_for_completion is false.
Also fixed _recovery endpoint needed for testing when wait_for_completion is false.
Issues Resolved
None
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.