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

feat: implement GrpcStorageImpl#deleteDefaultAcl #1807

Merged
merged 1 commit into from
Dec 15, 2022

Conversation

BenWhitehead
Copy link
Collaborator

No description provided.

@BenWhitehead BenWhitehead requested a review from a team as a code owner December 9, 2022 20:21
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: storage Issues related to the googleapis/java-storage API. labels Dec 9, 2022
.collect(ImmutableList.toImmutableList());
if (newDefaultAcls.equals(currentDefaultAcls)) {
// we didn't actually filter anything out, no need to send an RPC, simply return false
return false;
Copy link
Member

Choose a reason for hiding this comment

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

Add a comment into the Storage interface javadocs that calls out this particular case

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

What should we add to the javadocs?

This is sort of specific to the fact that we're emulating what was previously done via a single blind RPC.

Copy link
Member

Choose a reason for hiding this comment

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

Looks like I glossed over the need to make a request to get Acl List first; Why didn't you call the RPC to delete Acl instead of querying existing bucketdefaultAcl first?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We are patching the full default acl list of the bucket.

  1. We get the full list
  2. filter out any existing acl for the specified entity
  3. If there is no change, quickly return (this line)
  4. Otherwise, create an update bucket request
  5. Send update bucket request
  6. return true if the acl is no longer in the buckets default acl from the response

Base automatically changed from grpc/defaultAcl/create to main December 14, 2022 22:41
Copy link
Member

@frankyn frankyn left a comment

Choose a reason for hiding this comment

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

Thanks for the clarification LGTM

@BenWhitehead BenWhitehead merged commit c783277 into main Dec 15, 2022
@BenWhitehead BenWhitehead deleted the grpc/defaultAcl/delete branch December 15, 2022 19: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 googleapis/java-storage API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants