Skip to content

Commit 4000d1c

Browse files
dhaiducekopenshift-merge-bot[bot]
authored andcommitted
[release-2.14] Update to Go v1.24
ref: https://issues.redhat.com/browse/ACM-24264 Signed-off-by: Dale Haiducek <[email protected]>
1 parent e0d973d commit 4000d1c

File tree

6 files changed

+9
-11
lines changed

6 files changed

+9
-11
lines changed

.ci-operator.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
build_root_image:
22
name: builder
33
namespace: stolostron
4-
tag: go1.23-linux
4+
tag: go1.24-linux

build/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright Contributors to the Open Cluster Management project
22

33
# Stage 1: Use image builder to build the target binaries
4-
FROM registry.ci.openshift.org/stolostron/builder:go1.23-linux AS builder
4+
FROM registry.ci.openshift.org/stolostron/builder:go1.24-linux AS builder
55

66
ENV COMPONENT=config-policy-controller
77
ENV REPO_PATH=/go/src/github.com/stolostron/${COMPONENT}

build/Dockerfile.rhtap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright Contributors to the Open Cluster Management project
22

33
# Stage 1: Use image builder to build the target binaries
4-
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.23@sha256:96cfceb50f5323efa1aa8569d4420cdbf1bb391225d5171ef72a0d0ecf028467 AS builder
4+
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.24 AS builder
55

66
ENV COMPONENT=config-policy-controller
77
ENV REPO_PATH=/go/src/github.com/stolostron/${COMPONENT}
@@ -10,7 +10,7 @@ COPY . .
1010
RUN make build
1111

1212
# Stage 2: Copy the binaries from the image builder to the base image
13-
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest@sha256:34880b64c07f28f64d95737f82f891516de9a3b43583f39970f7bf8e4cfa48b7
13+
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest
1414

1515
ENV COMPONENT=config-policy-controller
1616
ENV REPO_PATH=/go/src/github.com/stolostron/${COMPONENT}

controllers/configurationpolicy_controller_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
package controllers
55

66
import (
7-
"context"
87
"fmt"
98
"reflect"
109
"sync"
@@ -72,7 +71,7 @@ func TestReconcile(t *testing.T) {
7271
},
7372
}
7473

75-
res, err := r.Reconcile(context.TODO(), req)
74+
res, err := r.Reconcile(t.Context(), req)
7675
if err != nil {
7776
t.Fatalf("reconcile: (%v)", err)
7877
}

controllers/encryption_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
package controllers
55

66
import (
7-
"context"
87
"crypto/rand"
98
"testing"
109

@@ -75,7 +74,7 @@ func TestGetEncryptionConfig(t *testing.T) {
7574

7675
policy := getEmptyPolicy()
7776

78-
config, err := r.getEncryptionConfig(context.TODO(), &policy)
77+
config, err := r.getEncryptionConfig(t.Context(), &policy)
7978
Expect(err).ToNot(HaveOccurred())
8079
Expect(config).ToNot(BeNil())
8180
Expect(config.AESKey).ToNot(BeNil())
@@ -100,7 +99,7 @@ func TestGetEncryptionConfigInvalidIV(t *testing.T) {
10099
},
101100
}
102101

103-
_, err := r.getEncryptionConfig(context.TODO(), &policy)
102+
_, err := r.getEncryptionConfig(t.Context(), &policy)
104103
Expect(err.Error()).To(
105104
Equal(
106105
"the policy annotation of \"policy.open-cluster-management.io/encryption-iv\" is not Base64: illegal " +
@@ -117,7 +116,7 @@ func TestGetEncryptionConfigNoSecret(t *testing.T) {
117116

118117
policy := getEmptyPolicy()
119118

120-
_, err := r.getEncryptionConfig(context.TODO(), &policy)
119+
_, err := r.getEncryptionConfig(t.Context(), &policy)
121120
Expect(err.Error()).To(
122121
Equal(
123122
`failed to get the encryption key from Secret local-cluster/policy-encryption-key: secrets ` +

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module open-cluster-management.io/config-policy-controller
22

3-
go 1.23.0
3+
go 1.24.0
44

55
require (
66
github.com/Masterminds/sprig/v3 v3.2.3

0 commit comments

Comments
 (0)