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

Fix #161: Make 'Bucket.delete_keys' take an 'on_error' callback #312

Merged
merged 3 commits into from
Nov 3, 2014
Merged

Fix #161: Make 'Bucket.delete_keys' take an 'on_error' callback #312

merged 3 commits into from
Nov 3, 2014

Conversation

tseaver
Copy link
Contributor

@tseaver tseaver commented Oct 29, 2014

Result is a list of (key, success) tuples, one per requested key.

Fixes #161.

Addresses #160 (users who want to delete without raising can use
'Bucket.delete_keys([key])' instead of 'Bucket.delete_key(key)').

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 16778cd on tseaver:161-bucket-delete_keys-useful_result into ce7f890 on GoogleCloudPlatform:master.

for key in keys:
self.delete_key(key)
try:

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@tseaver
Copy link
Contributor Author

tseaver commented Oct 30, 2014

I'm still not sure how much we should be worrying about folks who pass thousands of keys to delete_keys. If you have reason to think that will be a common case, then something like a callback solution would be the better API design (the default callable would just re-raise the NotFoundError).

@dhermes
Copy link
Contributor

dhermes commented Oct 30, 2014

Yeah I'm cool with the callback approach, just wanted to raise some questions that might be worth considering.

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling ab0c141 on tseaver:161-bucket-delete_keys-useful_result into 03d17ba on GoogleCloudPlatform:master.

@tseaver tseaver changed the title Make 'Bucket.delete_keys' return a useful result. Fix #161: Make 'Bucket.delete_keys' return a useful result. Oct 31, 2014
Result is a list of (key, success) tuples, one per requested key.

Fixes #161.

Addresses #160 (users who want to delete without raising can use
'Bucket.delete_keys([key])' instead of 'Bucket.delete_key(key)').
If passed, the callback will be called once for each key not found,
with the offending key.
@tseaver tseaver changed the title Fix #161: Make 'Bucket.delete_keys' return a useful result. Fix #161: Make 'Bucket.delete_keys' take an on_error callback Oct 31, 2014
@tseaver tseaver changed the title Fix #161: Make 'Bucket.delete_keys' take an on_error callback Fix #161: Make 'Bucket.delete_keys' take an 'on_error' callback Oct 31, 2014
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling a0aa94b on tseaver:161-bucket-delete_keys-useful_result into * on GoogleCloudPlatform:master*.

self.delete_key(key)
except exceptions.NotFoundError:
if on_error is not None:
on_error(key)

This comment was marked as spam.

This comment was marked as spam.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling f14470f on tseaver:161-bucket-delete_keys-useful_result into * on GoogleCloudPlatform:master*.

@dhermes
Copy link
Contributor

dhermes commented Nov 1, 2014

LGTM

tseaver added a commit that referenced this pull request Nov 3, 2014
…sult

Fix #161: Make 'Bucket.delete_keys' take an 'on_error' callback
@tseaver tseaver merged commit f33e557 into googleapis:master Nov 3, 2014
@tseaver tseaver deleted the 161-bucket-delete_keys-useful_result branch November 3, 2014 18:18
@dhermes dhermes added the api: storage Issues related to the Cloud Storage API. label Dec 31, 2015
atulep pushed a commit that referenced this pull request Apr 6, 2023
atulep pushed a commit that referenced this pull request Apr 18, 2023
parthea pushed a commit that referenced this pull request Jun 4, 2023
Source-Link: googleapis/synthtool@1b71c10
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:00c9d764fd1cd56265f12a5ef4b99a0c9e87cf261018099141e2ca5158890416

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Jun 4, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Jun 4, 2023
Source-Link: googleapis/synthtool@82f5cb2
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:5d8da01438ece4021d135433f2cf3227aa39ef0eaccc941d62aa35e6902832ae

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Jun 4, 2023
…pprove] (#312)

Source-Link: https://togithub.com/googleapis/synthtool/commit/e3a1277ac35fc88c09db1930533e24292b132ced
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:452901c74a22f9b9a3bd02bce780b8e8805c97270d424684bff809ce5be8c2a2
parthea pushed a commit that referenced this pull request Jun 4, 2023
Source-Link: https://togithub.com/googleapis/synthtool/commit/92006bb3cdc84677aa93c7f5235424ec2b157146
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:2e247c7bf5154df7f98cce087a20ca7605e236340c7d6d1a14447e5c06791bd6
parthea pushed a commit that referenced this pull request Jun 4, 2023
Source-Link: googleapis/synthtool@7197a00
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:c43f1d918bcf817d337aa29ff833439494a158a0831508fda4ec75dc4c0d0320

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Jun 4, 2023
Source-Link: googleapis/synthtool@06e8279
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:b3500c053313dc34e07b1632ba9e4e589f4f77036a7cf39e1fe8906811ae0fce
parthea pushed a commit that referenced this pull request Jul 6, 2023
* chore: use gapic-generator-python 0.65.2

PiperOrigin-RevId: 444333013

Source-Link: googleapis/googleapis@f91b6cf

Source-Link: googleapis/googleapis-gen@16eb360
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTZlYjM2MDk1YzI5NGU3MTJjNzRhMWJmMjM1NTA4MTdiNDIxNzRlNSJ9

* 🦉 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 pushed a commit that referenced this pull request Aug 15, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea added a commit that referenced this pull request Sep 20, 2023
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
parthea pushed a commit that referenced this pull request Sep 20, 2023
Source-Link: https://togithub.com/googleapis/synthtool/commit/cb960373d12d20f8dc38beee2bf884d49627165e
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:2d816f26f728ac8b24248741e7d4c461c09764ef9f7be3684d557c9632e46dbd
vchudnov-g pushed a commit that referenced this pull request Sep 20, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Sep 22, 2023
Source-Link: https://togithub.com/googleapis/synthtool/commit/30bd01b4ab78bf1b2a425816e15b3e7e090993dd
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:9bc5fa3b62b091f60614c08a7fb4fd1d3e1678e326f34dd66ce1eefb5dc3267b
parthea added a commit that referenced this pull request Sep 22, 2023
* chore: update to gapic-generator-python 1.5.0

feat: add support for `google.cloud.<api>.__version__`
PiperOrigin-RevId: 484665853

Source-Link: googleapis/googleapis@8eb249a

Source-Link: googleapis/googleapis-gen@c8aa327
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzhhYTMyN2I1ZjQ3ODg2NWZjM2ZkOTFlM2MyNzY4ZTU0ZTI2YWQ0NCJ9

* 🦉 Updates from OwlBot post-processor

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

* feat: add APIs for GKE Control Plane Logs

---
feat: GKE cluster's control plan/node-pool network isolation

Users now can change the network isolation for your public cluster's control plane.
By default, when a new public cluster is created, GKE assigns a public IP address (external endpoint) to the control plane and provisions
public nodes. New APIs allows to change cluster network isolation of the control plane and/or node-pool from the internet

---
feat: add nodeconfig resource_labels api

---
feat: add API to enable GKE Gateway controller
PiperOrigin-RevId: 486164143

Source-Link: googleapis/googleapis@e4a656d

Source-Link: googleapis/googleapis-gen@9e757e1
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOWU3NTdlMWQ3MTcxZTFlOTJiZjRkYWU1NDhhMzg1NjNjZGQ0ZmI2NSJ9

* 🦉 Updates from OwlBot post-processor

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

* feat: add APIs for GKE Control Plane Logs

---
feat: GKE cluster's control plan/node-pool network isolation

Users now can change the network isolation for your public cluster's control plane.
By default, when a new public cluster is created, GKE assigns a public IP address (external endpoint) to the control plane and provisions
public nodes. New APIs allows to change cluster network isolation of the control plane and/or node-pool from the internet

---
feat: add nodeconfig resource_labels api

---
feat: add API to enable GKE Gateway controller
PiperOrigin-RevId: 486164478

Source-Link: googleapis/googleapis@30e2c3b

Source-Link: googleapis/googleapis-gen@73ec334
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzNlYzMzNDg5OTBmYjMwOGQzYjYwMGEwOTQwYWU4NTJkNDcyNDdlZSJ9

* 🦉 Updates from OwlBot post-processor

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

* update version in gapic_version.py

* add .release-please-manifest.json with correct version

* add owlbot.py to exclude generated gapic_version.py

* set manifest to true in .github/release-please.yml

* add release-please-config.json

* chore: Update to gapic-generator-python 1.6.0

feat(python): Add typing to proto.Message based class attributes

feat(python): Snippetgen handling of repeated enum field

PiperOrigin-RevId: 487326846

Source-Link: googleapis/googleapis@da380c7

Source-Link: googleapis/googleapis-gen@61ef576
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjFlZjU3NjJlZTY3MzFhMGNiYmZlYTIyZmQwZWVjZWU1MWFiMWM4ZSJ9

* 🦉 Updates from OwlBot post-processor

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

* feat: new APIs added to reflect updates to the filestore service

- Add ENTERPRISE Tier
- Add snapshot APIs: RevertInstance, ListSnapshots, CreateSnapshot, DeleteSnapshot, UpdateSnapshot
- Add multi-share APIs: ListShares, GetShare, CreateShare, DeleteShare, UpdateShare
- Add ConnectMode to NetworkConfig (for Private Service Access support)
- New status codes (SUSPENDED/SUSPENDING, REVERTING/RESUMING)
- Add SuspensionReason (for KMS related suspension)
- Add new fields to Instance information: max_capacity_gb, capacity_step_size_gb, max_share_count, capacity_gb, multi_share_enabled

PiperOrigin-RevId: 487492758

Source-Link: googleapis/googleapis@5be5981

Source-Link: googleapis/googleapis-gen@ab0e217
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWIwZTIxN2Y1NjBjYzJjMWFmYzExNDQxYzJlYWI2YjY5NTBlZmQyYiJ9

* 🦉 Updates from OwlBot post-processor

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

* update path to snippet metadata json

* chore: Update gapic-generator-python to v1.6.1

PiperOrigin-RevId: 488036204

Source-Link: googleapis/googleapis@08f275f

Source-Link: googleapis/googleapis-gen@555c094
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTU1YzA5NDVlNjA2NDllMzg3MzlhZTY0YmM0NTcxOWNkZjcyMTc4ZiJ9

* 🦉 Updates from OwlBot post-processor

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

* feat: add compact placement feature for node pools

Use a compact placement policy to specify that nodes within the node pool should be placed in closer physical proximity to each other within a zone. Having nodes closer to each other can reduce network latency between nodes, which can be useful for tightly-coupled batch workloads.

PiperOrigin-RevId: 488490422

Source-Link: googleapis/googleapis@452324b

Source-Link: googleapis/googleapis-gen@008d00f
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDA4ZDAwZjYxOWY4MzE5ZWI1ODRmMjZkYTU2YzFjYTI2ZTY1YmNkNiJ9

* 🦉 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 <partheniou@google.com>
parthea added a commit that referenced this pull request Sep 22, 2023
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
parthea pushed a commit that referenced this pull request Sep 22, 2023
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea added a commit that referenced this pull request Sep 22, 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 <partheniou@google.com>
parthea added a commit that referenced this pull request Sep 22, 2023
* chore(python): add nox session to sort python imports

Source-Link: googleapis/synthtool@1b71c10
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:00c9d764fd1cd56265f12a5ef4b99a0c9e87cf261018099141e2ca5158890416

* 🦉 Updates from OwlBot post-processor

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

* revert change to region tag

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
parthea added a commit that referenced this pull request Oct 21, 2023
* feat: Update Compute Engine API to revision 20220720 (#723)

Source-Link: googleapis/googleapis@60a0fa7

Source-Link: googleapis/googleapis-gen@ba1df1b
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmExZGYxYmU5M2Y1YTFhYTVjNjQ3ZmMyZjE5NWQ0MWIwMDc1YWE5MyJ9

* 🦉 Updates from OwlBot post-processor

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

* add replacements in owlbot.py to fix docs build

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
parthea added a commit that referenced this pull request Oct 21, 2023
* connect Python Translate client library to nebulous serverless example

* added Samples section to README

* fix path

* update README

* fix README link

* move sample info to README

* fix RST formatting

* chore: update RST for Sphinx lint

* chore: update README for RST style

* updated serverless sample README

Co-authored-by: Dan Lee <71398022+dandhlee@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
parthea pushed a commit that referenced this pull request Oct 21, 2023
Source-Link: googleapis/synthtool@7197a00
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:c43f1d918bcf817d337aa29ff833439494a158a0831508fda4ec75dc4c0d0320

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Oct 21, 2023
Source-Link: googleapis/synthtool@1b9ad76
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:9db98b055a7f8bd82351238ccaacfd3cda58cdf73012ab58b8da146368330021
parthea pushed a commit that referenced this pull request Oct 22, 2023
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Determine desired/expected return value(s) of storage.bucket.Bucket.delete_keys
3 participants