-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
chore(storage): RewriteObject implementation #6313
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay, generally looks great! A few minor things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more note from the refactoring; otherwise LGTM
storage/grpc_client.go
Outdated
@@ -783,7 +783,7 @@ func (c *grpcStorageClient) RewriteObject(ctx context.Context, req *rewriteObjec | |||
if s.userProject != "" { | |||
ctx = setUserProjectMetadata(ctx, s.userProject) | |||
} | |||
if err := applyCondsProto("Copy destination", req.gen, req.conds, call); err != nil { | |||
if err := applyCondsProto("Copy destination", req.srcObject.gen, req.dstObject.conds, call); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still not correct -- you should just pass -1 for generation to indicate the latest. Passing a specific generation for a destination object is not possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same for http.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok I thought that was weird when I wrote it...switched it to defaultGen
. Is that right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup looks good now! Thanks!
* chore: release main (#6351) * test(profiler): compile busybench before running backoff test (#6375) * chore(bigquery/storage/managedwriter): augment test logging (#6373) * chore(storage): RewriteObject implementation (#6313) * chore(storage): RewriteObject implementation * address feedback * refactor source/destination object types * address feedback * address feedback * fix test * chore(main): release storage 1.24.0 (#6336) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Chris Cotter <[email protected]> * chore(internal/gapicgen): update microgen v0.31.2 (#6383) Only includes fixes to regapic generation. * test(bigquery/storage/managedwriter): relax error checking (#6385) When a user issues a large request, the response from the backend is a bare "InvalidArgument". This PR removes additional validation on information that is only attached when interrogating the backend from a known client; it's stripped in the normal case. Internal issue 239740070 was created to address the unactionable nature of the response. Fixes: #6361 * feat(firestore): adds Bulkwriter support to Firestore client (#5946) * feat: adds Bulkwriter support to Firestore client * test(storage): unflake TestIntegration_ACL (#6392) Few minor changes to make sure potentially flaky and/or eventually consistent operations for ACLs are retried appropriately. Fixes #6379 Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Amarin (Um) Phaosawasdi <[email protected]> Co-authored-by: shollyman <[email protected]> Co-authored-by: Noah Dietz <[email protected]> Co-authored-by: Chris Cotter <[email protected]> Co-authored-by: Eric Schmidt <[email protected]>
Implements the RewriteObject transport-agnostic interface methods for both HTTP and gRPC. This API is used to power the Object Copy functionality of the client.