From 3d24e7d7516061c84fbd42b4544c2aec667f634e Mon Sep 17 00:00:00 2001 From: Marek Schmidt Date: Tue, 6 Aug 2024 13:35:46 +0200 Subject: [PATCH] update to go 1.22 (#706) --- go.mod | 2 +- openshift/ci-operator/build-image/Dockerfile | 2 +- .../knative-images/apiserver_receive_adapter/Dockerfile | 2 +- openshift/ci-operator/knative-images/appender/Dockerfile | 2 +- .../knative-images/channel_controller/Dockerfile | 2 +- .../knative-images/channel_dispatcher/Dockerfile | 2 +- .../ci-operator/knative-images/controller/Dockerfile | 2 +- .../ci-operator/knative-images/event_display/Dockerfile | 2 +- openshift/ci-operator/knative-images/filter/Dockerfile | 2 +- .../ci-operator/knative-images/heartbeats/Dockerfile | 2 +- .../knative-images/heartbeats_receiver/Dockerfile | 2 +- openshift/ci-operator/knative-images/ingress/Dockerfile | 2 +- openshift/ci-operator/knative-images/migrate/Dockerfile | 2 +- .../knative-images/mtchannel_broker/Dockerfile | 2 +- openshift/ci-operator/knative-images/mtping/Dockerfile | 2 +- openshift/ci-operator/knative-images/pong/Dockerfile | 2 +- openshift/ci-operator/knative-images/schema/Dockerfile | 2 +- openshift/ci-operator/knative-images/webhook/Dockerfile | 2 +- .../knative-images/websocketsource/Dockerfile | 2 +- .../knative-test-images/event-sender/Dockerfile | 2 +- .../ci-operator/knative-test-images/eventshub/Dockerfile | 2 +- .../knative-test-images/performance/Dockerfile | 2 +- .../ci-operator/knative-test-images/print/Dockerfile | 2 +- .../knative-test-images/recordevents/Dockerfile | 2 +- .../knative-test-images/request-sender/Dockerfile | 2 +- .../knative-test-images/wathola-fetcher/Dockerfile | 2 +- .../knative-test-images/wathola-forwarder/Dockerfile | 2 +- .../knative-test-images/wathola-receiver/Dockerfile | 2 +- .../knative-test-images/wathola-sender/Dockerfile | 2 +- openshift/generate.sh | 9 +++++++-- 30 files changed, 36 insertions(+), 31 deletions(-) diff --git a/go.mod b/go.mod index dc07dd262b2..0d6adcd525a 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module knative.dev/eventing -go 1.21 +go 1.22 require ( github.com/ahmetb/gen-crd-api-reference-docs v0.3.1-0.20210420163308-c1402a70e2f1 diff --git a/openshift/ci-operator/build-image/Dockerfile b/openshift/ci-operator/build-image/Dockerfile index 38affb811eb..db7b13ce002 100755 --- a/openshift/ci-operator/build-image/Dockerfile +++ b/openshift/ci-operator/build-image/Dockerfile @@ -1,7 +1,7 @@ # DO NOT EDIT! Generated Dockerfile. # Dockerfile to bootstrap build and test in openshift-ci -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder RUN echo "[kubernetes]" >> /etc/yum.repos.d/kubernetes.repo && \ echo "name=Kubernetes" >> /etc/yum.repos.d/kubernetes.repo && \ diff --git a/openshift/ci-operator/knative-images/apiserver_receive_adapter/Dockerfile b/openshift/ci-operator/knative-images/apiserver_receive_adapter/Dockerfile index 854e01a7ba8..02c5e7040d8 100755 --- a/openshift/ci-operator/knative-images/apiserver_receive_adapter/Dockerfile +++ b/openshift/ci-operator/knative-images/apiserver_receive_adapter/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for cmd/apiserver_receive_adapter. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/ci-operator/knative-images/appender/Dockerfile b/openshift/ci-operator/knative-images/appender/Dockerfile index a90e5f593b8..65a04fd49a9 100755 --- a/openshift/ci-operator/knative-images/appender/Dockerfile +++ b/openshift/ci-operator/knative-images/appender/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for cmd/appender. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/ci-operator/knative-images/channel_controller/Dockerfile b/openshift/ci-operator/knative-images/channel_controller/Dockerfile index 3278f3dd257..93664191204 100755 --- a/openshift/ci-operator/knative-images/channel_controller/Dockerfile +++ b/openshift/ci-operator/knative-images/channel_controller/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for cmd/in_memory/channel_controller. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/ci-operator/knative-images/channel_dispatcher/Dockerfile b/openshift/ci-operator/knative-images/channel_dispatcher/Dockerfile index 4bc5f541392..98404385585 100755 --- a/openshift/ci-operator/knative-images/channel_dispatcher/Dockerfile +++ b/openshift/ci-operator/knative-images/channel_dispatcher/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for cmd/in_memory/channel_dispatcher. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/ci-operator/knative-images/controller/Dockerfile b/openshift/ci-operator/knative-images/controller/Dockerfile index 6de3dcb43c7..a35d6b4bf67 100755 --- a/openshift/ci-operator/knative-images/controller/Dockerfile +++ b/openshift/ci-operator/knative-images/controller/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for cmd/controller. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/ci-operator/knative-images/event_display/Dockerfile b/openshift/ci-operator/knative-images/event_display/Dockerfile index 981540335fe..a6ef531c451 100755 --- a/openshift/ci-operator/knative-images/event_display/Dockerfile +++ b/openshift/ci-operator/knative-images/event_display/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for cmd/event_display. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/ci-operator/knative-images/filter/Dockerfile b/openshift/ci-operator/knative-images/filter/Dockerfile index 4616758d483..70a8977623c 100755 --- a/openshift/ci-operator/knative-images/filter/Dockerfile +++ b/openshift/ci-operator/knative-images/filter/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for cmd/broker/filter. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/ci-operator/knative-images/heartbeats/Dockerfile b/openshift/ci-operator/knative-images/heartbeats/Dockerfile index 9fe90e3c369..6d7a30b72df 100755 --- a/openshift/ci-operator/knative-images/heartbeats/Dockerfile +++ b/openshift/ci-operator/knative-images/heartbeats/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for cmd/heartbeats. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/ci-operator/knative-images/heartbeats_receiver/Dockerfile b/openshift/ci-operator/knative-images/heartbeats_receiver/Dockerfile index 0a18a97597f..806c93443fb 100755 --- a/openshift/ci-operator/knative-images/heartbeats_receiver/Dockerfile +++ b/openshift/ci-operator/knative-images/heartbeats_receiver/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for cmd/heartbeats_receiver. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/ci-operator/knative-images/ingress/Dockerfile b/openshift/ci-operator/knative-images/ingress/Dockerfile index a0f1336e895..95757d4ecf2 100755 --- a/openshift/ci-operator/knative-images/ingress/Dockerfile +++ b/openshift/ci-operator/knative-images/ingress/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for cmd/broker/ingress. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/ci-operator/knative-images/migrate/Dockerfile b/openshift/ci-operator/knative-images/migrate/Dockerfile index 181526ae715..54753318f67 100755 --- a/openshift/ci-operator/knative-images/migrate/Dockerfile +++ b/openshift/ci-operator/knative-images/migrate/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for vendor/knative.dev/pkg/apiextensions/storageversion/cmd/migrate. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/ci-operator/knative-images/mtchannel_broker/Dockerfile b/openshift/ci-operator/knative-images/mtchannel_broker/Dockerfile index c97a779100b..7029726dc65 100755 --- a/openshift/ci-operator/knative-images/mtchannel_broker/Dockerfile +++ b/openshift/ci-operator/knative-images/mtchannel_broker/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for cmd/mtchannel_broker. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/ci-operator/knative-images/mtping/Dockerfile b/openshift/ci-operator/knative-images/mtping/Dockerfile index 4b0ef0f7be7..fdd348fb2a4 100755 --- a/openshift/ci-operator/knative-images/mtping/Dockerfile +++ b/openshift/ci-operator/knative-images/mtping/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for cmd/mtping. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/ci-operator/knative-images/pong/Dockerfile b/openshift/ci-operator/knative-images/pong/Dockerfile index 3de767a4e8a..34a95f1ca3c 100755 --- a/openshift/ci-operator/knative-images/pong/Dockerfile +++ b/openshift/ci-operator/knative-images/pong/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for cmd/pong. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/ci-operator/knative-images/schema/Dockerfile b/openshift/ci-operator/knative-images/schema/Dockerfile index cf6a76848a0..d35b2eb141f 100755 --- a/openshift/ci-operator/knative-images/schema/Dockerfile +++ b/openshift/ci-operator/knative-images/schema/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for cmd/schema. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/ci-operator/knative-images/webhook/Dockerfile b/openshift/ci-operator/knative-images/webhook/Dockerfile index f443a6fa41c..9c6a52ba2dd 100755 --- a/openshift/ci-operator/knative-images/webhook/Dockerfile +++ b/openshift/ci-operator/knative-images/webhook/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for cmd/webhook. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/ci-operator/knative-images/websocketsource/Dockerfile b/openshift/ci-operator/knative-images/websocketsource/Dockerfile index b545aa8603b..9c18e6fd70d 100755 --- a/openshift/ci-operator/knative-images/websocketsource/Dockerfile +++ b/openshift/ci-operator/knative-images/websocketsource/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for cmd/websocketsource. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/ci-operator/knative-test-images/event-sender/Dockerfile b/openshift/ci-operator/knative-test-images/event-sender/Dockerfile index 6fcdd9b5730..3a4eae90740 100755 --- a/openshift/ci-operator/knative-test-images/event-sender/Dockerfile +++ b/openshift/ci-operator/knative-test-images/event-sender/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for test/test_images/event-sender. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/ci-operator/knative-test-images/eventshub/Dockerfile b/openshift/ci-operator/knative-test-images/eventshub/Dockerfile index 42ec1fdccdc..ae1f77cc176 100755 --- a/openshift/ci-operator/knative-test-images/eventshub/Dockerfile +++ b/openshift/ci-operator/knative-test-images/eventshub/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for vendor/knative.dev/reconciler-test/cmd/eventshub. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/ci-operator/knative-test-images/performance/Dockerfile b/openshift/ci-operator/knative-test-images/performance/Dockerfile index 1fe6025342d..f5dfb923ccd 100755 --- a/openshift/ci-operator/knative-test-images/performance/Dockerfile +++ b/openshift/ci-operator/knative-test-images/performance/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for test/test_images/performance. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/ci-operator/knative-test-images/print/Dockerfile b/openshift/ci-operator/knative-test-images/print/Dockerfile index 00a71002b28..9a7e05233bb 100755 --- a/openshift/ci-operator/knative-test-images/print/Dockerfile +++ b/openshift/ci-operator/knative-test-images/print/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for test/test_images/print. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/ci-operator/knative-test-images/recordevents/Dockerfile b/openshift/ci-operator/knative-test-images/recordevents/Dockerfile index 75239389d77..a4d3588bb7d 100755 --- a/openshift/ci-operator/knative-test-images/recordevents/Dockerfile +++ b/openshift/ci-operator/knative-test-images/recordevents/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for test/test_images/recordevents. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/ci-operator/knative-test-images/request-sender/Dockerfile b/openshift/ci-operator/knative-test-images/request-sender/Dockerfile index f5008f10087..b60fcff5c0c 100755 --- a/openshift/ci-operator/knative-test-images/request-sender/Dockerfile +++ b/openshift/ci-operator/knative-test-images/request-sender/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for test/test_images/request-sender. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/ci-operator/knative-test-images/wathola-fetcher/Dockerfile b/openshift/ci-operator/knative-test-images/wathola-fetcher/Dockerfile index 940cf3e8ab1..7793d693264 100755 --- a/openshift/ci-operator/knative-test-images/wathola-fetcher/Dockerfile +++ b/openshift/ci-operator/knative-test-images/wathola-fetcher/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for test/test_images/wathola-fetcher. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/ci-operator/knative-test-images/wathola-forwarder/Dockerfile b/openshift/ci-operator/knative-test-images/wathola-forwarder/Dockerfile index aa86becc4a8..cc1f17782b5 100755 --- a/openshift/ci-operator/knative-test-images/wathola-forwarder/Dockerfile +++ b/openshift/ci-operator/knative-test-images/wathola-forwarder/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for test/test_images/wathola-forwarder. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/ci-operator/knative-test-images/wathola-receiver/Dockerfile b/openshift/ci-operator/knative-test-images/wathola-receiver/Dockerfile index d38be742887..c0822ebbf45 100755 --- a/openshift/ci-operator/knative-test-images/wathola-receiver/Dockerfile +++ b/openshift/ci-operator/knative-test-images/wathola-receiver/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for test/test_images/wathola-receiver. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/ci-operator/knative-test-images/wathola-sender/Dockerfile b/openshift/ci-operator/knative-test-images/wathola-sender/Dockerfile index 0448013d221..bd882860ced 100755 --- a/openshift/ci-operator/knative-test-images/wathola-sender/Dockerfile +++ b/openshift/ci-operator/knative-test-images/wathola-sender/Dockerfile @@ -1,5 +1,5 @@ # DO NOT EDIT! Generated Dockerfile for test/test_images/wathola-sender. -FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.21-openshift-4.16 as builder +FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder COPY . . diff --git a/openshift/generate.sh b/openshift/generate.sh index 1f01c70c9e8..23ef82774fc 100755 --- a/openshift/generate.sh +++ b/openshift/generate.sh @@ -4,9 +4,14 @@ set -euo pipefail repo_root_dir=$(dirname "$(realpath "${BASH_SOURCE[0]}")")/.. -GO111MODULE=off go get -u github.com/openshift-knative/hack/cmd/generate +hack_tmp_dir=$(mktemp -d) +git clone --branch main https://github.com/openshift-knative/hack "$hack_tmp_dir" +pushd "$hack_tmp_dir" || return $? +go install github.com/openshift-knative/hack/cmd/generate +popd || return $? +rm -rf "$hack_tmp_dir" $(go env GOPATH)/bin/generate \ --root-dir "${repo_root_dir}" \ --generators dockerfile \ - --dockerfile-image-builder-fmt "registry.ci.openshift.org/openshift/release:rhel-8-release-golang-%s-openshift-4.16" + --dockerfile-image-builder-fmt "registry.ci.openshift.org/openshift/release:rhel-8-release-golang-%s-openshift-4.17"