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 2021/06/29 04:20:17 UTC

[GitHub] [beam] aaltay commented on a change in pull request #6535: [BEAM-5529] Before starting the final countdown, check that job is not in pre-running state

aaltay commented on a change in pull request #6535:
URL: https://github.com/apache/beam/pull/6535#discussion_r660268908



##########
File path: sdks/python/apache_beam/runners/dataflow/dataflow_runner.py
##########
@@ -155,9 +155,15 @@ def rank_error(msg):
               or str(response.currentState) == 'JOB_STATE_UPDATED'
               or str(response.currentState) == 'JOB_STATE_DRAINED'):
             break
-          # The job has failed; ensure we see any final error messages.
-          sleep_secs = 1.0      # poll faster during the final countdown
-          final_countdown_timer_secs -= sleep_secs
+
+          # Check that job is in a post-preparation state before starting the
+          # final countdown.
+          if (str(response.currentState) not in (
+              'JOB_STATE_PENDING', 'JOB_STATE_QUEUED')):

Review comment:
       It does not look like another pre-running state was added. (See for reference: https://cloud.google.com/dataflow/docs/reference/rest/v1b3/projects.jobs)
   
   > Another possibly related instance: stackoverflow.com/questions/68128465/is-it-possible-to-stop-the-job-in-starting-state
   
   According to the same link:
   pending -> cancelling is not a valid transition
   queued -> cancelling is a valid transition
   
   (But the doc might also be out of date.)
   
   Thank you for filing the jira. Please share jira id here for reference.
   




-- 
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: github-unsubscribe@beam.apache.org

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