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

Blob.update() misses BlobInfo argument #234

Closed
dmitry-fa opened this issue Apr 9, 2020 · 2 comments
Closed

Blob.update() misses BlobInfo argument #234

dmitry-fa opened this issue Apr 9, 2020 · 2 comments
Assignees
Labels
api: storage Issues related to the googleapis/java-storage API. 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

@dmitry-fa
Copy link
Contributor

The Blob class declares method: public Blob update(BlobTargetOption... options)
This method is useless, it doesn't have the necessary BlobInfo parameter.
Documentation to this method mentions Storage.update(), not Blob.update().

This method should be declared as Deprecated (and deleted as soon possible)

A new method with BlobInfo parameter should be added.

@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/java-storage API. label Apr 9, 2020
@dmitry-fa dmitry-fa self-assigned this Apr 9, 2020
@dmitry-fa dmitry-fa added the type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. label Apr 9, 2020
@yoshi-automation yoshi-automation added the triage me I really want to be triaged. label Apr 10, 2020
@yoshi-automation yoshi-automation added the 🚨 This issue needs some love. label Apr 14, 2020
@frankyn frankyn added priority: p2 Moderately-important priority. Fix may not be included in next release. and removed 🚨 This issue needs some love. triage me I really want to be triaged. labels Apr 14, 2020
@frankyn
Copy link
Member

frankyn commented Apr 14, 2020

I don't agree we should deprecate this method. Closing this issue for now as I'd prefer organizing a deprecation because users may depend on this method.

An alternative would be to update documentation on how to use this method instead.

Here's an example of how to update metadata for Blob. A similar flow works with Bucket.update() as well.

    Bucket remoteBucket = storage.get("bucket-name");
    Blob remoteBlob = remoteBucket.get("test");
    remoteBlob.toBuilder().setContentType("text/plain").build().update();

@frankyn frankyn closed this as completed Apr 14, 2020
@dmitry-fa
Copy link
Contributor Author

Hi @frankyn, thanks for that example. Yes, I agree, it's not necessary to deprecate this method.
I submitted #252 to fix the spec.

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 googleapis/java-storage API. 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
3 participants