-
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
Expose 'missing'/'deferred' in 'Connection.lookup'/'Dataset.get_entities' #429
Expose 'missing'/'deferred' in 'Connection.lookup'/'Dataset.get_entities' #429
Conversation
…ies'. If 'deferred' list is not passed, the connection retries any keys in a deferred response. Closes #306.
|
||
results = [result.entity for result in lookup_response.found] | ||
# Hmm, should we sleep here? Asked in: | ||
# https://github.com/GoogleCloudPlatform/gcloud-python/issues/306#issuecomment-67377587 |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
break | ||
|
||
if lookup_response.deferred: # retry | ||
for old_key in list(lookup_request.key): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Did a full review, everything looks good pending comments. Also don't forget to remove the question in the comment about the sleep. |
@pcostell says not to bother.
So we still need to address |
@dhermes if the back-end imposed a limit on number of keys, we could just let that error propagate. As it is, if the user straps a cannon to his shin and pulls the trigger, we can't do much to help. They may get a 503 (for DoSing the API) anyway, and if not, they eventually get their data (even if they rack up big charges for it). |
We can make it harder to do pathological things, like putting the cannon in a locked cabinet in your analogy. From previous discussions with @pcostell, the backend limits the number of keys and also the length of the request, but after that just dumps them in |
Eek, lint failure. @tseaver to make
I wrote about it in the |
I normally run 'tox' (all environments). 9cd0f6a will clean it up. |
Note also that running with those variables sometimes leads to false-positives (weird cases where the not-included files somehow help to satisfy a check). |
@dhermes anything left unaddressed? Note that this kind of review is where the Github UI review breaks down: it is too hard for either the contributor or the reviewer to figure out what issues remain to be resolved. |
…ferred Expose 'missing'/'deferred' in 'Connection.lookup'/'Dataset.get_entities'
…429) Source-Link: https://github.com/googleapis/synthtool/commit/b4fe62efb5114b6738ad4b13d6f654f2bf4b7cc0 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:3bf87e47c2173d7eed42714589dc4da2c07c3268610f1e47f8e1a30decbfc7f1
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 473833416 Source-Link: googleapis/googleapis@565a550 Source-Link: googleapis/googleapis-gen@1ee1a06 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMWVlMWEwNmM2ZGUzY2E4Yjg0MzU3MmMxZmRlMDU0OGY4NDIzNjk4OSJ9
* docs: Fix formatting of request arg in docstring chore: Update gapic-generator-python to v1.9.1 PiperOrigin-RevId: 518604533 Source-Link: googleapis/googleapis@8a085ae Source-Link: googleapis/googleapis-gen@b2ab4b0 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjJhYjRiMGEwYWUyOTA3ZTgxMmMyMDkxOThhNzRlMDg5OGFmY2IwNCJ9 * 🦉 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 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>
…429) Source-Link: https://github.com/googleapis/synthtool/commit/395d53adeeacfca00b73abf197f65f3c17c8f1e9 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:6c1cbc75c74b8bdd71dada2fa1677e9d6d78a889e9a70ee75b93d1d0543f96e1
- [ ] Regenerate this pull request now. docs: list oneofs in docstring docs(v2beta1): clarified meaning of the legacy editions docs(v2beta1): clarified semantic of the streaming APIs fix(deps): require google-api-core >= 1.28.0 fix(deps): drop packaging dependency committer: busunkim96@ PiperOrigin-RevId: 406468269 Source-Link: googleapis/googleapis@83d81b0 Source-Link: googleapis/googleapis-gen@2ff001f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmZmMDAxZmJhY2I5ZTc3ZTcxZDczNGRlNWY5NTVjMDVmZGFlODUyNiJ9
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
Source-Link: https://github.com/googleapis/synthtool/commit/0ddbff8012e47cde4462fe3f9feab01fbc4cdfd6 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:bced5ca77c4dda0fd2f5d845d4035fc3c5d3d6b81f245246a36aee114970082b
…[autoapprove] (#429) Source-Link: googleapis/synthtool@1f37ce7 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:8e84e0e0d71a0d681668461bba02c9e1394c785f31a10ae3470660235b673086 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
If 'deferred' list is not passed, the connection retries any keys in
a deferred response.
Closes #306.