ahmedabu98 commented on code in PR #28091:
URL: https://github.com/apache/beam/pull/28091#discussion_r1327135779
##########
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:
Yeah let's be cautious which errors we label as "non-transient", because
that could break many current pipelines that rely on Beam to successfully retry
these errors. Previously these GRPC errors would be raised and the runner can
retry the whole bundle.
I would lean towards only listing the errors we are sure to be non-transient.
--
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]