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: str() metadata for bucket and blob #9729

Closed
frankyn opened this issue Nov 11, 2019 · 0 comments · Fixed by #9796
Closed

Storage: str() metadata for bucket and blob #9729

frankyn opened this issue Nov 11, 2019 · 0 comments · Fixed by #9796
Assignees
Labels
api: storage Issues related to the Cloud Storage API. help wanted We'd love to have community involvement on this issue. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@frankyn
Copy link
Member

frankyn commented Nov 11, 2019

Surfaced by GCS team.

The Cloud Storage library must stringify metadata sent in bucket and blob.

Here's a known issue from not doing so:

from google.cloud import storage
client = storage.Client(project="my-project")
my_bucket = client.get_bucket("my-bucket")
my_blob = my_bucket.get_blob("my-blob")
my_blob.metadata["bad"] = float('nan')
my_blob.patch()

myblob.patch() will send an unquoted NaN, which is a bug in the Cloud Storage API that the client should no longer depend on.

@frankyn frankyn added type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. api: storage Issues related to the Cloud Storage API. priority: p2 Moderately-important priority. Fix may not be included in next release. help wanted We'd love to have community involvement on this issue. labels Nov 11, 2019
@HemangChothani HemangChothani self-assigned this Nov 12, 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. help wanted We'd love to have community involvement on this issue. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants