Skip to content

Commit

Permalink
Remove Go patch version from go.mod
Browse files Browse the repository at this point in the history
Fixes #4292
  • Loading branch information
kaovilai committed Dec 15, 2024
1 parent aa5a0d6 commit 119b07a
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version-file: 'go.mod'
go-version: '1.22'
check-latest: true
id: go
- name: Run Tests
Expand All @@ -33,4 +33,4 @@ jobs:
name: logs
path: .logs/**/*.log
if-no-files-found: ignore
if: ${{ always() }}
if: ${{ always() }}
2 changes: 1 addition & 1 deletion .github/workflows/compat-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version-file: 'go.mod'
go-version: '1.22'
check-latest: true
id: go
- name: Compat Test
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/endurance-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version-file: 'go.mod'
go-version: '1.22'
check-latest: true
id: go
- name: Endurance Tests
Expand All @@ -36,4 +36,4 @@ jobs:
name: logs
path: .logs/**/*.log
if-no-files-found: ignore
if: ${{ always() }}
if: ${{ always() }}
2 changes: 1 addition & 1 deletion .github/workflows/htmlui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version-file: 'go.mod'
go-version: '1.22'
check-latest: true
id: go
- name: Run Tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/license-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version-file: 'go.mod'
go-version: '1.22'
check-latest: true
id: go
- name: Download dependencies
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,21 @@ jobs:
- name: Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version-file: 'go.mod'
go-version: '1.22'
check-latest: true
id: go
if: ${{ !contains(matrix.os, 'ARMHF') }}
- id: govulncheck
uses: golang/govulncheck-action@b625fbe08f3bccbe446d94fbf87fcc875a4f50ee # v1.0.4
with:
cache: false
go-version-input:
go-version-file: 'go.mod'
# go-version-file do not account for latest compatible go https://github.com/actions/setup-go/issues/481
# which will break https://github.com/kopia/kopia/issues/4292 requirement if used
# leave below commented for vuln check to ignore vulns fixed in latest go
# go-version-file: 'go.mod'
go-version-input: '1.22'
repo-checkout: false
check-latest: true
- name: Lint
run: make lint
- name: Check Locks
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version-file: 'go.mod'
go-version: '1.22'
check-latest: true
id: go
if: ${{ !contains(matrix.os, 'ARMHF') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/providers-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version-file: 'go.mod'
go-version: '1.22'
check-latest: true
id: go
- name: Install Dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/providers-extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version-file: 'go.mod'
go-version: '1.22'
check-latest: true
id: go
- name: Install Dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/race-detector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version-file: 'go.mod'
go-version: '1.22'
check-latest: true
id: go
- name: Unit Tests
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/stress-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version-file: 'go.mod'
go-version: '1.22'
check-latest: true
id: go
- name: Stress Test
Expand All @@ -35,4 +35,4 @@ jobs:
name: logs
path: .logs/**/*.log
if-no-files-found: ignore
if: ${{ always() }}
if: ${{ always() }}
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version-file: 'go.mod'
go-version: '1.22'
check-latest: true
id: go
if: ${{ !contains(matrix.os, 'ARMHF') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/volume-shadow-copy-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
with:
go-version-file: 'go.mod'
go-version: '1.22'
check-latest: true
id: go
- name: Install gsudo
Expand Down
8 changes: 7 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
module github.com/kopia/kopia

go 1.22.7
// keep go patch version .0 if possible to prevent enforcing minimum toolchain version on dependencies
// https://github.com/kopia/kopia/issues/4292
// if `go mod tidy` adds toolchain, try `go mod tidy && go get toolchain@none` first.
// also bump all github actions
// - `go-version: '1.22'` to next minor version
// - `go-version-input: '1.22'` to next minor version
go 1.22.0

require (
cloud.google.com/go/storage v1.48.0
Expand Down

0 comments on commit 119b07a

Please sign in to comment.