ajdub508 commented on code in PR #28091:
URL: https://github.com/apache/beam/pull/28091#discussion_r1327950847
##########
sdks/python/apache_beam/io/gcp/bigquery_tools.py:
##########
@@ -1491,7 +1493,29 @@ class RetryStrategy(object):
RETRY_NEVER = 'RETRY_NEVER'
RETRY_ON_TRANSIENT_ERROR = 'RETRY_ON_TRANSIENT_ERROR'
- _NON_TRANSIENT_ERRORS = {'invalid', 'invalidQuery', 'notImplemented'}
+ # Values below may be found in reasons provided either in an
+ # error returned by a client method or by an http response as
+ # defined in google.api_core.exceptions
+ _NON_TRANSIENT_ERRORS = {
+ 'invalid',
+ 'invalidQuery',
+ 'notImplemented',
+ 'Moved Permanently',
+ 'Not Modified',
+ 'Temporary Redirect',
+ 'Resume Incomplete',
+ 'Bad Request',
+ 'Unauthorized',
+ 'Forbidden',
+ 'Not Found',
+ 'Method Not Allowed',
+ 'Conflict',
+ 'Length Required',
+ 'Precondition Failed',
+ 'Not Implemented',
+ 'Bad Gateway',
+ 'Gateway Timeout',
+ }
Review Comment:
Added [this
commit](https://github.com/apache/beam/pull/28091/commits/ec629474e8539b9ca577eefccf8623a503df343e)
which removed a few exceptions based on our conversation and a review of the
[bq error
table](https://cloud.google.com/bigquery/docs/error-messages#errortable):
- Errors that don't seem to be relevant:
- 3XX Errors - Moved Permanently, Not Modified, Temporary Redirect, Resume
Incomplete
- Some 4XX Errors - Method Not Allowed, Length Required, Precondition
Failed
- Errors that should be retried:
- 409 Conflict
- 502 Bad Gateway
- 504 Gateway Timeout
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]