Skip to content

Commit

Permalink
Go 1.24, linter update, and resolve linter/vet issues (#10620)
Browse files Browse the repository at this point in the history
Co-authored-by: changelog-bot <changelog-bot>
  • Loading branch information
ryanrolds authored Feb 20, 2025
1 parent e1d9b9e commit 52a70ed
Show file tree
Hide file tree
Showing 30 changed files with 123 additions and 91 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/static-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
# `make analyze` runs the linter with similar arguments to what we use here.
# If this action fails, try running `make analyze` locally.
with:
version: v1.57.2
version: v1.64.5
args: --verbose --modules-download-mode=readonly --allow-parallel-runners
skip-cache: true
skip-save-cache: true
Expand Down
6 changes: 3 additions & 3 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ issues:
# Set to 0 to disable.
max-same-issues: 0

# Make issues output unique by line.
uniq-by-line: true

run:
# Number of CPUs to use when running golangci-lint.
# Default: the number of logical CPUs in the machine
Expand Down Expand Up @@ -93,8 +96,5 @@ output:
# Print linter name in the end of issue text.
print-linter-name: true

# Make issues output unique by line.
uniq-by-line: true

# Sort results by: filepath, line and column.
sort-results: true
8 changes: 8 additions & 0 deletions changelog/v1.19.0-beta11/go-1.24.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
changelog:
- type: DEPENDENCY_BUMP
description: Bumped the go version to 1.24.0
dependencyOwner: golang
dependencyRepo: go
dependencyTag: v1.24.0
issueLink: https://github.com/solo-io/solo-projects/issues/7609
resolvesIssue: false
10 changes: 5 additions & 5 deletions ci/cloudbuild/publish-artifacts.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
steps:

- name: 'gcr.io/$PROJECT_ID/prepare-go-workspace:0.11.1'
- name: 'gcr.io/$PROJECT_ID/prepare-go-workspace:0.12.0'
id: 'prepare-workspace'
args:
- '--repo-name'
Expand Down Expand Up @@ -51,7 +51,7 @@ steps:
- create
- --use

- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.11.1'
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.12.0'
id: 'build-certgen-arm64-binary'
args:
- 'certgen-docker'
Expand All @@ -60,7 +60,7 @@ steps:
- 'GOARCH=arm64'

# Run make targets to push docker images to quay.io
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.11.1'
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.12.0'
id: 'publish-docker'
args:
- 'publish-docker'
Expand All @@ -86,7 +86,7 @@ steps:
waitFor:
- 'publish-docker'

- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.11.1'
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.12.0'
id: 'release-chart'
dir: *dir
args:
Expand All @@ -101,7 +101,7 @@ steps:
- 'gcr-auth'

# Run make targets to build and push docker images to GCR
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.11.1'
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.12.0'
id: 'publish-docker-extended-gcr'
dir: *dir
args:
Expand Down
12 changes: 6 additions & 6 deletions ci/cloudbuild/run-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
steps:

- name: 'gcr.io/$PROJECT_ID/prepare-go-workspace:0.11.1'
- name: 'gcr.io/$PROJECT_ID/prepare-go-workspace:0.12.0'
id: 'prepare-workspace'
args:
- '--repo-name'
Expand All @@ -23,7 +23,7 @@ steps:
cd /go/pkg
gsutil cat gs://$PROJECT_ID-cache/gloo/gloo-mod.tar.gz | tar -xzf - || echo "untar mod cache failed; continuing because we can download deps as we need them"
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.11.1'
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.12.0'
id: 'prepare-envoy'
dir: *dir
entrypoint: 'bash'
Expand Down Expand Up @@ -77,7 +77,7 @@ steps:
waitFor:
- 'prepare-gcr-zone'

- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.11.1'
- name: 'gcr.io/$PROJECT_ID/go-mod-make:0.12.0'
id: 'prepare-test-tools'
dir: *dir
args:
Expand All @@ -88,7 +88,7 @@ steps:
- 'prepare-gcr-zone'
- 'prepare-test-credentials'

- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.11.1'
- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.12.0'
id: 'run-tests'
dir: *dir
entrypoint: 'make'
Expand All @@ -99,7 +99,7 @@ steps:
secretEnv:
- 'JWT_PRIVATE_KEY'

- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.11.1'
- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.12.0'
id: 'run-e2e-tests'
dir: *dir
entrypoint: 'make'
Expand All @@ -110,7 +110,7 @@ steps:
secretEnv:
- 'JWT_PRIVATE_KEY'

- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.11.1'
- name: 'gcr.io/$PROJECT_ID/e2e-go-mod-ginkgo:0.12.0'
id: 'run-hashicorp-e2e-tests'
dir: *dir
entrypoint: 'make'
Expand Down
2 changes: 1 addition & 1 deletion cloudbuild-cache.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
options:
env:
- "_GO_VERSION=1.23.3"
- "_GO_VERSION=1.24.0"

steps:
- name: gcr.io/cloud-builders/gsutil
Expand Down
4 changes: 2 additions & 2 deletions docs/content/guides/dev/setting-up-dev-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Developing on Gloo Gateway requires the following to be installed on your system

- [`Make`](https://www.gnu.org/software/make/)
- [`Git`](https://git-scm.com/)
- [`Go`](https://golang.org/) (`solo-io` projects are built using version `1.23.3`)
- [`Go`](https://golang.org/) (`solo-io` projects are built using version `1.24.0`)
- `Protoc` (`solo-io` projects are built using version `3.6.1`)
- Standard development tools like `gcc`

Expand All @@ -28,7 +28,7 @@ xcode-select --install
# install version of go in go.mod
############################################
# - macOS:
brew install go@1.23
brew install go@1.24
# - other operating systems:
# follow directions at https://go.dev/doc/install

Expand Down
19 changes: 11 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/solo-io/gloo

go 1.23.6
go 1.24.0

// Note for developers: upgrading go will also require upgrading go in the following files:
// ./cloudbuild-cache.yaml,
Expand Down Expand Up @@ -49,17 +49,17 @@ require (
github.com/saiskee/gettercheck v0.0.0-20210820204958-38443d06ebe0
github.com/sergi/go-diff v1.2.0
github.com/solo-io/go-list-licenses v0.1.4
github.com/solo-io/go-utils v0.27.4
github.com/solo-io/k8s-utils v0.9.0
github.com/solo-io/protoc-gen-ext v0.0.25
github.com/solo-io/protoc-gen-openapi v0.2.5
github.com/solo-io/skv2 v0.42.0
github.com/solo-io/go-utils v0.28.4
github.com/solo-io/k8s-utils v0.10.0
github.com/solo-io/protoc-gen-ext v0.1.0
github.com/solo-io/protoc-gen-openapi v0.3.0
github.com/solo-io/skv2 v0.43.0

// Pinned to the `k8s-1.32-bump` tag of solo-apis on `gloo-main` branch
// Ref: https://github.com/solo-io/gloo/pull/9463/files#r1594409655 && https://solo-io-corp.slack.com/archives/C03MFATU265/p1716913420716729?thread_ts=1716476992.938679&cid=C03MFATU265
// as to why it is now based off `gloo-main` and not `gloo-repo-branch`
github.com/solo-io/solo-apis v0.0.0-20250218202255-bad789c9de63
github.com/solo-io/solo-kit v0.37.0
github.com/solo-io/solo-kit v0.38.0
github.com/spf13/afero v1.11.0
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
Expand Down Expand Up @@ -103,6 +103,7 @@ require (
github.com/prometheus/client_model v0.6.1
github.com/prometheus/common v0.62.0
github.com/quasilyte/go-ruleguard/dsl v0.3.22
github.com/solo-io/cue v0.4.7
github.com/stoewer/go-strcase v1.3.0
github.com/stretchr/testify v1.10.0
golang.org/x/exp v0.0.0-20241215155358-4a5509556b9e
Expand Down Expand Up @@ -274,6 +275,7 @@ require (
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect
github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect
github.com/mpvl/unique v0.0.0-20150818121801-cbe035fff7de // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/oklog/run v1.0.0 // indirect
Expand All @@ -300,7 +302,7 @@ require (
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/solo-io/anyvendor v0.1.0 // indirect
github.com/solo-io/anyvendor v0.2.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/cast v1.7.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
Expand All @@ -327,6 +329,7 @@ require (
golang.org/x/term v0.28.0 // indirect
golang.org/x/text v0.21.0 // indirect
golang.org/x/time v0.9.0 // indirect
golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
Expand Down
Loading

0 comments on commit 52a70ed

Please sign in to comment.