-
Notifications
You must be signed in to change notification settings - Fork 10
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
Use flat file listing in zarr file browser #1394
Conversation
27482a1
to
2734955
Compare
@AlmightyYakob What is the format of the
Is there a reason that pagination doesn't work like other endpoints, with |
My bad. The format is as such: [
{
"Key": "foo/bar",
"LastModified": "2022-12-06T21:46:34.331000Z",
"Etag": "f0c0b28da13bec676d3a348d6f11dabe",
"Size": 100
}
]
Yes, S3 doesn't provide any mechanism for limit/offset pagination when listing objects, only providing a |
I think we should still provide a |
@jwodder The endpoint response has been updated to the following {
"next": "http://localhost:8000/api/zarr/357a0699-4f08-4a3b-83a7-923353379e28/files/?after=subdir%2Fa.txt&download=false&limit=1&prefix=subdir",
"results": [
{
"Key": "subdir/a.txt",
"LastModified": "2022-12-07 17:46:51.962000+00:00",
"ETag": "c560516266eb28040362e72ec278b4a2",
"Size": 8
}
]
} |
@AlmightyYakob Does the |
Yes, the zarr file deletion endpoint is unchanged. |
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 from the perspective of the API.
@AlmightyYakob There was one failure in the test against dandi/dandi-cli#1175, regarding the test of EDIT: It seems that the test in question no longer applies. However, there was another test failure I missed, in which this test fails on the second upload with a 409 and the body (prettified):
|
@AlmightyYakob The integration tests with my PR are passing now. |
@jwodder So there's no changes needed on this PR, in reference to your previous comment? |
@AlmightyYakob Right. |
45cf0a4
to
bb43403
Compare
🚀 PR was released in |
This is a simplification, and will as a result fix any zarrs with out of sync file listings (any other zarrs affected by the underlying issue to #1378).
@jwodder This is a breaking change and will require a corresponding CLI update. If anything here seem infeasible / unreasonable, please let me know.
Notable breaking changes:
zarr/{zarr_id}/files
prefix
query paramlimit
query param (default 1000)after
query param, setting it to the key of the last item in the previous listingprefix
), set thedownload
flag totrue
Head requests are still supported, and will use the provided
prefix
query param to return a presigned head URL. If the prefix is not the entire path of a file, the HEAD request against the presigned url will return a 404.