-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Comments
Supporting OCN is a prerequisite to doing "safe" caching of bucket keys, as suggested in #19. |
FWIW, there are 34 methods in storage and this is one of them. This would target Can move this elsewhere, but is a list of the other 32 methods, not all of which we support Each of the 5 resources
have the 6 verbs
|
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). |
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() |
Based on "I think this one should probably not be a total blocker for a 1.0 release" I'm moving Stable -> Future. |
Hello, 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! |
add new LockableFileSystemTokenBackend example
- Illustrates how to call `review_document()` to send a processed document to Human in the Loop (HITL) Co-authored-by: Anthonios Partheniou <[email protected]>
* 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]>
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 472772457 Source-Link: googleapis/googleapis@855b74d Source-Link: googleapis/googleapis-gen@b64b1e7 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjY0YjFlN2RhM2UxMzhmMTVjYTM2MTU1MmVmMDU0NWU1NDg5MWI0ZiJ9
* 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]>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
fix(deps): require proto-plus>=1.15.0
* 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]>
* 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>
* 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]>
* chore(deps): update dependency pytest to v7.2.0 * add missing test dependency `py` Co-authored-by: Anthonios Partheniou <[email protected]>
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
…pprove] (#357) Source-Link: https://togithub.com/googleapis/synthtool/commit/e3a1277ac35fc88c09db1930533e24292b132ced Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:452901c74a22f9b9a3bd02bce780b8e8805c97270d424684bff809ce5be8c2a2
See: https://cloud.google.com/storage/docs/object-change-notification
E.g., we could add a
watch()
method toBucket
, which would register the notification URL and return an instance of a newChannel
class: that instance would have aclose()
method which would turn off the notifications.The text was updated successfully, but these errors were encountered: