Skip to content

Commit 3c2c13b

Browse files
Merge pull request #2046 from tchap/update-base-images
OCPSTRAT-2147: Upgrade to go 1.24 and OCP 4.20
2 parents 9b2ae28 + d93b7a2 commit 3c2c13b

File tree

49 files changed

+135
-113
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+135
-113
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: release
33
namespace: openshift
4-
tag: rhel-9-release-golang-1.23-openshift-4.19
4+
tag: rhel-9-release-golang-1.24-openshift-4.20

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/openshift/oc
22

3-
go 1.23.0
3+
go 1.24.0
44

55
require (
66
github.com/AaronO/go-git-http v0.0.0-20161214145340-1d9485b3a98f
@@ -33,7 +33,7 @@ require (
3333
github.com/opencontainers/go-digest v1.0.0
3434
github.com/opencontainers/image-spec v1.1.0
3535
github.com/openshift/api v0.0.0-20250130025500-d9e1a2e1fe6b
36-
github.com/openshift/build-machinery-go v0.0.0-20250102153059-e85a1a7ecb5c
36+
github.com/openshift/build-machinery-go v0.0.0-20250602125535-1b6d00b8c37c
3737
github.com/openshift/client-go v0.0.0-20250125113824-8e1f0b8fa9a7
3838
github.com/openshift/library-go v0.0.0-20250218150059-017e5b6cf27c
3939
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,8 @@ github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaL
491491
github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec=
492492
github.com/openshift/api v0.0.0-20250130025500-d9e1a2e1fe6b h1:6OdSvfIgEGZ4Oc4zmhcaCRGWeJHVvHc3fkoRckWYajQ=
493493
github.com/openshift/api v0.0.0-20250130025500-d9e1a2e1fe6b/go.mod h1:yk60tHAmHhtVpJQo3TwVYq2zpuP70iJIFDCmeKMIzPw=
494-
github.com/openshift/build-machinery-go v0.0.0-20250102153059-e85a1a7ecb5c h1:6XcszPFZpan4qll5XbdLll7n1So3IsPn28aw2j1obMo=
495-
github.com/openshift/build-machinery-go v0.0.0-20250102153059-e85a1a7ecb5c/go.mod h1:8jcm8UPtg2mCAsxfqKil1xrmRMI3a+XU2TZ9fF8A7TE=
494+
github.com/openshift/build-machinery-go v0.0.0-20250602125535-1b6d00b8c37c h1:gJvhduWIrpzoUTwrJjjeul+hGETKkhRhEZosBg/X3Hg=
495+
github.com/openshift/build-machinery-go v0.0.0-20250602125535-1b6d00b8c37c/go.mod h1:8jcm8UPtg2mCAsxfqKil1xrmRMI3a+XU2TZ9fF8A7TE=
496496
github.com/openshift/client-go v0.0.0-20250125113824-8e1f0b8fa9a7 h1:4iliLcvr1P9EUMZgIaSNEKNQQzBn+L6PSequlFOuB6Q=
497497
github.com/openshift/client-go v0.0.0-20250125113824-8e1f0b8fa9a7/go.mod h1:2tcufBE4Cu6RNgDCxcUJepa530kGo5GFVfR9BSnndhI=
498498
github.com/openshift/gssapi v0.0.0-20161010215902-5fb4217df13b h1:it0YPE/evO6/m8t8wxis9KFI2F/aleOKsI6d9uz0cEk=

images/cli-artifacts/Dockerfile.rhel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# This Dockerfile builds an image containing the Mac and Windows version of oc
22
# layered on top of the Linux cli image.
3-
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.23-openshift-4.19 AS builder
3+
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.24-openshift-4.20 AS builder
44
WORKDIR /go/src/github.com/openshift/oc
55
COPY . .
66
RUN make cross-build --warn-undefined-variables
77

8-
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.23-openshift-4.19 AS builder-rhel-9
8+
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.24-openshift-4.20 AS builder-rhel-9
99
WORKDIR /go/src/github.com/openshift/oc
1010
COPY . .
1111
RUN make cross-build --warn-undefined-variables
1212

13-
FROM registry.ci.openshift.org/ocp/4.19:cli
13+
FROM registry.ci.openshift.org/ocp/4.20:cli
1414

1515
COPY --from=builder-rhel-9 /go/src/github.com/openshift/oc/_output/bin/ /usr/share/openshift/
1616

images/cli/Dockerfile.rhel

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.23-openshift-4.19 AS builder
1+
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.24-openshift-4.20 AS builder
22
WORKDIR /go/src/github.com/openshift/oc
33
COPY . .
44
RUN make build --warn-undefined-variables
55

6-
FROM registry.ci.openshift.org/ocp/4.19:base-rhel9
6+
FROM registry.ci.openshift.org/ocp/4.20:base-rhel9
77
COPY --from=builder /go/src/github.com/openshift/oc/oc /usr/bin/
88
RUN for i in kubectl openshift-deploy openshift-docker-build openshift-sti-build openshift-git-clone openshift-manage-dockerfile openshift-extract-image-content openshift-recycle; do ln -sf /usr/bin/oc /usr/bin/$i; done
99
LABEL io.k8s.display-name="OpenShift Client" \

images/deployer/Dockerfile.rhel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM registry.ci.openshift.org/ocp/4.19:cli
1+
FROM registry.ci.openshift.org/ocp/4.20:cli
22

33
LABEL io.k8s.display-name="OpenShift Deployer" \
44
io.k8s.description="This is a component of OpenShift and executes the user deployment process to roll out new containers. It may be used as a base image for building your own custom deployer image." \

images/tools/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.23-openshift-4.19 AS builder
1+
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.24-openshift-4.20 AS builder
22
WORKDIR /go/src/github.com/openshift/oc
33
COPY . .
44
RUN make build --warn-undefined-variables
55

6-
FROM registry.ci.openshift.org/ocp/4.19:base-rhel9
6+
FROM registry.ci.openshift.org/ocp/4.20:base-rhel9
77
COPY --from=builder /go/src/github.com/openshift/oc/oc /usr/bin/
88
COPY --from=builder /go/src/github.com/openshift/oc/images/tools/sos.conf /etc/sos/
99
RUN for i in kubectl openshift-deploy openshift-docker-build openshift-sti-build openshift-git-clone openshift-manage-dockerfile openshift-extract-image-content openshift-recycle; do ln -sf /usr/bin/oc /usr/bin/$i; done

pkg/cli/admin/admin.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package admin
22

33
import (
4-
"fmt"
5-
64
"github.com/spf13/cobra"
75

86
"k8s.io/cli-runtime/pkg/genericiooptions"
@@ -57,7 +55,7 @@ func NewCommandAdmin(f kcmdutil.Factory, streams genericiooptions.IOStreams) *co
5755
cmds := &cobra.Command{
5856
Use: "adm",
5957
Short: "Tools for managing a cluster",
60-
Long: fmt.Sprintf(adminLong),
58+
Long: adminLong,
6159
Run: kcmdutil.DefaultSubCommandRun(streams.ErrOut),
6260
}
6361

pkg/cli/admin/mustgather/mustgather.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package mustgather
33
import (
44
"bufio"
55
"context"
6+
"errors"
67
"fmt"
78
"io"
89
"math/rand"
@@ -21,7 +22,7 @@ import (
2122
kerrors "k8s.io/apimachinery/pkg/api/errors"
2223
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2324
"k8s.io/apimachinery/pkg/runtime/schema"
24-
"k8s.io/apimachinery/pkg/util/errors"
25+
kutilerrors "k8s.io/apimachinery/pkg/util/errors"
2526
"k8s.io/apimachinery/pkg/util/wait"
2627
"k8s.io/cli-runtime/pkg/genericclioptions"
2728
"k8s.io/cli-runtime/pkg/genericiooptions"
@@ -483,7 +484,7 @@ func (o *MustGatherOptions) Run() error {
483484
line := fmt.Sprintf("unable to parse image reference %s: %v", image, err)
484485
o.log(line)
485486
// ensure the errors bubble up to BackupGathering method for display
486-
errs = []error{fmt.Errorf(line)}
487+
errs = []error{errors.New(line)}
487488
return err
488489
}
489490
if o.NodeSelector != "" {
@@ -564,7 +565,7 @@ func (o *MustGatherOptions) Run() error {
564565
errs = append(errs, err)
565566
}
566567

567-
return errors.NewAggregate(errs)
568+
return kutilerrors.NewAggregate(errs)
568569
}
569570

570571
// processNextWorkItem creates & processes the must-gather pod and returns error if any
@@ -708,7 +709,7 @@ func (o *MustGatherOptions) copyFilesFromPod(pod *corev1.Pod) error {
708709
err = rsyncOptions.RunRsync()
709710
errs = append(errs, err)
710711
}
711-
return errors.NewAggregate(errs)
712+
return kutilerrors.NewAggregate(errs)
712713
}
713714

714715
func (o *MustGatherOptions) getGatherContainerLogs(pod *corev1.Pod) error {
@@ -1070,7 +1071,7 @@ func (o *MustGatherOptions) BackupGathering(ctx context.Context, errs []error) {
10701071
}
10711072

10721073
fmt.Fprintf(o.ErrOut, "\n\n") // Space out the output
1073-
fmt.Fprintf(o.ErrOut, "Error running must-gather collection:\n %v\n\n", errors.NewAggregate(errs))
1074+
fmt.Fprintf(o.ErrOut, "Error running must-gather collection:\n %v\n\n", kutilerrors.NewAggregate(errs))
10741075
fmt.Fprintf(o.ErrOut, "Falling back to `oc adm inspect %s` to collect basic cluster types.\n", typeTargets)
10751076

10761077
streams := o.IOStreams

pkg/cli/admin/mustgather/summary.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
// to one of those three spots. Doing so improves the self-diagnosis capabilities of our platform and lets *every*
2626
// client benefit.
2727
func (o *MustGatherOptions) PrintBasicClusterState(ctx context.Context) {
28-
fmt.Fprintf(o.RawOut, "When opening a support case, bugzilla, or issue please include the following summary data along with any other requested information:\n")
28+
fmt.Fprint(o.RawOut, "When opening a support case, bugzilla, or issue please include the following summary data along with any other requested information:\n")
2929

3030
clusterVersion, err := o.ConfigClient.ConfigV1().ClusterVersions().Get(ctx, "version", metav1.GetOptions{})
3131
if err != nil {
@@ -44,11 +44,11 @@ func (o *MustGatherOptions) PrintBasicClusterState(ctx context.Context) {
4444
if err != nil {
4545
fmt.Fprintf(o.RawOut, "error getting cluster operators: %v\n", err)
4646
}
47-
fmt.Fprintf(o.RawOut, "ClusterOperators:\n")
48-
fmt.Fprintf(o.RawOut, humanSummaryForInterestingClusterOperators(clusterOperators)+"\n")
47+
fmt.Fprint(o.RawOut, "ClusterOperators:\n")
48+
fmt.Fprint(o.RawOut, humanSummaryForInterestingClusterOperators(clusterOperators)+"\n")
4949

5050
// TODO gather and display firing alerts
51-
fmt.Fprintf(o.RawOut, "\n\n")
51+
fmt.Fprint(o.RawOut, "\n\n")
5252
}
5353

5454
// longExistingOperators is a list of operators that should be present on every variant of every platform and have

0 commit comments

Comments
 (0)