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
{{ message }}
This repository was archived by the owner on Feb 23, 2026. It is now read-only.
The close() method of the bidi module, resets the fields only when the self.call field is not None.
def close(self):
"""Closes the stream."""
if self.call is None:
return
self._request_queue.put(None)
self.call.cancel()
....
This is problematic, when an exception is raised in the open() and we do not set the self.call. This scenario leads to the stream not getting closed properly(half closed state from server). And we are able to observe these tailing streams(which are causing further issues for us) incase of reopens and other retries. Also observed that these tailing streams get closed automatically after some time(15-20 mins).
Environment details
Using gcloud installation.
OS type and version: Ubuntu 22.04.5 LTS, Mac OS Sequoia 15.7.1. Not tested on other OS.
Python version: Bundled python which comes with gcloud.
google-api-core version: Using gcloud installation version with 545.0.0
Sharing further information internally(@pujawadare googler), as some information may be sensitive.