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 2a20847 Support updating from a job in DRAINING state
new 2bb60c3 Merge pull request #12789 from edre/patch-1
2a20847 is described below
commit 2a20847c1e4b2303308c91658524735575248b46
Author: Eric Roshan-Eisner <[email protected]>
AuthorDate: Tue Sep 8 16:12:14 2020 -0700
Support updating from a job in DRAINING state
---
sdks/python/apache_beam/runners/dataflow/internal/apiclient.py | 5 +++--
1 file 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 25dfc04..47dcc78 100644
--- a/sdks/python/apache_beam/runners/dataflow/internal/apiclient.py
+++ b/sdks/python/apache_beam/runners/dataflow/internal/apiclient.py
@@ -923,8 +923,9 @@ class DataflowApplicationClient(object):
pageToken=token)
response = self._client.projects_locations_jobs.List(request)
for job in response.jobs:
- if (job.name == job_name and job.currentState ==
- dataflow.Job.CurrentStateValueValuesEnum.JOB_STATE_RUNNING):
+ if (job.name == job_name and job.currentState in
+ [dataflow.Job.CurrentStateValueValuesEnum.JOB_STATE_RUNNING,
+ dataflow.Job.CurrentStateValueValuesEnum.JOB_STATE_DRAINING]):
return job.id
token = response.nextPageToken
if token is None: