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

Storage: include generation in Blob repr. #7789

Closed
max-sixty opened this issue Apr 23, 2019 · 0 comments · Fixed by #8423
Closed

Storage: include generation in Blob repr. #7789

max-sixty opened this issue Apr 23, 2019 · 0 comments · Fixed by #8423
Assignees
Labels
api: storage Issues related to the Cloud Storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@max-sixty
Copy link

max-sixty commented Apr 23, 2019

I added a comment here based on the generation addition to storage #7444 (comment)

I think it's worth adding an issue too - specifically because now generation defines a blob but isn't included in the repr. Meaning you can get confusing results like this:

blob
<Blob: sixty-capital-temp, tests/test_357256/blob_645776>

b2 = gcs.client(project).get_bucket(bucket).get_blob(blob.name)  # recreate 
b2
<Blob: sixty-capital-temp, tests/test_357256/blob_645776>  # same repr

blob.exists()
False

b2.exists()
True

... but b2 & blob have the same repr! Prior to the latest release, both results would have been True.
If generation were in the repr, this would be less confusing - e.g. I wouldn't have had to read the release notes to work out what was going on

@tseaver tseaver added api: storage Issues related to the Cloud Storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Apr 23, 2019
@tseaver tseaver changed the title Storage: Blobs with same repr can be different Storage: include generation in Blob repr. Apr 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants