Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix minor unreachable code caused by log.Fatal #22618

Merged
merged 3 commits into from
Aug 14, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion sdks/python/container/boot.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func main() {
for _, workerId := range workerIds {
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...))
log.Printf("Python exited: %v", execx.ExecuteEnv(map[string]string{"WORKER_ID": workerId}, "python", args...))
wg.Done()
}(workerId)
}
Expand Down
2 changes: 1 addition & 1 deletion sdks/typescript/boot.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,6 @@ func main() {
args = append(args, "--status_endpoint="+info.GetStatusEndpoint().GetUrl())
}

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