-
Notifications
You must be signed in to change notification settings - Fork 1
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
DM-34188: Use Client.bucket and not Client.get_bucket #11
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11 +/- ##
=======================================
Coverage 87.22% 87.22%
=======================================
Files 27 27
Lines 4367 4367
Branches 890 890
=======================================
Hits 3809 3809
Misses 413 413
Partials 145 145 ☔ View full report in Codecov by Sentry. |
@@ -110,7 +110,7 @@ def client(self) -> storage.Client: | |||
@property | |||
def bucket(self) -> storage.Bucket: | |||
if self._bucket is None: | |||
self._bucket = self.client.get_bucket(self.netloc, retry=_RETRY_POLICY) | |||
self._bucket = self.client.bucket(self.netloc) |
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 agree that this line should not require any permissions (since Client.bucket
does not perform a remote operation). However, I don't know enough about the overall class to say whether it satisfies the requirements of DM-34188.
Would it be possible to set up a test framework that has carefully controlled permissions? You mentioned that this version works on IDF, but you also said the old version worked there.
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.
@rra if this fix looks right to you I can merge it and see if that allows you to lower your permissions request.
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.
Sounds good to me. I'm happy to test the permission change again with this change.
0d10d70
to
820d4dd
Compare
820d4dd
to
ff8045d
Compare
Deriving Blobs from a bucket obtained by get_bucket seems to require more permissions than using a blob obtained from Client.bucket().
Deriving Blobs from a bucket obtained by get_bucket seems
to require more permissions than using a blob obtained
from Client.bucket().
Checklist
doc/changes