-
Couldn't load subscription status.
- Fork 62
feat: surface retry param to Table.read_row api #982
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
feat: surface retry param to Table.read_row api #982
Conversation
| Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
| 🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use -- conventional-commit-lint bot |
299f94b to 2e83ad3 Compare retry param to Table.read_row apiretry param to Table.read_row api 2e83ad3 to 8203d4f Compare | i wanted to bump this since it's been a while ^^; @rkaregar |
8203d4f to 39e8f90 Compare There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seems to be an issue in the owlbot test, unreleated to these changes. I'll merge this when that is resolved
| Actually, it looks like it's failing on the noxfile customizations. These were stripped out in the upstream main owlbot.py file. So I think the issue is because the tests are running against your branch, which doesn't contain all the upstream changes. Please merge in upstream's main, and then we should be good to go |
39e8f90 to c8c04d3 Compare | @daniel-sanche done |
| thanks! There's now a CI issue on the backend, but I will merge this when that is resolved |
### [INC-659](https://getsentry.atlassian.net/browse/INC-659) > [OPS-6010](https://getsentry.atlassian.net/browse/OPS-6010) Need a version `>=2.27.0` to access retry config on `read_row()`: googleapis/python-bigtable#982 [INC-659]: https://getsentry.atlassian.net/browse/INC-659?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [OPS-6010]: https://getsentry.atlassian.net/browse/OPS-6010?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
| @ayubun @daniel-sanche #941 mentioned both retries and timeouts - I'm not sure but it looks like this adds retry but not timeout config? Or are they combined somehow in the |
| Does this look like the right way to override the timeout (based on this doc)? from google.cloud.bigtable.row_data import DEFAULT_RETRY_READ_ROWS modified_retry = DEFAULT_RETRY.with_deadline(5.0) row = self._get_table().read_row(key, retry=modified_retry) |
| @mwarkentin Yeah, that code you supplied looks right. Technically you should be using This uses the api_core.Retry class, which is shared across all GCP python libraries for retry/timeout/backoff configuration. You can find more documentation here |
| Thanks! |
| @daniel-sanche if |
| Thanks, I opened a request to have that fixed! |
### [INC-659](https://getsentry.atlassian.net/browse/INC-659) > [OPS-6010](https://getsentry.atlassian.net/browse/OPS-6010) Need a version `>=2.27.0` to access retry config on `read_row()`: googleapis/python-bigtable#982 [INC-659]: https://getsentry.atlassian.net/browse/INC-659?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ [OPS-6010]: https://getsentry.atlassian.net/browse/OPS-6010?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
what ? ( ̄^ ̄ゞ
this pr surfaces a
retryparam forTable.read_row. this param defaults toDEFAULT_RETRY_READ_ROWSjust as it does forTable.read_rows. it then passes forward into theTable.read_rowscallwhy ? („• ᴗ •„)
in the case where a caller may want to override the default
retryparam for theTable.read_rowapi, they currently must switch to usingTable.read_rowsand add their own code for pulling the first item out of the iterator and guarding against multi-row responses (which are functionalities thatTable.read_rowalready provides)in an ideal world, the
Table.read_rowhelper method can accept and pass along the retry param so that clients don't need to write their own duplicate implementations wrappingTable.read_rows~related issue ౨ৎ⋆˚。⋆
implements #941