Skip to content

Commit

Permalink
fix minor unreachable code caused by log.Fatal (#22618)
Browse files Browse the repository at this point in the history
* fix minor unreachable code caused by log.Fatal

Signed-off-by: Abirdcfly <[email protected]>

* Apply suggestions from code review

Co-authored-by: Danny McCormick <[email protected]>

* Update sdks/python/container/boot.go

Co-authored-by: Danny McCormick <[email protected]>

Signed-off-by: Abirdcfly <[email protected]>
Co-authored-by: Danny McCormick <[email protected]>
  • Loading branch information
Abirdcfly and damccorm authored Aug 14, 2022
1 parent 184d8c5 commit d3ba73b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sdks/go/pkg/beam/core/runtime/harness/worker_status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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() {
Expand Down
1 change: 0 additions & 1 deletion sdks/python/container/boot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 0 additions & 1 deletion sdks/typescript/boot.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,5 +170,4 @@ func main() {
}

log.Fatalf("User program exited: %v", execx.Execute("npx", args...))
log.Printf("SDK exited cleanly.")
}

0 comments on commit d3ba73b

Please sign in to comment.