From 4d64189bf66266d5636b8d3a119447fbfdb1f236 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 09:37:48 +0000 Subject: [PATCH 1/2] Bump golangci/golangci-lint-action in the github-actions-deps group (#3753) Bumps the github-actions-deps group with 1 update: [golangci/golangci-lint-action](https://github.com/golangci/golangci-lint-action). Updates `golangci/golangci-lint-action` from 6.5.0 to 6.5.1 - [Release notes](https://github.com/golangci/golangci-lint-action/releases) - [Commits](https://github.com/golangci/golangci-lint-action/compare/2226d7cb06a077cd73e56eedd38eecad18e5d837...4696ba8babb6127d732c3c6dde519db15edab9ea) --- updated-dependencies: - dependency-name: golangci/golangci-lint-action dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions-deps ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/golangci-lint.yml | 2 +- .github/workflows/test_crdb.yaml | 2 +- .github/workflows/test_pgdb.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index bddfcf8e36..900b465614 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -17,7 +17,7 @@ jobs: with: go-version-file: go.mod - name: golangci-lint - uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837 # v6.5.0 + uses: golangci/golangci-lint-action@4696ba8babb6127d732c3c6dde519db15edab9ea # v6.5.1 with: version: v1.55.1 args: --timeout=8m diff --git a/.github/workflows/test_crdb.yaml b/.github/workflows/test_crdb.yaml index 4ccece1152..3fdcc09968 100644 --- a/.github/workflows/test_crdb.yaml +++ b/.github/workflows/test_crdb.yaml @@ -25,7 +25,7 @@ jobs: check-latest: true cache: true - - uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837 # v6.5.0 + - uses: golangci/golangci-lint-action@4696ba8babb6127d732c3c6dde519db15edab9ea # v6.5.1 with: version: 'v1.55.1' args: ./storage/crdb diff --git a/.github/workflows/test_pgdb.yaml b/.github/workflows/test_pgdb.yaml index 5baf50e11b..1a145d29c0 100644 --- a/.github/workflows/test_pgdb.yaml +++ b/.github/workflows/test_pgdb.yaml @@ -25,7 +25,7 @@ jobs: check-latest: true cache: true - - uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837 # v6.5.0 + - uses: golangci/golangci-lint-action@4696ba8babb6127d732c3c6dde519db15edab9ea # v6.5.1 with: version: 'v1.55.1' args: ./storage/postgresql From 234b6c44c23701a176fc88650f698991a0c6ff55 Mon Sep 17 00:00:00 2001 From: Philippe Boneff Date: Thu, 13 Feb 2025 14:01:46 +0000 Subject: [PATCH 2/2] go update to 1.23 (#3733) * go update to 1.23 * update changelog * update README.md * update golangci-lint * fix golangci-lint --- .github/workflows/golangci-lint.yml | 2 +- .github/workflows/test_crdb.yaml | 2 +- .github/workflows/test_pgdb.yaml | 4 ++-- README.md | 2 +- go.mod | 2 +- monitoring/testonly/metrics.go | 6 +++--- server/errors/errors.go | 2 +- server/errors/errors_test.go | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 900b465614..0423d16e30 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -19,5 +19,5 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@4696ba8babb6127d732c3c6dde519db15edab9ea # v6.5.1 with: - version: v1.55.1 + version: v1.61.0 args: --timeout=8m diff --git a/.github/workflows/test_crdb.yaml b/.github/workflows/test_crdb.yaml index 3fdcc09968..755ad4dcf2 100644 --- a/.github/workflows/test_crdb.yaml +++ b/.github/workflows/test_crdb.yaml @@ -27,7 +27,7 @@ jobs: - uses: golangci/golangci-lint-action@4696ba8babb6127d732c3c6dde519db15edab9ea # v6.5.1 with: - version: 'v1.55.1' + version: 'v1.61.0' args: ./storage/crdb unit-test: diff --git a/.github/workflows/test_pgdb.yaml b/.github/workflows/test_pgdb.yaml index 1a145d29c0..1d8133f452 100644 --- a/.github/workflows/test_pgdb.yaml +++ b/.github/workflows/test_pgdb.yaml @@ -27,7 +27,7 @@ jobs: - uses: golangci/golangci-lint-action@4696ba8babb6127d732c3c6dde519db15edab9ea # v6.5.1 with: - version: 'v1.55.1' + version: 'v1.61.0' args: ./storage/postgresql integration-and-unit-tests: @@ -68,4 +68,4 @@ jobs: - name: Run unit tests run: go test -v ./storage/postgresql/... ./quota/postgresqlqm/... - \ No newline at end of file + diff --git a/README.md b/README.md index 1ad5f708a0..7a3ec98317 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,7 @@ The current state of feature implementation is recorded in the To build and test Trillian you need: - - Go 1.22 or later (go 1.22 matches cloudbuild, and is preferred for developers + - Go 1.23 or later (go 1.23 matches cloudbuild, and is preferred for developers that will be submitting PRs to this project). To run many of the tests (and production deployment) you need: diff --git a/go.mod b/go.mod index b6212bd8fa..1c0955d3f9 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module github.com/google/trillian go 1.23.0 -toolchain go1.23.6 +toolchain go1.23.4 require ( bitbucket.org/creachadair/shell v0.0.8 diff --git a/monitoring/testonly/metrics.go b/monitoring/testonly/metrics.go index 583d32c7d4..aea5b7a514 100644 --- a/monitoring/testonly/metrics.go +++ b/monitoring/testonly/metrics.go @@ -71,7 +71,7 @@ func TestCounter(t *testing.T, factory monitoring.MetricFactory) { // Use a different set of label values // Metrics with different valued label values, are distinct // This test is only applicable when a Metric has labels - if test.labelVals != nil && len(test.labelVals) >= 1 { + if len(test.labelVals) >= 1 { altLabels := make([]string, len(test.labelVals)) copy(altLabels, test.labelVals) altLabels[0] = "alt-val1" @@ -151,7 +151,7 @@ func TestGauge(t *testing.T, factory monitoring.MetricFactory) { // Use a different set of label values // Metrics with different valued label values, are distinct // This test is only applicable when a Metric has labels - if test.labelVals != nil && len(test.labelVals) >= 1 { + if len(test.labelVals) >= 1 { altLabels := make([]string, len(test.labelVals)) copy(altLabels, test.labelVals) altLabels[0] = "alt-val1" @@ -223,7 +223,7 @@ func TestHistogram(t *testing.T, factory monitoring.MetricFactory) { // Use a different set of label values // Metrics with different valued label values, are distinct // This test is only applicable when a Metric has labels - if test.labelVals != nil && len(test.labelVals) >= 1 { + if len(test.labelVals) >= 1 { altLabels := make([]string, len(test.labelVals)) copy(altLabels, test.labelVals) altLabels[0] = "alt-val1" diff --git a/server/errors/errors.go b/server/errors/errors.go index 3138e0e20f..d2fa45eb78 100644 --- a/server/errors/errors.go +++ b/server/errors/errors.go @@ -25,7 +25,7 @@ import ( // (such as canonical SQL errors), else err is returned unmodified. func WrapError(err error) error { if err == sql.ErrNoRows { - return status.Errorf(codes.NotFound, err.Error()) + return status.Error(codes.NotFound, err.Error()) } return err diff --git a/server/errors/errors_test.go b/server/errors/errors_test.go index bbde321851..ced27e06ea 100644 --- a/server/errors/errors_test.go +++ b/server/errors/errors_test.go @@ -42,7 +42,7 @@ func TestWrapError(t *testing.T) { }, { err: sql.ErrNoRows, - wantErr: status.Errorf(codes.NotFound, sql.ErrNoRows.Error()), + wantErr: status.Error(codes.NotFound, sql.ErrNoRows.Error()), }, } for _, test := range tests {