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

Add support for object change notification to storage #357

Closed
tseaver opened this issue Nov 8, 2014 · 8 comments
Closed

Add support for object change notification to storage #357

tseaver opened this issue Nov 8, 2014 · 8 comments
Assignees
Labels
api: storage Issues related to the Cloud Storage API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@tseaver
Copy link
Contributor

tseaver commented Nov 8, 2014

See: https://cloud.google.com/storage/docs/object-change-notification

E.g., we could add a watch() method to Bucket, which would register the notification URL and return an instance of a new Channel class: that instance would have a close() method which would turn off the notifications.

@tseaver tseaver added type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. api: storage Issues related to the Cloud Storage API. labels Nov 8, 2014
@tseaver
Copy link
Contributor Author

tseaver commented Nov 8, 2014

Supporting OCN is a prerequisite to doing "safe" caching of bucket keys, as suggested in #19.

@tseaver
Copy link
Contributor Author

tseaver commented Jan 30, 2015

@jgeewax can you give us a feel for how important this issue (and #19) are? Should they be blockers for Storage M1?

@dhermes
Copy link
Contributor

dhermes commented Jan 30, 2015

FWIW, there are 34 methods in storage and this is one of them. This would target storage.channels.stop and storage.objects.watchAll.


Can move this elsewhere, but is a list of the other 32 methods, not all of which we support

Each of the 5 resources

  • buckets
  • bucketAccessControls
  • objects
  • objectAccessControls
  • defaultObjectAccessControls

have the 6 verbs insert, get, list, update, patch, delete and in addition there is a way to concatenate objects and to copy them

  • storage.objects.compose
  • storage.objects.copy

@tseaver
Copy link
Contributor Author

tseaver commented Jan 30, 2015

@dhermes, #19 was a request for a way to cache all the blob IDs in a bucket: I have the sense that we cannot "safely" provide that feature without having a way to invalidate the cache, which requires the storage.objects.watchAll API (and therefore storage.channels.stop).

@dhermes
Copy link
Contributor

dhermes commented Jan 30, 2015

Yes the "get all keys" / "get all objects" concept is not something that really applies to a mature application (one with more than a few thousand objects). As for the people "just getting started", the two HTTP requests won't be such a big deal. What's more, we shouldn't be encouraging people to get a list of "all objects" locally; they should only use what they need (e.g. for serving a request for a signed-in user).

@jgeewax
Copy link
Contributor

jgeewax commented Jan 30, 2015

I think this one should probably not be a total blocker for a 1.0 release, but I really like the API that @tseaver suggests. It makes sample code look like:

bucket = storage.get_bucket('...')

# Set up a 'watch' on the bucket (ie, tell it to ping a URL when things happen):
channel = bucket.watch('http://...', channel_id='my-magical-channel')
channel2 = bucket.watch('http://...')

# Stop notifications..
channel.close()
channel2.close()

# Stop all notifications (can we do this?)
# Is this the right name? Maybe bucket.get_notification_channels() ?
channels = bucket.get_channels()
for channel in channels:
  channel.close()

# Get a channel by ID and stop those notifications.
# Maybe bucket.get_notification_channel() ?
channel = bucket.get_channel('my-magical-channel')
channel.close()

@jgeewax jgeewax added this to the Storage Stable milestone Jan 30, 2015
@dhermes
Copy link
Contributor

dhermes commented Feb 10, 2015

Based on "I think this one should probably not be a total blocker for a 1.0 release" I'm moving Stable -> Future.

@lukesneeringer lukesneeringer added the priority: p2 Moderately-important priority. Fix may not be included in next release. label Apr 19, 2017
@lukesneeringer
Copy link
Contributor

Hello,
One of the challenges of maintaining a large open source project is that sometimes, you can bite off more than you can chew. As the lead maintainer of google-cloud-python, I can definitely say that I have let the issues here pile up.

As part of trying to get things under control (as well as to empower us to provide better customer service in the future), I am declaring a "bankruptcy" of sorts on many of the old issues, especially those likely to have been addressed or made obsolete by more recent updates.

My goal is to close stale issues whose relevance or solution is no longer immediately evident, and which appear to be of lower importance. I believe in good faith that this is one of those issues, but I am scanning quickly and may occasionally be wrong. If this is an issue of high importance, please comment here and we will reconsider. If this is an issue whose solution is trivial, please consider providing a pull request.

Thank you!

urshala pushed a commit to urshala/google-cloud-python that referenced this issue Jan 17, 2020
add new LockableFileSystemTokenBackend example
parthea added a commit that referenced this issue Jun 4, 2023
- Illustrates how to call `review_document()` to send a processed document to Human in the Loop (HITL)

Co-authored-by: Anthonios Partheniou <[email protected]>
parthea added a commit that referenced this issue Jun 4, 2023
* chore(deps): update all dependencies

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* revert

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <[email protected]>
parthea pushed a commit that referenced this issue Jun 4, 2023
- [ ] Regenerate this pull request now.

PiperOrigin-RevId: 472772457

Source-Link: googleapis/googleapis@855b74d

Source-Link: googleapis/googleapis-gen@b64b1e7
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjY0YjFlN2RhM2UxMzhmMTVjYTM2MTU1MmVmMDU0NWU1NDg5MWI0ZiJ9
vchudnov-g pushed a commit that referenced this issue Sep 20, 2023
* Added Update Intent Snippet and Test

* Deleted Setting Env Vars

* Fixed Lint Issues

* Fixed Lint and Build Issue

* Fixed Build Issue

* Changed tests to pytests

* Removed delete and create agent from test

* Fixed Import Order

* Deleted unused import

* Removed Language from update_intent Snippet

* Added copyright

* Changed intent name to random name

* delete intent after testing

* fix test

* remove contains

* Added Create Intent

* fix lint

Co-authored-by: Anthonios Partheniou <[email protected]>
parthea pushed a commit that referenced this issue Sep 22, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea added a commit that referenced this issue Sep 22, 2023
fix(deps): require proto-plus>=1.15.0
parthea added a commit that referenced this issue Sep 22, 2023
* feat: increase timeout of RPC methods to 20s for v2
feat: add YAML config for GetLocation and ListLocation for v2
feat: add UploadQueueYaml, BufferTask RPC method for CloudTasks service for v2beta2
feat: set deadline for GetLocation, ListLocations and UploadQueueYaml RPCs for v2beta2
feat: add BufferTask RPC method for CloudTasks service for v2beta3
feat: add YAML config for GetLocation and ListLocations for v2beta3

PiperOrigin-RevId: 548738528

Source-Link: googleapis/googleapis@4d98ffc

Source-Link: googleapis/googleapis-gen@183d6bc
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTgzZDZiYzRlZTNjMTg5MGIxZDI0ZjlkYzg1NTA0MWY0OTdkNWQ1YiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* docs: minor formatting

PiperOrigin-RevId: 550624166

Source-Link: googleapis/googleapis@ff73e5d

Source-Link: googleapis/googleapis-gen@7254cdd
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzI1NGNkZDU3MWVjMzBiNzgxYjhiMDc1NTBiZDAyOGUyODY5MDc4MSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <[email protected]>
parthea pushed a commit that referenced this issue Sep 22, 2023
* chore: Update gapic-generator-python to v1.8.2

PiperOrigin-RevId: 504289125

Source-Link: googleapis/googleapis@38a48a4

Source-Link: googleapis/googleapis-gen@b2dc226
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjJkYzIyNjYzZGJlNDdhOTcyYzhkOGMyZjhhNGRmMDEzZGFmZGNiYyJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea added a commit that referenced this issue Oct 21, 2023
* chore(deps): update dependency google-cloud-storage to v2.1.0

* add pin for google-cloud-storage for py36

* remove pin for py36

* fix typo

Co-authored-by: Anthonios Partheniou <[email protected]>
parthea added a commit that referenced this issue Oct 21, 2023
* chore(deps): update dependency pytest to v7.2.0

* add missing test dependency `py`

Co-authored-by: Anthonios Partheniou <[email protected]>
parthea pushed a commit that referenced this issue Oct 21, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this issue Oct 21, 2023
…pprove] (#357)

Source-Link: https://togithub.com/googleapis/synthtool/commit/e3a1277ac35fc88c09db1930533e24292b132ced
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:452901c74a22f9b9a3bd02bce780b8e8805c97270d424684bff809ce5be8c2a2
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. priority: p2 Moderately-important priority. Fix may not be included in next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

4 participants