GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||
GeezerVison is showing github.com — fix: consume part of StreamingResponseIterator to support failure while under a retry context by crwilcox · Pull Request #10206 · googleapis/google-cloud-python Conversation
|
| try: | ||
| self._first_result = six.next(self._wrapped) | ||
| self._stored_first_result = True | ||
| except StopIteration: |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Will this work for the WatchStream? For Watch, the client has to send the first request. We will not receive a response until after this request has been processed.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Watch uses ResumableBidiRpc and has its own way of managing recovery. This will have an effect on things like query though.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I would use only a single instance variable here, and arrange to set / clear it atomically.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
NOTE: 3 tests look to need refactoring, also should likely improve coverage given this new behavior. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| # to retrieve the first result, in order to fail, in order to trigger a retry. | ||
| try: | ||
| self._stored_first_result = six.next(self._wrapped) | ||
| except TypeError: |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
@tseaver Under test we have a non-iterable. While it is odd that you would call this without it does seem possible? So added a guard here
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…le under a retry context (#10206)
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.