Skip to content

Commit

Permalink
housekeeping: update to go 1.23 (#3114)
Browse files Browse the repository at this point in the history
<!--- TITLE FORMAT: "component: short description", e.g. "k8s: add pod
log reader" -->

### Description
PR changes

- updates go version to 1.23
- updates golangci
- fixes failing test


<!-- Reference previous related pull requests below. -->

<!-- [OPTIONAL] Include screenshots below for frontend changes. -->

### Testing Performed
`make`
`make backend-lint`
`make backend-dev`
  • Loading branch information
miguelmolina95 committed Sep 10, 2024
1 parent 008ef58 commit 6ceb1ac
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 22 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.22.x
go-version: 1.23.x
- name: Set up Node
uses: actions/setup-node@v3
with:
Expand All @@ -36,7 +36,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.22.x
go-version: 1.23.x
- name: lint
run: make api-lint

8 changes: 4 additions & 4 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/setup-go@v3
id: setup-go
with:
go-version: 1.22.x
go-version: 1.23.x
- name: go mod cache
uses: actions/cache@v4
with:
Expand All @@ -44,7 +44,7 @@ jobs:
- uses: actions/setup-go@v3
id: setup-go
with:
go-version: 1.22.x
go-version: 1.23.x
- name: go mod cache
uses: actions/cache@v4
with:
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
- uses: actions/setup-go@v3
id: setup-go
with:
go-version: 1.22.x
go-version: 1.23.x
- run: make backend-integration-test
lint:
runs-on: ubuntu-latest
Expand All @@ -81,7 +81,7 @@ jobs:
- uses: actions/setup-go@v3
id: setup-go
with:
go-version: 1.22.x
go-version: 1.23.x
- name: go mod cache
uses: actions/cache@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
- uses: actions/setup-go@v4
id: setup-go
with:
go-version: 1.22.x
go-version: 1.23.x
- uses: actions/setup-node@v4
with:
node-version: "18.x"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/license_review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/setup-go@v3
id: setup-go
with:
go-version: 1.22.x
go-version: 1.23.x
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scaffolding.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
path: ${{ env.PACKAGEPATH }}
- uses: actions/setup-go@v3
with:
go-version: 1.22.x
go-version: 1.23.x
- uses: actions/setup-node@v3
with:
node-version: '18.x'
Expand Down
4 changes: 1 addition & 3 deletions backend/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/lyft/clutch/backend

go 1.22.0

toolchain go1.22.3
go 1.23.0

require (
github.com/DATA-DOG/go-sqlmock v1.5.0
Expand Down
2 changes: 1 addition & 1 deletion backend/module/audit/audit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func TestGetEvents(t *testing.T) {

for _, test := range testCases {
test := test
t.Run(fmt.Sprintf(test.id), func(t *testing.T) {
t.Run(test.id, func(t *testing.T) {
t.Parallel()
m := &mod{
client: auditmock.New(),
Expand Down
2 changes: 1 addition & 1 deletion backend/module/feedback/feedback.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func (m *mod) GetSurveys(tx context.Context, req *feedbackv1.GetSurveysRequest)
zap.Any("request origins", req.Origins),
zap.Any("config origins", m.surveyMap.surveys),
)
return nil, status.Errorf(codes.InvalidArgument, msg)
return nil, status.Errorf(codes.InvalidArgument, "%s", msg)
}

return &feedbackv1.GetSurveysResponse{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ func awaitGaugeValue(ctx context.Context, t *testing.T, testScope tally.TestScop
return
}
case <-ctx.Done():
t.Errorf(context.Canceled.Error())
t.Errorf("%s", context.Canceled.Error())
return
}
}
Expand Down
2 changes: 1 addition & 1 deletion backend/service/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ func (s *svc) GetCommit(ctx context.Context, ref *RemoteRef) (*Commit, error) {
Author: commit.GetAuthor(),
}

if commit.Parents != nil && len(commit.Parents) > 0 {
if len(commit.Parents) > 0 {
retCommit.ParentRef = commit.Parents[0].GetSHA()
}

Expand Down
2 changes: 1 addition & 1 deletion docs/_website/generator/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/lyft/clutch/docs/website/generator

go 1.22
go 1.23

require (
github.com/Masterminds/sprig/v3 v3.2.3
Expand Down
2 changes: 1 addition & 1 deletion tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/lyft/clutch/tools

go 1.22
go 1.23
6 changes: 3 additions & 3 deletions tools/golangci-lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ BUILD_ROOT="${REPO_ROOT}/build"
BUILD_BIN="${BUILD_ROOT}/bin"

NAME=golangci-lint
RELEASE=v1.56.1
OSX_RELEASE_256=62f02d4c0e8f6f8c77e787b8f271cdd1535eb7d2a28742e2535608652271018e
LINUX_RELEASE_256=aaf8260c76530f7571c49a7bc34b2ecd15accac21106710d47463a2313f1f663
RELEASE=v1.60.1
OSX_RELEASE_256=a0ec2235b5cc7aad6e1ee009efd5bec7c16bf2f01246c6ccb1df5c37bb2f5cd4
LINUX_RELEASE_256=06a803675ec83944d8c9e5a8dfa32845270cc447e7ebe0173c4b8ba7e205c9da

ARCH=amd64

Expand Down
2 changes: 1 addition & 1 deletion tools/scaffolding/templates/gateway/backend/go.mod.tmpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module {{ .RepoProvider }}/{{ .RepoOwner }}/{{ .RepoName }}/backend

go 1.22
go 1.23

0 comments on commit 6ceb1ac

Please sign in to comment.