Skip to content

chore(storage): gRPC ComposeObject implementation#6283

Merged
tritone merged 6 commits intogoogleapis:mainfrom
tritone:grpc-compose
Jul 11, 2022
Merged

chore(storage): gRPC ComposeObject implementation#6283
tritone merged 6 commits intogoogleapis:mainfrom
tritone:grpc-compose

Conversation

@tritone
Copy link
Copy Markdown
Contributor

@tritone tritone commented Jun 30, 2022

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.

tritone added 2 commits June 29, 2022 22:22
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.
@tritone tritone requested review from a team June 30, 2022 02:39
@product-auto-label product-auto-label Bot added size: m Pull request size is medium. api: storage Issues related to the Cloud Storage API. labels Jun 30, 2022
Copy link
Copy Markdown
Contributor

@noahdietz noahdietz left a comment

Choose a reason for hiding this comment

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

LGTM but was there one question?

Comment thread storage/grpc_client.go Outdated
Comment thread storage/grpc_client.go
return nil, err
}
if req.sendCRC32C {
dstObjPb.Checksums.Crc32C = &req.dstObject.attrs.CRC32C
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a no-op for compose operations; (doesn't do anything).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

See above

Comment thread storage/grpc_client.go Outdated
Comment thread storage/client.go
srcs []composeSrcObject
predefinedACL string
encryptionKey []byte
sendCRC32C bool
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

sending crc32c doesn't do anything, noted below.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

it's a bug in the current implementation; the API itself does nothing with this value. GCS validates the crc32c server side during composition

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I was incorrect, looks like crc32c should be checked if passed in the request. Approving PR, thanks for your patience @tritone

@tritone tritone requested a review from frankyn June 30, 2022 19:33
Comment thread storage/client.go
srcs []composeSrcObject
predefinedACL string
encryptionKey []byte
sendCRC32C bool
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I was incorrect, looks like crc32c should be checked if passed in the request. Approving PR, thanks for your patience @tritone

@tritone tritone enabled auto-merge (squash) July 11, 2022 16:14
@tritone tritone merged commit 3c038ec into googleapis:main Jul 11, 2022
@tritone tritone deleted the grpc-compose branch July 12, 2022 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: storage Issues related to the Cloud Storage API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants