You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/09/08 23:53:36 UTC

[GitHub] [beam] edre commented on a change in pull request #12789: Support updating from a job in DRAINING state

edre commented on a change in pull request #12789:
URL: https://github.com/apache/beam/pull/12789#discussion_r485257231



##########
File path: sdks/python/apache_beam/runners/dataflow/internal/apiclient.py
##########
@@ -923,8 +923,9 @@ def job_id_for_name(self, job_name):
           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

Review comment:
       Since this is only used by update, I'd support renaming the method to include 'running'.

##########
File path: sdks/python/apache_beam/runners/dataflow/internal/apiclient.py
##########
@@ -923,8 +923,9 @@ def job_id_for_name(self, job_name):
           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]):

Review comment:
       I created this change with the github single-file in-browser editor, and now I don't think I can amend it with another file change. Can someone with the infrastructure already set up take this over?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org