Task #923
closedUpdate CLI and bindings to to use new-style upload API in story #892
0%
Description
The API changes in #892 will break the upload functionality of all existing upload commands. After #892 is completed, the CLI and bindings both need to be updated to use the new style upload API.
This should not cause the commands run to change at all except for the resume behavior which will be done by passing in --upload-id as described below.
Existing commands will be ported to the new style and will use chunking if necessary. If all chunks are received correctly, then it performs the /import_upload automatically. A separate command to import a completed upload_id will not be provided by the CLI, but a recipe will be documented where an the same file and upload_id can be specified with a different repo name and the normal upload/offset/fast-forward behavior will allow the previously uploaded content to be imported into a separate repository without much data exchanged.
If an unrecoverable error occurs, the user is shown a output of a command they can specify to attempt to restart a failed ID by upload_id. That takes the file and blindly uploads it again to that upload_id, and relies on the server to tell it the offset it should fast-forward to. Attempting to resume an upload_id that doesn't exist shows a reasonable error message to the user.
Related issues