Skip to content

Commit

Permalink
Update staticcheck version to fix breakage. (#32614)
Browse files Browse the repository at this point in the history
* Update staticcheck version.

* Add the workflow itself to it's trigger condition.

* go mod tidy

* [staticcheck] remove redundant nil checks

---------

Co-authored-by: lostluck <[email protected]>
  • Loading branch information
lostluck and lostluck authored Oct 1, 2024
1 parent 5aed585 commit 3dee026
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/go_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 ./...
1 change: 1 addition & 0 deletions sdks/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down
2 changes: 1 addition & 1 deletion sdks/go/pkg/beam/core/runtime/harness/harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 3dee026

Please sign in to comment.