GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — add Storage.upload(Path) · Issue #179 · googleapis/java-storage

This repository was archived by the owner on Sep 25, 2026. It is now read-only.
This repository was archived by the owner on Sep 25, 2026. It is now read-only.

add Storage.upload(Path) #179

Copy link
Copy link
Closed
#269
#214
Closed
add Storage.upload(Path)#179
#269
#214
Copy link
Assignees
dmitry-fa
Labels
api: storageIssues related to the googleapis/java-storage API.priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Description

@dmitry-fa
dmitry-fa
opened on Mar 13, 2020
Issue body actions

In addition to Blob.uploadFrom() methods which require a Blob instance to be created first there should be a way to upload a resource to the storage without creating an instance of Blob:

interface Storage {
    void upload(BlobInfo blobInfo, Path path, BlobWriteOption... options);
    void upload(BlobInfo blobInfo, InputStream content, BlobWriteOption... options);
}

Implementing this feature means extending of public interface.

Activity

  1. dmitry-fa
    added
    semver: majorHint for users that this is an API breaking change.
    on Mar 13, 2020
  2. dmitry-fa
    self-assigned this
    on Mar 13, 2020
  3. product-auto-label
    added
    api: storageIssues related to the googleapis/java-storage API.
    on Mar 13, 2020
  4. dmitry-fa
    removed
    semver: majorHint for users that this is an API breaking change.
    on Mar 13, 2020
  5. yoshi-automation
    added
    triage meI really want to be triaged.
    🚨This issue needs some love.
    on Mar 14, 2020
  6. frankyn
    added
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    priority: p2Moderately-important priority. Fix may not be included in next release.
    and removed
    🚨This issue needs some love.
    triage meI really want to be triaged.
    on Mar 18, 2020
  7. dmitry-fa commented on Mar 27, 2020

    @dmitry-fa
    dmitry-fa
    on Mar 27, 2020
    ContributorAuthor
    More actions

    Extension the Storage interface is incompatible change. Such a minor feature as adding helper upload methods should not break compatibility. Instead of extending the main interface it's better to introduce a new class like StorageUtilities and put various helpers there.

  8. dmitry-fa
    closed this as completedin #214on Apr 1, 2020
  9. frankyn commented on Apr 1, 2020

    @frankyn
    frankyn
    on Apr 1, 2020
    Contributor
    More actions

    How is Storage interface change incompatible change in this case? I still think we should add the method under Storage and not create a separate helper utility.

  10. frankyn
    reopened this on Apr 1, 2020
  11. dmitry-fa commented on Apr 1, 2020

    @dmitry-fa
    dmitry-fa
    on Apr 1, 2020
    ContributorAuthor
    More actions

    Interface extension is backward incompatible change.

  12. frankyn commented on Apr 1, 2020

    @frankyn
    frankyn
    on Apr 1, 2020
    Contributor
    More actions

    We've been adding new methods to the interface for several features outside of this request. Could you clarify what you mean?

    If we move forward with the feature added in #214 it will create a fracture in developer experience. We can try to do something else, but I'd prefer Storage.upload() over a separate helper class.

    cc: @JesseLovelace @elharo @crwilcox

  13. dmitry-fa commented on Apr 1, 2020

    @dmitry-fa
    dmitry-fa
    on Apr 1, 2020
    ContributorAuthor
    More actions

    Extending interface breaks the API and requires a major version update since this API post 1.0.
    Adding upload functionality is rather a small feature, it just adds a few helper methods. I don't think it deserves a major version update. The helper class will allow to add small feature like this without breaking the API.

  14. frankyn commented on Apr 2, 2020

    @frankyn
    frankyn
    on Apr 2, 2020
    Contributor
    More actions

    I agree that this doesn't substantiate a major version bump.
    I don't agree that we should do this as a separate utility class. It is a fracture in the experience.

    What is the failure that you're hitting by updating the Storage API surface?

  15. elharo commented on Apr 2, 2020

    @elharo
    elharo
    on Apr 2, 2020
    Contributor
    More actions

    You can't add a method to an interface without breaking the API.

  16. frankyn commented on Apr 2, 2020

    @frankyn
    frankyn
    on Apr 2, 2020
    Contributor
    More actions

    I misunderstood. damn, we have breaking the API without major version bumps for a couple of years then.

    What other alternatives do we have to continue supporting requests in Storage.java? It really changes the way we execute work so I'm a bit confused.

  17. elharo commented on Apr 2, 2020

    @elharo
    elharo
    on Apr 2, 2020
    Contributor
    More actions

    There are at least 3 ways forward:

    1. Use concrete classes for new functionality.
    2. Add a new subinterface.
    3. Increment the major version.

    There's a fourth once we drop Java 7 support. Maybe some others I haven't thought of.

  18. frankyn commented on Apr 2, 2020

    @frankyn
    frankyn
    on Apr 2, 2020
    Contributor
    More actions

    Shared an internal document to help unblock the existing dev path for now. It will hold up other work as well that needs to be released this way.

  19. dmitry-fa commented on Apr 9, 2020

    @dmitry-fa
    dmitry-fa
    on Apr 9, 2020
    ContributorAuthor
    More actions

    @frankyn

    Shared an internal document

    What the document did you share?

  20. frankyn commented on Apr 9, 2020

    @frankyn
    frankyn
    on Apr 9, 2020
    Contributor
    More actions

    It's an internal document with Googlers right now. I'm sorting it out. I'll follow-up later today. Thanks for your patience @dmitry-fa

  21. frankyn commented on Apr 9, 2020

    @frankyn
    frankyn
    on Apr 9, 2020
    Contributor
    More actions

    Hi @dmitry-fa, could you send me an email at [email protected], I'm not able to find your email.

  22. dmitry-fa commented on Jun 16, 2020

    @dmitry-fa
    dmitry-fa
    on Jun 16, 2020
    ContributorAuthor
    More actions

    To move further with this issue:

    • test: update FakeStorageRpc to extend StorageRpcTestBase java-storage-nio#135 should be integrated
    • java-storage-nio should be released
  23. frankyn
    closed this as completedin #269on Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dmitry-fa
    dmitry-fa

Labels

api: storageIssues related to the googleapis/java-storage API.priority: p2Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.