chore(storage): gRPC ComposeObject implementation#6283
chore(storage): gRPC ComposeObject implementation#6283tritone merged 6 commits intogoogleapis:mainfrom
Conversation
Adds implementation in gRPC and HTTP for client.ComposeObject as well as an emulator test. Required a bit of refactoring around method signature and params but hopefully this makes it clearer what is going on.
noahdietz
left a comment
There was a problem hiding this comment.
LGTM but was there one question?
| return nil, err | ||
| } | ||
| if req.sendCRC32C { | ||
| dstObjPb.Checksums.Crc32C = &req.dstObject.attrs.CRC32C |
There was a problem hiding this comment.
This is a no-op for compose operations; (doesn't do anything).
| srcs []composeSrcObject | ||
| predefinedACL string | ||
| encryptionKey []byte | ||
| sendCRC32C bool |
There was a problem hiding this comment.
sending crc32c doesn't do anything, noted below.
There was a problem hiding this comment.
Hmm, if so this is a bug in the current implementation. See https://github.com/googleapis/google-cloud-go/blob/main/storage/copy.go#L172 , and also where we introduced this: https://code-review.googlesource.com/c/gocloud/+/57030
There was a problem hiding this comment.
it's a bug in the current implementation; the API itself does nothing with this value. GCS validates the crc32c server side during composition
There was a problem hiding this comment.
I was incorrect, looks like crc32c should be checked if passed in the request. Approving PR, thanks for your patience @tritone
| srcs []composeSrcObject | ||
| predefinedACL string | ||
| encryptionKey []byte | ||
| sendCRC32C bool |
There was a problem hiding this comment.
I was incorrect, looks like crc32c should be checked if passed in the request. Approving PR, thanks for your patience @tritone
Adds implementation in gRPC and HTTP for client.ComposeObject
as well as an emulator test.
Required a bit of refactoring around method signature and params
but hopefully this makes it clearer what is going on.