Skip to content

Commit 048da8f

Browse files
authored
Merge pull request #3052 from simonbaird/update-golang-main
Update golang to 1.24.6 (main)
2 parents 32c3e4c + 1141da8 commit 048da8f

File tree

11 files changed

+22
-29
lines changed

11 files changed

+22
-29
lines changed

.golangci.yaml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,4 @@ linters-settings:
3333
- prefix(github.com/conforma/cli)
3434

3535
issues:
36-
exclude-rules:
37-
# Some function in acceptance, e.g. ImageReferenceInStubRegistry, take a string parameter which
38-
# is used in call to a string format call, e.g. fmt.Sprintf(...). Golinter started complaining
39-
# starting on version v1.60. Since these are acceptance tests, there isn't a lot of harm in
40-
# allowing this.
41-
- path: acceptance
42-
linters: [govet]
43-
text: "printf: non-constant format string in call"
36+
exclude-rules: []

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
golang 1.24.4
1+
golang 1.24.6

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
## Build
1818

19-
FROM docker.io/library/golang:1.24.4 AS build
19+
FROM docker.io/library/golang:1.24.6 AS build
2020

2121
ARG TARGETOS
2222
ARG TARGETARCH
@@ -43,7 +43,7 @@ RUN /build/build.sh "${BUILD_LIST}" "${BUILD_SUFFIX}"
4343

4444
## Final image
4545

46-
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest@sha256:161a4e29ea482bab6048c2b36031b4f302ae81e4ff18b83e61785f40dc576f5d
46+
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest@sha256:6fc28bcb6776e387d7a35a2056d9d2b985dc4e26031e98a2bd35a7137cd6fd71
4747

4848
ARG TARGETOS
4949
ARG TARGETARCH

Dockerfile.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
## Build
1818

19-
FROM registry.access.redhat.com/ubi9/go-toolset:1.24.4@sha256:3ce6311380d5180599a3016031a9112542d43715244816d1d0eabc937952667b AS build
19+
FROM registry.access.redhat.com/ubi9/go-toolset:1.24.6@sha256:6234f572204d672a0ee0686d748fbb9b7b05679368bf0d7a4446e13970e58060 AS build
2020

2121
ARG TARGETOS
2222
ARG TARGETARCH
@@ -43,7 +43,7 @@ RUN /build/build.sh "${BUILD_LIST}" "${BUILD_SUFFIX}"
4343

4444
## Final image
4545

46-
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest@sha256:161a4e29ea482bab6048c2b36031b4f302ae81e4ff18b83e61785f40dc576f5d
46+
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest@sha256:6fc28bcb6776e387d7a35a2056d9d2b985dc4e26031e98a2bd35a7137cd6fd71
4747

4848
ARG TARGETOS
4949
ARG TARGETARCH

acceptance/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/conforma/cli/acceptance
22

3-
go 1.24.4
3+
go 1.24.6
44

55
require (
66
cuelang.org/go v0.11.1

acceptance/image/image.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ func CreateAndPushImageSignature(ctx context.Context, imageName string, keyName
198198
}
199199

200200
// the name of the image + the <hash>.sig tag
201-
ref, err := registry.ImageReferenceInStubRegistry(ctx, imageName+":%s-%s.sig", digest.Algorithm, digest.Hex)
201+
ref, err := registry.ImageReferenceInStubRegistry(ctx, fmt.Sprintf("%s:%s-%s.sig", imageName, digest.Algorithm, digest.Hex))
202202
if err != nil {
203203
return ctx, err
204204
}
@@ -306,7 +306,7 @@ func createAndPushAttestationWithPatches(ctx context.Context, imageName, keyName
306306
}
307307

308308
// the name of the image + the <hash>.att tag
309-
ref, err := registry.ImageReferenceInStubRegistry(ctx, imageName+":%s-%s.att", digest.Algorithm, digest.Hex)
309+
ref, err := registry.ImageReferenceInStubRegistry(ctx, fmt.Sprintf("%s:%s-%s.att", imageName, digest.Algorithm, digest.Hex))
310310
if err != nil {
311311
return ctx, err
312312
}
@@ -401,7 +401,7 @@ func createAndPushImageWithLayer(ctx context.Context, imageName string, files *g
401401
func createAndPushLayer(ctx context.Context, content string, imageName string) (context.Context, error) {
402402
l := s.NewLayer([]byte(content), types.OCIUncompressedLayer)
403403

404-
ref, err := registry.ImageReferenceInStubRegistry(ctx, "%s", imageName)
404+
ref, err := registry.ImageReferenceInStubRegistry(ctx, imageName)
405405
if err != nil {
406406
return ctx, err
407407
}
@@ -489,7 +489,7 @@ func createAndPushPlainImage(ctx context.Context, imageName string, patch patchF
489489
return ctx, "", err
490490
}
491491

492-
ref, err := registry.ImageReferenceInStubRegistry(ctx, "%s", imageName)
492+
ref, err := registry.ImageReferenceInStubRegistry(ctx, imageName)
493493
if err != nil {
494494
return ctx, "", err
495495
}
@@ -535,7 +535,7 @@ func resolveRefDigest(url string) (string, error) {
535535
// createAndPushKeylessImage loads an existing image from disk, along its signature and attestation
536536
// into the docker registry.
537537
func createAndPushKeylessImage(ctx context.Context, imageName string) (context.Context, error) {
538-
ref, err := registry.ImageReferenceInStubRegistry(ctx, "%s", imageName)
538+
ref, err := registry.ImageReferenceInStubRegistry(ctx, imageName)
539539
if err != nil {
540540
return ctx, err
541541
}
@@ -705,7 +705,7 @@ func createAndPushPolicyBundle(ctx context.Context, imageName string, files *god
705705
}
706706
}
707707

708-
ref, err := registry.ImageReferenceInStubRegistry(ctx, "%s", imageName)
708+
ref, err := registry.ImageReferenceInStubRegistry(ctx, imageName)
709709
if err != nil {
710710
return ctx, err
711711
}
@@ -912,7 +912,7 @@ func steal(what string) func(context.Context, string, string) (context.Context,
912912
return ctx, err
913913
}
914914

915-
fromRef, err := registry.ImageReferenceInStubRegistry(ctx, signatureFrom+":%s-%s.%s", fromDigest.Algorithm, fromDigest.Hex, what)
915+
fromRef, err := registry.ImageReferenceInStubRegistry(ctx, fmt.Sprintf("%s:%s-%s.%s", signatureFrom, fromDigest.Algorithm, fromDigest.Hex, what))
916916
if err != nil {
917917
return ctx, err
918918
}
@@ -932,7 +932,7 @@ func steal(what string) func(context.Context, string, string) (context.Context,
932932
return ctx, err
933933
}
934934

935-
toRef, err := registry.ImageReferenceInStubRegistry(ctx, imageName+":%s-%s.%s", toDigest.Algorithm, toDigest.Hex, what)
935+
toRef, err := registry.ImageReferenceInStubRegistry(ctx, fmt.Sprintf("%s:%s-%s.%s", imageName, toDigest.Algorithm, toDigest.Hex, what))
936936
if err != nil {
937937
return ctx, err
938938
}

acceptance/registry/registry.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,14 @@ func startStubRegistry(ctx context.Context) (context.Context, error) {
9999
}
100100

101101
// ImageReferenceInStubRegistry returns a reference for an image constructed by concatenating
102-
// the host:port/`name` where the name is formatted by the given format and arguments
103-
func ImageReferenceInStubRegistry(ctx context.Context, format string, args ...interface{}) (name.Reference, error) {
102+
// the host:port/`imageName`
103+
func ImageReferenceInStubRegistry(ctx context.Context, imageName string) (name.Reference, error) {
104104
registry, err := StubRegistry(ctx)
105105
if err != nil {
106106
return nil, err
107107
}
108108

109-
imageRef := registry + "/" + fmt.Sprintf(format, args...)
109+
imageRef := registry + "/" + imageName
110110

111111
ref, err := name.ParseReference(imageRef)
112112
if err != nil {

acceptance/tekton/bundles.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func createTektonBundle(ctx context.Context, name string, data *godog.Table) (co
7878
}
7979
}
8080

81-
ref, err := registry.ImageReferenceInStubRegistry(ctx, "%s", name)
81+
ref, err := registry.ImageReferenceInStubRegistry(ctx, name)
8282
if err != nil {
8383
return ctx, err
8484
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/conforma/cli
22

3-
go 1.24.4
3+
go 1.24.6
44

55
require (
66
cuelang.org/go v0.13.2

tools/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/conforma/cli/tools
22

3-
go 1.24.4
3+
go 1.24.6
44

55
require (
66
github.com/daixiang0/gci v0.13.5

0 commit comments

Comments
 (0)