lostluck commented on code in PR #5:
URL: https://github.com/apache/beam-swift/pull/5#discussion_r2226122448


##########
Sources/ApacheBeam/Runners/PortableRunner.swift:
##########
@@ -58,18 +84,30 @@ public struct PortableRunner: PipelineRunner {
         })
         log.info("Submitted job \(job.jobID)")
         var done = false
+        var state: PipelineCompletionState = .failed
         while !done {
             let status = try await client.getState(.with {
                 $0.jobID = job.jobID
             })
             log.info("Job \(job.jobID) status: \(status.state)")
             switch status.state {
-            case .stopped, .failed, .done, .cancelled:
+            case .done:
+                state = .done
+                done = true
+            case .stopped:
+                state = .stopped

Review Comment:
   In the way of academics: STOPPED isn't a terminal state.
   
   
https://github.com/apache/beam/blob/master/model/job-management/src/main/proto/org/apache/beam/model/job_management/v1/beam_job_api.proto#L224



-- 
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-unsubscr...@beam.apache.org

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

Reply via email to