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
fix: updates timeout/retry code to respect hanging server (#2408)
**Description**
This PR fixes a crash when handling `_InactiveRpcError` during retry
logic and ensures proper `timeout` propagation in
`RowIterator.to_dataframe`.
**Fixes**
**Retry Logic Crash**: Addressed an issue in
`google/cloud/bigquery/retry.py` where `_should_retry` would raise a
`TypeError` when inspecting unstructured `gRPC` errors (like
`_InactiveRpcError`). The fix adds robust error inspection to fallback
gracefully when `exc.errors` is not subscriptable.
**Timeout Propagation**: Added the missing `timeout` parameter to
`RowIterator.to_dataframe` in `google/cloud/bigquery/table.py`. This
ensures that the user-specified `timeout` is correctly passed down to
the underlying `to_arrow` call, preventing the client from hanging
indefinitely when the Storage API is unresponsive.
**Changes**
Modified `google/cloud/bigquery/retry.py`: Updated `_should_retry` to
handle `TypeError` and `KeyError` when accessing `exc.errors`.
Modified `google/cloud/bigquery/table.py`: Updated
`RowIterator.to_dataframe` signature and implementation to accept and
pass the `timeout` parameter.
The first half of this work was completed in PR #2354
0 commit comments