Skip to content

Commit d3ba73b

Browse files
Abirdcflydamccorm
andauthored
fix minor unreachable code caused by log.Fatal (#22618)
* 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]>
1 parent 184d8c5 commit d3ba73b

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

sdks/go/pkg/beam/core/runtime/harness/worker_status_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@ package harness
1818
import (
1919
"context"
2020
"fmt"
21-
"github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/harness/statecache"
2221
"log"
2322
"net"
2423
"strings"
2524
"testing"
2625

26+
"github.com/apache/beam/sdks/v2/go/pkg/beam/core/runtime/harness/statecache"
27+
2728
fnpb "github.com/apache/beam/sdks/v2/go/pkg/beam/model/fnexecution_v1"
2829
"google.golang.org/grpc"
2930
"google.golang.org/grpc/credentials/insecure"
@@ -55,7 +56,6 @@ func setup(t *testing.T, srv *BeamFnWorkerStatusServicer) {
5556
go func() {
5657
if err := server.Serve(lis); err != nil {
5758
log.Fatalf("failed to serve: %v", err)
58-
panic(err)
5959
}
6060
}()
6161
t.Cleanup(func() {

sdks/python/container/boot.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ func main() {
212212
go func(workerId string) {
213213
log.Printf("Executing: python %v", strings.Join(args, " "))
214214
log.Fatalf("Python exited: %v", execx.ExecuteEnv(map[string]string{"WORKER_ID": workerId}, "python", args...))
215-
wg.Done()
216215
}(workerId)
217216
}
218217
wg.Wait()

sdks/typescript/boot.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,5 +170,4 @@ func main() {
170170
}
171171

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

0 commit comments

Comments
 (0)