From ac4fcad7c99664d15738616861b5e79acbf11827 Mon Sep 17 00:00:00 2001 From: Mark Tsai <111229657+shuan1026@users.noreply.github.com> Date: Mon, 2 Mar 2026 15:57:59 +0000 Subject: [PATCH 1/3] [release-1.4] Bump go to 1.25.7 Signed-off-by: Mark Tsai <111229657+shuan1026@users.noreply.github.com> --- .go-version | 2 +- go.mod | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.go-version b/.go-version index 59b054466..f1968aa88 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.24.13 +1.25.7 diff --git a/go.mod b/go.mod index fea6febf2..c2e3d8e2f 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module go.etcd.io/bbolt go 1.24 -toolchain go1.24.13 +toolchain go1.25.7 require ( github.com/spf13/cobra v1.8.1 From e6e9f5f275393489e4a651686843b977e8269415 Mon Sep 17 00:00:00 2001 From: Mark Tsai <111229657+shuan1026@users.noreply.github.com> Date: Thu, 5 Mar 2026 06:15:20 +0000 Subject: [PATCH 2/3] Backport golangci-lint v2.10.1 and .golangci.yaml from main for Go 1.25.7 Required for CI to pass with Go 1.25 on release-1.4. Signed-off-by: Mark Tsai <111229657+shuan1026@users.noreply.github.com> --- .github/workflows/tests-template.yml | 8 +++--- .github/workflows/tests_windows.yml | 20 ++++++++------ .golangci.yaml | 40 ++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 12 deletions(-) create mode 100644 .golangci.yaml diff --git a/.github/workflows/tests-template.yml b/.github/workflows/tests-template.yml index 78c842fc1..723f45568 100644 --- a/.github/workflows/tests-template.yml +++ b/.github/workflows/tests-template.yml @@ -23,10 +23,10 @@ jobs: target: ${{ fromJSON(inputs.targets) }} runs-on: ${{ inputs.runs-on }} steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - id: goversion run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - - uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 + - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 with: go-version: ${{ steps.goversion.outputs.goversion }} - run: make fmt @@ -52,6 +52,6 @@ jobs: ;; esac - name: golangci-lint - uses: golangci/golangci-lint-action@ec5d18412c0aeab7936cb16880d708ba2a64e1ae # v6.2.0 + uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0 with: - version: v1.64.8 + version: v2.10.1 diff --git a/.github/workflows/tests_windows.yml b/.github/workflows/tests_windows.yml index 7f811ed2a..624ed1d73 100644 --- a/.github/workflows/tests_windows.yml +++ b/.github/workflows/tests_windows.yml @@ -19,10 +19,10 @@ jobs: # - windows-amd64-unit-test-4-cpu-race runs-on: windows-latest steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - id: goversion run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - - uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 + - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 with: go-version: ${{ steps.goversion.outputs.goversion }} - run: make fmt @@ -31,7 +31,7 @@ jobs: run: | case "${TARGET}" in windows-amd64-unit-test-4-cpu) - CPU=4 TIMEOUT=50m make test + CPU=4 TIMEOUT=60m make test ;; *) echo "Failed to find target" @@ -40,20 +40,24 @@ jobs: esac shell: bash - name: golangci-lint - uses: golangci/golangci-lint-action@ec5d18412c0aeab7936cb16880d708ba2a64e1ae # v6.2.0 + uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0 with: - version: v1.64.8 + version: v2.10.1 coverage: needs: ["test-windows"] runs-on: windows-latest steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - id: goversion run: echo "goversion=$(cat .go-version)" >> "$GITHUB_OUTPUT" - - uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 + - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0 with: go-version: ${{ steps.goversion.outputs.goversion }} + - name: Run golangci-lint + uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0 + with: + version: v2.10.1 - run: make coverage env: - TIMEOUT: 50m + TIMEOUT: 60m diff --git a/.golangci.yaml b/.golangci.yaml new file mode 100644 index 000000000..bef3f6de7 --- /dev/null +++ b/.golangci.yaml @@ -0,0 +1,40 @@ +formatters: + enable: + - gci + - gofmt + - goimports + settings: # please keep this alphabetized + gci: + sections: + - standard + - default + - prefix(go.etcd.io) + goimports: + local-prefixes: + - go.etcd.io # Put imports beginning with prefix after 3rd-party packages. +issues: + max-same-issues: 0 +linters: + default: none + enable: # please keep this alphabetized + - errcheck + - govet + - ineffassign + - staticcheck + - unused + exclusions: + presets: + - comments + - common-false-positives + - legacy + - std-error-handling + settings: # please keep this alphabetized + staticcheck: + checks: + - all + - -QF1003 # Convert if/else-if chain to tagged switch + - -QF1010 # Convert slice of bytes to string when printing it + - -ST1003 # Poorly chosen identifier + - -ST1005 # Incorrectly formatted error string + - -ST1012 # Poorly chosen name for error variable +version: "2" From 35e68c4aa8c9b917acd5f119dfe93d74cc39a4e0 Mon Sep 17 00:00:00 2001 From: Mark Tsai <111229657+shuan1026@users.noreply.github.com> Date: Sat, 7 Mar 2026 05:01:57 +0000 Subject: [PATCH 3/3] Bump Go to 1.25.8 Signed-off-by: Mark Tsai <111229657+shuan1026@users.noreply.github.com> --- .go-version | 2 +- go.mod | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.go-version b/.go-version index f1968aa88..e6a6e7cd3 100644 --- a/.go-version +++ b/.go-version @@ -1 +1 @@ -1.25.7 +1.25.8 diff --git a/go.mod b/go.mod index c2e3d8e2f..567100c81 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,8 @@ module go.etcd.io/bbolt -go 1.24 +go 1.25 -toolchain go1.25.7 +toolchain go1.25.8 require ( github.com/spf13/cobra v1.8.1