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

fix: predefinedACL replaces existing ACL in object patch/update #352

Merged
merged 2 commits into from
May 26, 2022

Conversation

cojenco
Copy link
Contributor

@cojenco cojenco commented May 26, 2022

Fixes #351

PredefinedACL replaces the existing object ACL in gRPC.UpdateObject, object.update and object.patch operations

  • Tests pass
  • Appropriate changes to README are included in PR

@codecov
Copy link

codecov bot commented May 26, 2022

Codecov Report

Merging #352 (fdfd86a) into main (0036539) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head fdfd86a differs from pull request most recent head d86d9bb. Consider uploading reports for the commit d86d9bb to get more accurate results

@@            Coverage Diff             @@
##             main     #352      +/-   ##
==========================================
- Coverage   92.58%   92.56%   -0.02%     
==========================================
  Files          51       51              
  Lines        8101     8108       +7     
==========================================
+ Hits         7500     7505       +5     
- Misses        601      603       +2     
Flag Coverage Δ
unittests 92.56% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
gcs/object.py 97.97% <100.00%> (ø)
testbench/grpc_server.py 99.49% <100.00%> (-0.51%) ⬇️
tests/test_grpc_server.py 99.85% <100.00%> (+<0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0036539...d86d9bb. Read the comment docs.

@cojenco cojenco marked this pull request as ready for review May 26, 2022 17:38
@cojenco cojenco requested review from a team and coryan as code owners May 26, 2022 17:38
@@ -510,6 +510,17 @@ def UpdateObject(self, request, context):
if "metadata" in request.update_mask.paths:
blob.metadata.metadata.clear()
blob.metadata.metadata.update(request.object.metadata)
# Manually handle PredefinedACL.
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: do we spell that predefinedACL ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thanks! Losing track of all the different cases

@cojenco cojenco merged commit c2f0706 into googleapis:main May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PredefinedACL replaces existing ACL in object patch/update
2 participants