-
Notifications
You must be signed in to change notification settings - Fork 362
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
Add byte range support to OpenAPI (server, spec and generated clients) #4623
Conversation
closes #4624 |
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 - require an issue to cover by test
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.
Neat stuff! I think we had a user request for this a while back, but couldn't find it.
headers: | ||
Content-Length: | ||
schema: | ||
type: integer | ||
format: int64 | ||
Content-Range: | ||
schema: | ||
type: string | ||
pattern: '^bytes=((\d*-\d*,? ?)+)$' | ||
Last-Modified: | ||
schema: | ||
type: string | ||
ETag: | ||
schema: | ||
type: string | ||
Content-Disposition: | ||
schema: | ||
type: string |
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.
If we can easily share the schemata for the parts shared with 200, it would be great. But not worth making a great effort for that.
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.
Not really sure how to do that.. I can try in a different PR (but not guaranteeing anything :))
pkg/api/controller_test.go
Outdated
t.Fatal(err) | ||
} | ||
if resp.HTTPResponse.StatusCode != http.StatusPartialContent { | ||
t.Fatalf("GetObject() status code %d, expected %d", resp.HTTPResponse.StatusCode, http.StatusPartialContent) |
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.
If we can make this and most or all following errors t.Errorf
, the added error messages might greatly aid debugging if/when this test fails.
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.
Agreed. Changed this and adjacent get_object
tests to avoid scope creep for this PR.. we might want to somehow lint for this..
Context: trying to read parquet footer from Pandas using the Python SDK, I discovered I can't read the Parquet footer since the API does not support byte ranges