-
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): implement UpdateObject #6091
Conversation
@tritone @noahdietz PTAL when you have the chance. Listed 2 todo's per the pending open issues. |
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.
LGTM, please let @tritone review/Approve.
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 minor question, overall looks great!
} | ||
|
||
if uattrs.EventBasedHold != nil { | ||
o.EventBasedHold = proto.Bool(optional.ToBool(uattrs.EventBasedHold)) |
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.
Why is it necessary to pass this through proto.Bool
?
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.
The proto field is labeled with proto3_optional
, which turns primitive fields into pointers. proto.Bool
is a helper for supplying a value as a pointer when building a struct.
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.
Gotcha, I looked at the proto and I'm a bit confused why EventBasedHold
is optional while TemporaryHold
is not. Maybe a question for the service team though.
} | ||
|
||
if uattrs.EventBasedHold != nil { | ||
o.EventBasedHold = proto.Bool(optional.ToBool(uattrs.EventBasedHold)) |
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.
Gotcha, I looked at the proto and I'm a bit confused why EventBasedHold
is optional while TemporaryHold
is not. Maybe a question for the service team though.
This adds UpdateObject implementation
ObjectAttrsToUpdate
to a proto Objectfix: predefinedACL replaces existing ACL in object patch/update storage-testbench#352