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
fix: add preconditions and retry config support to ACL patch operationss #586
Conversation
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.
Thanks for adding these!
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.
We patch ACLs using the objectAccessControls.pach
and defaultObjectAccessControls.pach
methods, which do not AFAICT take the metageneration / generation into account: instead, they rely on the resource's Etag
for concurrency. Note the absence of the if_*_match
parameters on those docs page.
At a minimum, if the back-end docs are incomplete, and the back-end actually supports these semantics, we need to add one or more system tests which exercise them. |
@tseaver We patch ACLs here using You are right about That is actually one of the considerations why Since we are using |
My bad -- I had talked myself into "remembering" the need to back out some similar changes for ACLs in past PRs. You are indeed correct that we do not use the ACL specific APIs, and so should be free to use the |
I do think we should add a system test which exercises the new headers, though. |
…nss (googleapis#586) * add preconditions and retry config support to ACL patch operations * update existing unit tests * add unit tests * add preconditions and retry config to bucket make public/private * add preconditions and retry config to blob make public/private * update docstrings * add system tests acl with metegeneration match * revise to use permitted group email
…nss (googleapis#586) * add preconditions and retry config support to ACL patch operations * update existing unit tests * add unit tests * add preconditions and retry config to bucket make public/private * add preconditions and retry config to blob make public/private * update docstrings * add system tests acl with metegeneration match * revise to use permitted group email
…nss (googleapis#586) * add preconditions and retry config support to ACL patch operations * update existing unit tests * add unit tests * add preconditions and retry config to bucket make public/private * add preconditions and retry config to blob make public/private * update docstrings * add system tests acl with metegeneration match * revise to use permitted group email
Add preconditions and retry config support to the ACL patch operations. The PATCH API requests for ACL in python-storage utilize
storage.buckets.patch
orstorage.objects.patch
_save
/save
/save_predefined
/clear
)make_public
/make_private
)make_public
/make_private
)Note: IAM configurations storage.buckets.getIamPolicy storage.buckets.setIamPolicy are highly encouraged to control access instead
Fixes #582