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 — Cloud storage is missing 'compose' functionality · Issue #1982 · googleapis/google-cloud-python

Cloud storage is missing 'compose' functionality #1982

New issue
Copy link
New issue
Copy link
Closed
Closed
Cloud storage is missing 'compose' functionality#1982
Copy link
Assignees
tseaver
Labels
api: storageIssues related to the Cloud Storage API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Description

@theacodes
theacodes
opened on Jul 13, 2016
Issue body actions
No description provided.

Activity

  1. theacodes
    added
    api: storageIssues related to the Cloud Storage API.
    on Jul 13, 2016
  2. daspecster commented on Jul 13, 2016

    @daspecster
    daspecster
    on Jul 13, 2016
    Contributor
    More actions

    https://cloud.google.com/storage/docs/composite-objects

  3. theacodes commented on Jul 13, 2016

    @theacodes
    theacodes
    on Jul 13, 2016
    ContributorAuthor
    More actions

    Thanks, @daspecster. This is important so we can write usage samples for gcloud-python that have feature parity with the google-api-python-client samples.

    Reacted by Thomas Schultz
  4. tseaver commented on Jul 14, 2016

    @tseaver
    tseaver
    on Jul 14, 2016
    Contributor
    More actions

    @jonparrott Can you clarify whether the compose request is intended only to create a new object, or whether it might replace the content of an existing one? For instance, the docs show two optional query parameters, ifGenerationMatch and ifMetagenerationMatch, which don't make sense for new objects, but the description of the API says, "Concatenates a list of existing objects into a new object."

    Also, the request body example has a top-level contentType key which is not documented below it, and which would appear to duplicate the same field from the destination resource.

  5. theacodes commented on Jul 14, 2016

    @theacodes
    theacodes
    on Jul 14, 2016
    ContributorAuthor
    More actions

    @tseaver our current sample creates a new object from two existing objects.

  6. tseaver commented on Jul 14, 2016

    @tseaver
    tseaver
    on Jul 14, 2016
    Contributor
    More actions

    @jonparrott Thanks for the example. I imagine it would look something like this gist, which assumes that compose is an operation on our Bucket class, taking the destination name, a list of our Blob objects as the sources, and a content-type.

    is there somebody we should loop in to answer my questions about the API docs?

  7. theacodes commented on Jul 14, 2016

    @theacodes
    theacodes
    on Jul 14, 2016
    ContributorAuthor
    More actions

    is there somebody we should loop in to answer my questions about the API docs?

    @jgeewax do we have a particular eng contact for GCS?

    which assumes that compose is an operation on our Bucket class, taking the destination name, a list of our Blob objects as the sources, and a content-type.

    That could work, it could also be an operation on a blob, which would make it on parity with the API (it's an operation on the object resource):

    blob = bucket.blob('composed-object')
    blob.compose(part_one, part_two)
    

    It's up to you, I think either way is fine.

  8. tseaver commented on Jul 14, 2016

    @tseaver
    tseaver
    on Jul 14, 2016
    Contributor
    More actions

    @jonparrott I considered that option: if the API is actually supposed to allow replacing the contents of an existing Object with the composed media, that would definitely be a better spelling. If it can only be used to create a new Object, then making it an operation on the Bucket seems cleaner (I just updated my gist to show bucket.compose() returning the new instance).

  9. jgeewax commented on Jul 14, 2016

    @jgeewax
    jgeewax
    on Jul 14, 2016
    Contributor
    More actions

    @Capstan is our GCS go-to person :)

    On Thu, Jul 14, 2016 at 2:23 PM, Tres Seaver [email protected]
    wrote:

    @jonparrott https://github.com/jonparrott I considered that option: if
    the API is actually supposed to allow replacing the contents of an existing
    Object with the composed media, that would definitely be a better
    spelling. If it can only be used to create a new Object, then making it
    an operation on the Bucket seems cleaner (I just updated my gist to show
    bucket.compose() returning the new instance).

    —
    You are receiving this because you were mentioned.
    Reply to this email directly, view it on GitHub
    #1982 (comment),
    or mute the thread
    https://github.com/notifications/unsubscribe/AAG5IElgavVoAqXrtvEbQgVk5zaXBnsdks5qVn6VgaJpZM4JLrp8
    .

  10. theacodes commented on Jul 14, 2016

    @theacodes
    theacodes
    on Jul 14, 2016
    ContributorAuthor
    More actions

    @tseaver makes sense. I think you can append to an existing blob, but @Capstan will have to verify.

  11. theacodes
    added
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    blocks-docs-samples
    on Jul 14, 2016
  12. tseaver commented on Jul 18, 2016

    @tseaver
    tseaver
    on Jul 18, 2016
    Contributor
    More actions

    @jonparrott speaking of samples, WDYT of keeping them in this repository, so that we can use them within the Sphinx docs / docstrings, like the ones we have for pubsub and bigquery. Then we can arrange to test / fix them as they break.

  13. theacodes commented on Jul 18, 2016

    @theacodes
    theacodes
    on Jul 18, 2016
    ContributorAuthor
    More actions

    @tseaver it's be exhaustively discussed. The samples in python-docs-samples are samples included from documentation on cloud.google.com. This sometimes overlaps with samples here, especially for the really basic use cases, but often is more illustrative on how to accomplish a task with the service rather than just use the API.

  14. tseaver commented on Jul 18, 2016

    @tseaver
    tseaver
    on Jul 18, 2016
    Contributor
    More actions

    @jonparrott OK. How do you deal with drift?

  15. theacodes commented on Jul 18, 2016

    @theacodes
    theacodes
    on Jul 18, 2016
    ContributorAuthor
    More actions

    Tests, tests, and more tests. We also optimistically update dependencies and fix as needed.

  16. tseaver commented on Jul 18, 2016

    @tseaver
    tseaver
    on Jul 18, 2016
    Contributor
    More actions

    @jonparrott Do you have a webhook we should be poking from this repo to trigger those tests for the Python examples?

  17. theacodes commented on Jul 18, 2016

    @theacodes
    theacodes
    on Jul 18, 2016
    ContributorAuthor
    More actions

    We have nightly tests and an automated dependency checker (which right now we're behind on for reasons).

  18. tseaver commented on Oct 3, 2016

    @tseaver
    tseaver
    on Oct 3, 2016
    Contributor
    More actions

    @Capstan can you verify whether the compose operation always creates a new object, or might be used to append to an existing one?

  19. Capstan commented on Oct 3, 2016

    @Capstan
    Capstan
    on Oct 3, 2016
    More actions

    It logically always creates a new object. That said, creating a new object on top of an old object overwrites the old object, so you can do an extremely limited mimic of append by writing a separate object and composing the original and the separate object with a destination of the original object. This matters more if you have versioning turned on, as the old version will stick around.

  20. tseaver commented on Oct 4, 2016

    @tseaver
    tseaver
    on Oct 4, 2016
    Contributor
    More actions

    @Capstan thanks for the clarification.

  21. tseaver
    self-assigned this
    on Oct 5, 2016
  22. tseaver
    closed this as completedin #2506on Oct 6, 2016
  23. richkadel
    added a commit that references this issue on May 6, 2017

    Add 'Blob.compose' API wrapper method.

    This issue will close once commit 48be505 is merged into the 'master' branch.
    48be505
  24. parthea
    added 2 commits that reference this issue on Mar 6, 2026

    chore(deps): update all dependencies (#1982)

    9af9294

    Add 'Blob.compose' API wrapper method.

    ae5beb8
  25. parthea
    added a commit that references this issue on Apr 1, 2026

    perf: Faster session startup by defering anon dataset fetch (#1982)

    c93b8c5
  26. parthea
    added a commit that references this issue on Sep 8, 2026

    docs: migrate code from googleapis/python-bigquery (#18303)

    23f9a74
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @tseaver
    tseaver

Labels

api: storageIssues related to the Cloud Storage API.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.