Skip to content

fix(bigquery): avoid SSLError retry loop#17489

Merged
daniel-sanche merged 11 commits into
mainfrom
bigquery_dont_retry_ssl
Jul 1, 2026
Merged

fix(bigquery): avoid SSLError retry loop#17489
daniel-sanche merged 11 commits into
mainfrom
bigquery_dont_retry_ssl

Conversation

@daniel-sanche

@daniel-sanche daniel-sanche commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

b/391888240

Previously, invalid requests like incorrect table schemas would result in SSLErrors, which would then be retried up to the default timeout value. SSLErrors generally won't resolve on retry.

This PR:

  • marks SSLErrors as non-retryable, so it won't waste 5 minutes on retries
  • catches and re-raises the insert_rows SSLError exception, to add clearer error context about what may be failing

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request ensures that requests.exceptions.SSLError is not retried during insert_rows_json operations and wraps the exception with a descriptive error message. It also adds corresponding unit and system tests. The feedback suggests wrapping the system test logic in a try...finally block to guarantee that the created table is cleaned up even if assertions fail.

Comment thread packages/google-cloud-bigquery/tests/system/test_ssl_retry.py Outdated
@daniel-sanche daniel-sanche added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 18, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jun 18, 2026
@daniel-sanche daniel-sanche added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 1, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 1, 2026
@daniel-sanche daniel-sanche added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 1, 2026
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jul 1, 2026
@daniel-sanche daniel-sanche marked this pull request as ready for review July 1, 2026 18:35
@daniel-sanche daniel-sanche requested review from a team as code owners July 1, 2026 18:35
@daniel-sanche daniel-sanche requested review from sycai and removed request for a team July 1, 2026 18:35
@daniel-sanche daniel-sanche changed the title [DRAFT] fix(bigquery): avoid SSLError retry loop fix(bigquery): avoid SSLError retry loop Jul 1, 2026
@daniel-sanche daniel-sanche requested review from chalmerlowe and removed request for sycai July 1, 2026 18:38

@chalmerlowe chalmerlowe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@daniel-sanche daniel-sanche merged commit 8248d8e into main Jul 1, 2026
30 checks passed
@daniel-sanche daniel-sanche deleted the bigquery_dont_retry_ssl branch July 1, 2026 21:32
@release-please release-please Bot mentioned this pull request Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants