You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def _is_active(self):
# Note: there is a possibility that this starts *before* the call
# property is set. So we have to check if self.call is set before
# seeing if it's active.
if self.call is not None and not self.call.is_active():
return False
else:
return True
v2.13.0 code:
def _is_active(self):
# Note: there is a possibility that this starts *before* the call
# property is set. So we have to check if self.call is set before
# seeing if it's active.
return self.call is not None and self.call.is_active()
Note that in v2.12.0 version _is_active() will return True when self.call is None but in v2.13.0 this will return False.
This seems to very directly violate the behaviour highlighted in the comment:
# Note: there is a possibility that this starts *before* the call
# property is set. So we have to check if self.call is set before
# seeing if it's active.
Name: google-cloud-bigquery-storage
Version: 2.22.0
Summary: Google Cloud Bigquery Storage API client library
Home-page: https://github.com/googleapis/python-bigquery-storage
Author: Google LLC
Author-email: googleapis-packages@google.com
License: Apache 2.0
Location: /Users/dhendry/code/perpetua-pybackend-common/.venv/lib/python3.9/site-packages
Requires: google-api-core, proto-plus, protobuf
Required-by: perpetua-pybackend-common
Steps to reproduce
After upgrading google-api-core from 2.12.0 to 2.13.0 we are seeing an ConsumeBidirectionalStream caught unexpected exception and will exit. error when using the BigQueryWriteClient. I have narrowed down the issue to this library, NOT the google-cloud-bigquery-storage library
Note: you many need to be on a slow-ish network connection (<= ~50 MBit/sec) to reproduce reliably.
Create an AppendRowsStream
Call .send() with a large AppendRowsRequest request (close to the maximum, say 9 MB). Very specifically, it seems that the request must be large enough to take more than 1 second to complete (1 second because that is the default value for google.api_core.bidi._RequestQueueGenerator._period)
tl;dr: Cause and fix
I believe v2.13.0 introduced a regression here: v2.12.0...v2.13.0#diff-769a9f2c04700ff355d77a3292b7ff3cea5ff9bda91d0b31138eeb89fcd4d02dL95-L98
v2.12.0 code:
v2.13.0 code:
Note that in
v2.12.0
version_is_active()
will return True whenself.call is None
but inv2.13.0
this will return False.This seems to very directly violate the behaviour highlighted in the comment:
As such the fix should be as simple as
Environment details
python --version
: 3.9.18pip --version
: 22.3google-api-core
version:pip show google-api-core
Also relevant here:
Steps to reproduce
After upgrading
google-api-core
from2.12.0
to2.13.0
we are seeing anConsumeBidirectionalStream caught unexpected exception and will exit.
error when using theBigQueryWriteClient
. I have narrowed down the issue to this library, NOT the google-cloud-bigquery-storage libraryNote: you many need to be on a slow-ish network connection (<= ~50 MBit/sec) to reproduce reliably.
AppendRowsStream
.send()
with a largeAppendRowsRequest
request (close to the maximum, say 9 MB). Very specifically, it seems that the request must be large enough to take more than 1 second to complete (1 second because that is the default value forgoogle.api_core.bidi._RequestQueueGenerator._period
)Code example
Stack trace
The text was updated successfully, but these errors were encountered: