refactor(storage): move 'create_bucket' implementation from 'Bucket' to 'Client'#8604
Conversation
…om/q-logic/google-cloud-python into redesign_client_create_bucket_7762
|
Acking, and will review tomorrow. Thank you for your patience! |
frankyn
left a comment
There was a problem hiding this comment.
Overall LGTM, one missing parameter and a general comment on the design.
Thank you for your patience.
frankyn
left a comment
There was a problem hiding this comment.
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
|
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 |
frankyn
left a comment
There was a problem hiding this comment.
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