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



##########
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:
       I encountered 
https://stackoverflow.com/questions/68110323/encounter-assertionerror-job-did-not-reach-to-a-terminal-state-after-waiting-in/68120786#68120786
 that eventually led me back here. Is it possible that a new pre-running state 
has been added since this change? (the question does not specify version, but I 
assume from context clues that it is new enough to have this change in it)




-- 
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:
[email protected]


Reply via email to