diff --git a/.github/workflows/go_tests.yml b/.github/workflows/go_tests.yml index 6818e92bc677..e85c4eba866b 100644 --- a/.github/workflows/go_tests.yml +++ b/.github/workflows/go_tests.yml @@ -28,7 +28,7 @@ on: pull_request: branches: ['master', 'release-*'] tags: ['v*'] - paths: ['sdks/go/pkg/**', 'sdks/go.mod', 'sdks/go.sum', 'sdks/go/container/*', 'sdks/java/container/*', 'sdks/python/container/*', 'sdks/typescript/container/*'] + paths: ['sdks/go/pkg/**', 'sdks/go.mod', 'sdks/go.sum', 'sdks/go/container/*', 'sdks/java/container/*', 'sdks/python/container/*', 'sdks/typescript/container/*', '.github/workflows/go_test.yml'] workflow_dispatch: # This allows a subsequently queued workflow run to interrupt previous runs concurrency: @@ -64,6 +64,6 @@ jobs: go vet --copylocks=false --unsafeptr=false ./... - name: Run Staticcheck run: | - go install "honnef.co/go/tools/cmd/staticcheck@2023.1.7" + go install "honnef.co/go/tools/cmd/staticcheck@2024.1.1" cd sdks/go/pkg/beam $(go env GOPATH)/bin/staticcheck ./... diff --git a/sdks/go.mod b/sdks/go.mod index 93f82acc2eec..48939706866d 100644 --- a/sdks/go.mod +++ b/sdks/go.mod @@ -69,6 +69,7 @@ require ( require ( github.com/avast/retry-go/v4 v4.6.0 github.com/fsouza/fake-gcs-server v1.49.2 + github.com/golang/protobuf v1.5.4 golang.org/x/exp v0.0.0-20231006140011-7918f672742d ) diff --git a/sdks/go/pkg/beam/core/runtime/harness/harness.go b/sdks/go/pkg/beam/core/runtime/harness/harness.go index 08e7f6ddaa7f..20aad81c1237 100644 --- a/sdks/go/pkg/beam/core/runtime/harness/harness.go +++ b/sdks/go/pkg/beam/core/runtime/harness/harness.go @@ -607,7 +607,7 @@ func (c *control) handleInstruction(ctx context.Context, req *fnpb.InstructionRe var pRoots []*fnpb.BundleApplication var rRoots []*fnpb.DelayedBundleApplication - if sr.PS != nil && len(sr.PS) > 0 && sr.RS != nil && len(sr.RS) > 0 { + if len(sr.PS) > 0 && len(sr.RS) > 0 { pRoots = make([]*fnpb.BundleApplication, len(sr.PS)) for i, p := range sr.PS { pRoots[i] = &fnpb.BundleApplication{