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

feat(api_core): add retry param into PollingFuture() and it's inheritors #9923

Merged
merged 4 commits into from
Jan 24, 2020

Conversation

IlyaFaer
Copy link

@IlyaFaer IlyaFaer commented Dec 6, 2019

Towards #6197

Looks like it's the last thing that should be done for this issue. CMIIW.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 6, 2019
api_core/google/api_core/future/polling.py Show resolved Hide resolved
api_core/tests/unit/test_operation.py Show resolved Hide resolved
# If the currently cached operation is done, no need to make another
# RPC as it will not change once done.
if not self._operation.done:
self._operation = self._refresh()
self._operation = self._refresh(retry=retry)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding retry into inheritor of the PollingFuture() (the one above) and passing it further. As self._refresh is functools.partial, we can just pass retry as a named arg - it'll be added to those args which were prepared while creating functools.partial

@IlyaFaer
Copy link
Author

IlyaFaer commented Dec 6, 2019

Some BigQuery tests failed, but, as I see, they are failing in pure master too. And got an error in Sphinx:

sphinx.errors.SphinxWarning: failed to reach any of the inventories with the following issues:
intersphinx inventory 'https://requests.kennethreitz.org/en/stable/objects.inv' not fetchable due to <class 'requests.exceptions.ConnectionError'>: HTTPSConnectionPool(host='requests.kennethreitz.org', port=443): Max retries exceeded with url: /en/stable/objects.inv (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f0555132910>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

@IlyaFaer IlyaFaer marked this pull request as ready for review December 6, 2019 15:14
@IlyaFaer IlyaFaer requested a review from a team December 6, 2019 15:14
This reverts commit 13b8553.
@IlyaFaer IlyaFaer added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 6, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 6, 2019
@IlyaFaer IlyaFaer added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 17, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 17, 2019
@tswast tswast requested review from a team and removed request for a team January 23, 2020 16:43
Copy link
Contributor

@tswast tswast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. Thanks for your patience in the review.

I'd like an API core owner to sign off as well, such as @busunkim96

@IlyaFaer IlyaFaer deleted the bigquery_retry_param branch September 24, 2020 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: core cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants