-
Notifications
You must be signed in to change notification settings - Fork 78
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#createDefaultAcl & GrpcStorageImpl#updateDefaultAcl #1806
Conversation
db4e8ff
to
8fd605b
Compare
909faf5
to
da718a5
Compare
.map(codecs.objectAcl()::decode); | ||
|
||
return first.orElseThrow( | ||
() -> new StorageException(404, "Acl update call success, but not in response")); |
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.
When would this occur?
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.
Hopefully never, but since we have to search for the updated acl in the response, if the response somehow doesn't included the updated acl we need to signal that somehow. 404 here doesn't feel totally correct, but I'm not sure 500 is better. What do you think?
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.
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.
I spoke with @frankyn offline, we came to the consensus that instead of returning an HTTP status code here, insead we will return undefined 0
to signal that it's purely a client side issue, not any system issue.
da718a5
to
cb0f538
Compare
google-cloud-storage/src/main/java/com/google/cloud/storage/GrpcStorageImpl.java
Show resolved
Hide resolved
google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITAccessTest.java
Show resolved
Hide resolved
…nd in the update response
No description provided.