Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions google/cloud/bigquery/retry.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ def _should_retry_get_job_conflict(exc):
"rateLimitExceeded",
"backendError",
"internalError",
"jobBackendError",
"jobInternalError",
"jobRateLimitExceeded",
)

Expand Down Expand Up @@ -153,6 +155,11 @@ def _job_should_retry(exc):
# waiting for the query to complete.
if _should_retry(exc):
return True

# Per b/436586523, ML/AI jobs don't seem to populate the structured errors
# reason. If these jobs fail, still try to retry them.
if "job encountered an internal error" in str(exc):


if not hasattr(exc, "errors") or len(exc.errors) == 0:
return False
Expand Down
Loading