This is an automated email from the ASF dual-hosted git repository.
altay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 5f36ea1 Change retry policy for dataflow's list_messages
new 2a18da4 Merge pull request #9196 from aaltay/m404
5f36ea1 is described below
commit 5f36ea19c4f0d084c266ec0e798f5d3dd9c68519
Author: Ahmet Altay <[email protected]>
AuthorDate: Tue Jul 30 14:28:41 2019 -0700
Change retry policy for dataflow's list_messages
---
sdks/python/apache_beam/runners/dataflow/internal/apiclient.py | 3 ++-
sdks/python/apache_beam/utils/retry.py | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/sdks/python/apache_beam/runners/dataflow/internal/apiclient.py
b/sdks/python/apache_beam/runners/dataflow/internal/apiclient.py
index 6e8d9b8..4d7360c 100644
--- a/sdks/python/apache_beam/runners/dataflow/internal/apiclient.py
+++ b/sdks/python/apache_beam/runners/dataflow/internal/apiclient.py
@@ -671,7 +671,8 @@ class DataflowApplicationClient(object):
response = self._client.projects_locations_jobs.Get(request)
return response
- @retry.with_exponential_backoff() # Using retry defaults from utils/retry.py
+ @retry.with_exponential_backoff(
+ retry_filter=retry.retry_on_server_errors_and_notfound_filter)
def list_messages(
self, job_id, start_time=None, end_time=None, page_token=None,
minimum_importance=None):
diff --git a/sdks/python/apache_beam/utils/retry.py
b/sdks/python/apache_beam/utils/retry.py
index d0a5f7f..59d8dec 100644
--- a/sdks/python/apache_beam/utils/retry.py
+++ b/sdks/python/apache_beam/utils/retry.py
@@ -104,7 +104,7 @@ def retry_on_server_errors_filter(exception):
return not isinstance(exception, PermanentException)
-# TODO(BEAM-6202): Dataflow returns 404 for job ids that actuall exist.
+# TODO(BEAM-6202): Dataflow returns 404 for job ids that actually exist.
# Retry on those errors.
def retry_on_server_errors_and_notfound_filter(exception):
if HttpError is not None and isinstance(exception, HttpError):