Skip to content
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

Merged
merged 4 commits into from
Jun 1, 2022
Merged

Conversation

cojenco
Copy link
Contributor

@cojenco cojenco commented May 25, 2022

This adds UpdateObject implementation

@product-auto-label product-auto-label bot added size: l Pull request size is large. api: storage Issues related to the Cloud Storage API. labels May 25, 2022
@cojenco cojenco marked this pull request as ready for review May 26, 2022 19:40
@cojenco cojenco requested review from a team as code owners May 26, 2022 19:40
@cojenco
Copy link
Contributor Author

cojenco commented May 27, 2022

@tritone @noahdietz PTAL when you have the chance. Listed 2 todo's per the pending open issues.

Copy link
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, please let @tritone review/Approve.

Copy link
Contributor

@tritone tritone left a 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))
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Contributor

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))
Copy link
Contributor

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.

@cojenco cojenco added the automerge Merge the pull request once unit tests and other checks pass. label Jun 1, 2022
@cojenco cojenco merged commit ef2559a into googleapis:main Jun 1, 2022
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Jun 1, 2022
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: l Pull request size is large.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants