Skip to content

Commit f753b78

Browse files
Merge pull request #768 from CodesbyUnnati/golang-bump-1.25
Bump Golang 1.25.6 + golangci-lint to 2.4
2 parents 04e4b4c + 69e2676 commit f753b78

File tree

4 files changed

+24
-15
lines changed

4 files changed

+24
-15
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
with:
2121
go-version-file: go.mod
2222
- name: golangci-lint
23-
uses: golangci/golangci-lint-action@v6
23+
uses: golangci/golangci-lint-action@v7
2424
with:
25-
version: v1.64
25+
version: v2.4
2626
args: -v

.golangci.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
1+
version: "2"
12
linters:
3+
default: none
24
enable:
35
- goheader
46
- revive
57
- unused
68
- staticcheck
7-
- typecheck
89
- govet
9-
disable-all: true
10-
# all available settings of specific linters
11-
linters-settings:
12-
goheader:
13-
values:
14-
regexp:
15-
copyright-year: 20[0-9][0-9]
16-
template-path: code-header-template.txt
10+
settings:
11+
goheader:
12+
values:
13+
regexp:
14+
copyright-year: 20[0-9][0-9]
15+
template-path: code-header-template.txt
1716
issues:
1817
max-issues-per-linter: 0
1918
max-same-issues: 0
20-
exclude-use-default: false
21-
new-from-rev: 01ef727b5a403cf1df143adbf699aa0de2c765d9
19+
new-from-rev: 04e4b4c2c70952cd00b89ec3ed781f4cd01c9803

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module carvel.dev/imgpkg
22

3-
go 1.24.9
3+
go 1.25.6
44

55
require (
66
github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.9.1

pkg/imgpkg/v1/copy_test.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,18 @@ func TestToTarImage(t *testing.T) {
325325

326326
_, err := v1.CopyToTar(origin, imageTarPath, opts, reg)
327327
require.ErrorContains(t, err, "error verifying sha256 checksum")
328-
reader := imagetar.NewTarReader(imageTarPath, 1)
328+
// Creating a temp copy of the tarball to verify it without locking the original file.
329+
// This ensures 'imageTarPath' is free for the Resume operation to move/rename it.
330+
verifyPath := imageTarPath + ".verify"
331+
bs, err := os.ReadFile(imageTarPath)
332+
require.NoError(t, err)
333+
err = os.WriteFile(verifyPath, bs, 0600)
334+
require.NoError(t, err)
335+
// Cleanup the copy when done
336+
defer os.Remove(verifyPath)
337+
338+
// Point the reader to the COPY (verifyPath), not the original
339+
reader := imagetar.NewTarReader(verifyPath, 1)
329340
layersInTar, err = reader.PresentLayers()
330341
require.NoError(t, err)
331342
require.Greater(t, len(layersInTar), 1)

0 commit comments

Comments
 (0)