-
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
Phase 1 Update get_bucket to take Bucket object within Storage Client #7856
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.
LGTM once the example is updated.
>>> client = storage.Client() | ||
|
||
>>> # Set properties on a plain resource object. | ||
>>> bucket = storage.Bucket("my-bucket-name") |
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 fear that this example could lead to people thinking they have to create a Bucket object when they can just pass in a string.
This implementation is more to provide the same mechanism as reload()
is currently used, so we should indicate that somehow you got a bucket but think it might be out of date and want to reload it.
Maybe change this line to get_bucket("my-bucket-name")
, and then between this and the next call to get_bucket
, add a comment like # Time passes. Another program may have modified the bucket in the meantime, so you want to get the latest state.
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.
Modified the example as directed!
System test failure appears to be unrelated to this change.
|
Hi, we just noticed this change updating from a minor version as our code was doing |
Hi @bboe , We do our best to conform to semver, but occasionally mistakes are made. This is one of those times. This change, particularly this line https://github.com/googleapis/google-cloud-python/pull/7856/files#diff-dbb49bf7288430753b6267b849bd01bbR205 altered the argument name which broke your code :( Sorry for the randomization. Ideally this wouldn't happen, and thank you for pointing this out. This was an oversight on this change to consider this minor. |
Part of issue: #7762
@tswast
@engelke