Closed lgalfaso closed 1 year ago
Under the Push definition, there's a PATCH description that includes the range. I don't think that's valid to resume a partial PUT, you'd need to do it from the first request.
The Resumable Push section reads (emphasis are mine)
Company X's build servers lose connectivity to a distribution endpoint before completing an artifact layer transfer. After connectivity returns, the build server attempts to re-upload the artifact. The registry notifies the build server that the upload has already been partially attempted. The build server responds by only sending the remaining data to complete the artifact file.
Following the same naming conventions, if the build server wants to know what is the last byte that was uploaded in order to resume the upload from this point. How it is suppose to do so? Returning Range: 0-<last valid range>
is a way to inform this specific information.
The spec talks about Resumable Push but it is not clear how this should be performed. Docker API v2 spec defines that when sending a chunk in a session, if the range does not match, then the response should be of the following form
the key here being that there is
Range: 0-<last valid range>
that would tell the client about the last position written.