Skip to content
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

clarify where OCI-Chunk-Min-Length response headers are expected #481

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

mvdan
Copy link
Contributor

@mvdan mvdan commented Oct 13, 2023

(see commit message)

The first section speaks about a chunked upload with three stages
of HTTP requests (POST, PATCH, PUT), so the wording "the response"
is ambiguous as to which one of the three requests it's for.

The conformance tests seem to imply POST, and that is what makes
the most sense to me - if the server only gives the minimum
after the first PATCH or PUT, the client might have already written
chunks which are too small without realising.

Another bit of the spec talks about the same header,
but refers explicitly to the PUT response of a chunked upload.
This again doesn't feel right: I think POST was meant instead.
Giving the minimum as part of the final PUT response is pointless,
since the client isn't writing any more chunks after that point.

Signed-off-by: Daniel Martí <[email protected]>
Copy link
Contributor

@sudo-bmitch sudo-bmitch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for fixing that.

@rogpeppe
Copy link
Contributor

From a practical point of view, I suspect the GET response to find the current offset should also return the chunk length, to better support stateless client resumption of uploads, but I've no idea if that's actually a current convention or not.

@sudo-bmitch
Copy link
Contributor

The idea of setting this on the POST was that it's the first request, before any PATCH requests that would exceed the size. A client doing a chunked upload should use this for all subsequent requests of that blob.

@mvdan
Copy link
Contributor Author

mvdan commented Oct 25, 2023

Should I do anything else to get this tiny clarification merged? Hopefully eight reviews aren't actually necessary :)

@sudo-bmitch
Copy link
Contributor

Should I do anything else to get this tiny clarification merged? Hopefully eight reviews aren't actually necessary :)

It just needs a second maintainer to approve. Copying the commit message into the PR may get more attention.

@sudo-bmitch sudo-bmitch added this to the v1.1.0 milestone Oct 25, 2023
Copy link
Member

@mikebrow mikebrow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jdolitsky jdolitsky merged commit 9317d9b into opencontainers:main Nov 30, 2023
5 checks passed
@jdolitsky jdolitsky mentioned this pull request Jan 11, 2024
8 tasks
@sudo-bmitch sudo-bmitch mentioned this pull request Feb 1, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants