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): enable several tests for grpc + related fixes #6827

Merged
merged 5 commits into from Oct 12, 2022

Conversation

BrennaEpp
Copy link
Contributor

Enables tests: BucketPolicyOnly, ACL, PredefinedACLs

Fixes: gets all fields in GetBucket and GetObject (were missing ACLs); makes sure ACL is sent when ACL is not sent but PredefinedACL is; initializes Bucket_IamConfig (was causing segfault); sends UBLA field when disabled in an update

Additionally cleans up acl checking in tests to use the same method

Enables tests: BucketPolicyOnly, ACL, PredefinedACLs

Fixes: gets all fields in GetBucket and GetObject (were missing ACLs); makes sure ACL is sent when ACL is not sent but PredefinedACL is; initializes Bucket_IamConfig (was causing segfault); sends UBLA field when disabled in an update

Additionally cleans up acl checking in tests to use the same method
@BrennaEpp BrennaEpp requested review from a team as code owners October 7, 2022 18:22
@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 Oct 7, 2022
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.

Nice fixes!

storage/bucket.go Outdated Show resolved Hide resolved
@@ -522,7 +521,7 @@ func (c *grpcStorageClient) UpdateObject(ctx context.Context, bucket, object str
}
// Note: This API currently does not support entites using project ID.
// Use project numbers in ACL entities. Pending b/233617896.
if uattrs.ACL != nil {
if uattrs.ACL != nil || len(uattrs.PredefinedACL) > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm surprised that this is necessary for PredefinedACL given how it is set in L485

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This line is to make sure the update mask contains something so we can send the request

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 guess this is safe because if you specify a PredefinedACL, you are overwriting the existing ACLs anyway.

@tritone tritone added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 12, 2022
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 12, 2022
@BrennaEpp BrennaEpp enabled auto-merge (squash) October 12, 2022 17:46
@BrennaEpp BrennaEpp merged commit c65fd1b into googleapis:main Oct 12, 2022
@BrennaEpp BrennaEpp deleted the grpc-3 branch October 12, 2022 17:58
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.

None yet

3 participants