-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
refactor(storage): move 'create_bucket' implementation from 'Bucket' to 'Client' #8604
refactor(storage): move 'create_bucket' implementation from 'Bucket' to 'Client' #8604
Conversation
…om/q-logic/google-cloud-python into redesign_client_create_bucket_7762
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.
Acking, and will review tomorrow. Thank you for your patience! |
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.
Overall LGTM, one missing parameter and a general comment on the design.
Thank you for your patience.
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 missed the technical debt with user_project in create().
https://cloud.google.com/storage/docs/json_api/v1/buckets/insert
Create supports user_project.
… into redesign_client_create_bucket_7762
…om/q-logic/google-cloud-python into redesign_client_create_bucket_7762
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.
LGTM, Thanks @IlyaFaer for your patience.
I'm not sure what's causing the coverage issue. Taking a look.
Pulling out coverage report:
After moving in the logic in Bucket.create() to Client.create_bucket(). The conditional branches in client.py are not being covered by unit tests in a similar way that bucket.py is: google-cloud-python/storage/tests/unit/test_bucket.py Lines 610 to 819 in e206be2
I'm wondering, given you've moved over implementation from Bucket to Client, the same should be done with unit tests. I also don't see the deletion of implementation from Bucket after looking at the coverage issue. |
@frankyn, that's strange a little. Bucket tests are still running, and they execute code lines in |
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 will need to update samples to use new methods before merging/releasing the deprecation. Otherwise SGTM.
No problem, I had added comment into original issue not to forget. |
Moved
Bucket.create()
implementation intoClient.create_bucket()
Towards: #7762