-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Upload to gcs using go client doesn't error but uploads zero bytes #746
Comments
Was able to simulate by doing so as I mentioned in |
I can reproduce, and I think I know what the problem is. Working on a fix. Meanwhile, you can work around by setting |
I worked around with using media buffer for everything, changed a line of code in our vendor libs directory. Thanks though |
How did you do it with one line? It took me a few (https://code-review.googlesource.com/c/google-api-go-client/+/16570). |
I just ignored the EOF error.
|
That's fine. You'll do an extra call to the server for one-chunk uploads, which I try to avoid, but otherwise it should work. |
A couple of changes related the fix for single-chunk retry in https://code-review.googlesource.com/16570. - A test that exhibits the bug (zero-length data on retry). - Avoid retry when chunk size = 0 (explanation in above CL). Fixes #746. Change-Id: I139e94852fc4d842d4d51be49b8bedac6420aa7e Reviewed-on: https://code-review.googlesource.com/16571 Reviewed-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Ross Light <light@google.com>
v2.7.2-gitlab has the patch to enable MD5 checksums on top of v2.7.1. This change is done for a number of reasons: 1. To prepare for future changes in the GitLab Container Registry 2. To get the version number right (e.g. v2.7.2-gitlab instead of v2.7.1.m) 3. To make the build consistent with the one used by the cloud-native container. v2.7.3-gitlab updates the storage driver to use the latest Google SDK: https://gitlab.com/gitlab-org/container-registry/merge_requests/2 v2.7.4-gitlab fixes an issues with v2.7.3-gitlab with non-default Google credentials: https://gitlab.com/gitlab-org/container-registry/merge_requests/7 This registry upgrade hopefully will fix 0-byte upload issues: googleapis/google-cloud-go#746
Hi We are facing a issue where the uploader is uploading 0 bytes.
Per @jba comment
#724 (comment)
That goes through that path when the content being uploaded is greater than chunksize per
https://github.com/google/google-api-go-client/blob/master/storage/v1/storage-gen.go#L8751
And MediaBuffer is only created when content is greater than chunk size for resumable upload, per
https://github.com/google/google-api-go-client/blob/master/gensupport/media.go#L191
What happens on retries when it doesn't go through resumable upload ?
The text was updated successfully, but these errors were encountered: