You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by da...@apache.org on 2022/08/14 17:27:33 UTC

[beam] branch master updated: fix minor unreachable code caused by log.Fatal (#22618)

This is an automated email from the ASF dual-hosted git repository.

damccorm 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 d3ba73b28be fix minor unreachable code caused by log.Fatal (#22618)
d3ba73b28be is described below

commit d3ba73b28befb86cc62eaf1c40108b7630ff16fc
Author: Abirdcfly <fp...@gmail.com>
AuthorDate: Mon Aug 15 01:27:28 2022 +0800

    fix minor unreachable code caused by log.Fatal (#22618)
    
    * fix minor unreachable code caused by log.Fatal
    
    Signed-off-by: Abirdcfly <fp...@gmail.com>
    
    * Apply suggestions from code review
    
    Co-authored-by: Danny McCormick <da...@google.com>
    
    * Update sdks/python/container/boot.go
    
    Co-authored-by: Danny McCormick <da...@google.com>
    
    Signed-off-by: Abirdcfly <fp...@gmail.com>
    Co-authored-by: Danny McCormick <da...@google.com>
---
 sdks/go/pkg/beam/core/runtime/harness/worker_status_test.go | 4 ++--
 sdks/python/container/boot.go                               | 1 -
 sdks/typescript/boot.go                                     | 1 -
 3 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/sdks/go/pkg/beam/core/runtime/harness/worker_status_test.go b/sdks/go/pkg/beam/core/runtime/harness/worker_status_test.go
index 3c26b63ea34..9cc2e533079 100644
--- a/sdks/go/pkg/beam/core/runtime/harness/worker_status_test.go
+++ b/sdks/go/pkg/beam/core/runtime/harness/worker_status_test.go
@@ -18,12 +18,13 @@ package harness
 import (
 	"context"
 	"fmt"
-	"github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/harness/statecache"
 	"log"
 	"net"
 	"strings"
 	"testing"
 
+	"github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/harness/statecache"
+
 	fnpb "github.com/apache/beam/sdks/v2/go/pkg/beam/model/fnexecution_v1"
 	"google.golang.org/grpc"
 	"google.golang.org/grpc/credentials/insecure"
@@ -55,7 +56,6 @@ func setup(t *testing.T, srv *BeamFnWorkerStatusServicer) {
 	go func() {
 		if err := server.Serve(lis); err != nil {
 			log.Fatalf("failed to serve: %v", err)
-			panic(err)
 		}
 	}()
 	t.Cleanup(func() {
diff --git a/sdks/python/container/boot.go b/sdks/python/container/boot.go
index 5b8c1778da7..8e4cf772c0e 100644
--- a/sdks/python/container/boot.go
+++ b/sdks/python/container/boot.go
@@ -212,7 +212,6 @@ func main() {
 		go func(workerId string) {
 			log.Printf("Executing: python %v", strings.Join(args, " "))
 			log.Fatalf("Python exited: %v", execx.ExecuteEnv(map[string]string{"WORKER_ID": workerId}, "python", args...))
-			wg.Done()
 		}(workerId)
 	}
 	wg.Wait()
diff --git a/sdks/typescript/boot.go b/sdks/typescript/boot.go
index 2fda97af285..7bace0b1b71 100644
--- a/sdks/typescript/boot.go
+++ b/sdks/typescript/boot.go
@@ -170,5 +170,4 @@ func main() {
 	}
 
 	log.Fatalf("User program exited: %v", execx.Execute("npx", args...))
-	log.Printf("SDK exited cleanly.")
 }