-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
openapi definitions for shard shashots API #2571
Conversation
generall
commented
Sep 2, 2023
- OpenAPI definitions
- OPenAPI tests
- minor consistency changes
response = request_with_validation( | ||
api='/collections/{collection_name}/shards/{shard_id}/snapshots/recover', | ||
method="PUT", | ||
path_params={'shard_id': 0, 'collection_name': "somethingthatdoesnotexist"}, | ||
body={ | ||
"location": "file://localhost/whatever.snapshot", | ||
} | ||
) | ||
assert response.status_code == 404 |
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 decided to not use file://
URLs for shard snapshot recovery, and so explicitly check that locations
is either HTTP(S) URL or a plain path. file://
should return error 400.
See:
content: | ||
application/json: | ||
schema: | ||
$ref: "#/components/schemas/SnapshotRecover" |
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.
recover_shard_snapshot
uses ShardSnapshotRecover
, which is a bit different from SnapshotRecover
, because we decided not to use file://
URLs for shard snapshot API.
See:
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.
LGTM.
* openapi definitions for shard shashots API * review fixes