From 581c7a51f042b5acf816e29f948663467fd01574 Mon Sep 17 00:00:00 2001 From: Feruzjon Muyassarov Date: Wed, 12 Feb 2025 14:17:23 +0200 Subject: [PATCH 1/3] go: bump go version to 1.24 Signed-off-by: Feruzjon Muyassarov --- Makefile | 2 +- Tiltfile | 2 +- go.mod | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index ed6c10df9..e84ab9f4e 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ IMAGE_BUILD_CMD ?= docker build IMAGE_BUILD_EXTRA_OPTS ?= IMAGE_PUSH_CMD ?= docker push CONTAINER_RUN_CMD ?= docker run -BUILDER_IMAGE ?= golang:1.23-bookworm +BUILDER_IMAGE ?= golang:1.24rc3-bookworm BASE_IMAGE_FULL ?= debian:bookworm-slim BASE_IMAGE_MINIMAL ?= scratch diff --git a/Tiltfile b/Tiltfile index e5fe0dded..121ec7d55 100644 --- a/Tiltfile +++ b/Tiltfile @@ -2,7 +2,7 @@ BASE_IMAGE_MINIMAL="gcr.io/distroless/base" BASE_IMAGE_FULL="debian:bullseye-slim" -BUILDER_IMAGE="golang:1.23-bookworm" +BUILDER_IMAGE="golang:1.24rc3-bookworm" HOSTMOUNT_PREFIX="/host-" IMAGE_TAG_NAME = os.getenv('IMAGE_TAG_NAME', "master") IMAGE_REGISTRY = os.getenv('IMAGE_REGISTRY', "gcr.io/k8s-staging-nfd") diff --git a/go.mod b/go.mod index 4032be170..5816e72ac 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module sigs.k8s.io/node-feature-discovery -go 1.23.0 +go 1.24 require ( github.com/fsnotify/fsnotify v1.8.0 From 7abb2e763d8cb1fb074d7cb401b5942ef89a5cbf Mon Sep 17 00:00:00 2001 From: Feruzjon Muyassarov Date: Wed, 12 Feb 2025 14:19:13 +0200 Subject: [PATCH 2/3] drop tools.go in favor of go's native tool directive Signed-off-by: Feruzjon Muyassarov --- Makefile | 2 +- Tiltfile | 2 +- go.mod | 4 +++- hack/tools.go | 20 -------------------- 4 files changed, 5 insertions(+), 23 deletions(-) delete mode 100644 hack/tools.go diff --git a/Makefile b/Makefile index e84ab9f4e..04cd39d83 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ IMAGE_BUILD_CMD ?= docker build IMAGE_BUILD_EXTRA_OPTS ?= IMAGE_PUSH_CMD ?= docker push CONTAINER_RUN_CMD ?= docker run -BUILDER_IMAGE ?= golang:1.24rc3-bookworm +BUILDER_IMAGE ?= golang:1.24-bookworm BASE_IMAGE_FULL ?= debian:bookworm-slim BASE_IMAGE_MINIMAL ?= scratch diff --git a/Tiltfile b/Tiltfile index 121ec7d55..696810584 100644 --- a/Tiltfile +++ b/Tiltfile @@ -2,7 +2,7 @@ BASE_IMAGE_MINIMAL="gcr.io/distroless/base" BASE_IMAGE_FULL="debian:bullseye-slim" -BUILDER_IMAGE="golang:1.24rc3-bookworm" +BUILDER_IMAGE="golang:1.24-bookworm" HOSTMOUNT_PREFIX="/host-" IMAGE_TAG_NAME = os.getenv('IMAGE_TAG_NAME', "master") IMAGE_REGISTRY = os.getenv('IMAGE_REGISTRY', "gcr.io/k8s-staging-nfd") diff --git a/go.mod b/go.mod index 5816e72ac..5d843ae81 100644 --- a/go.mod +++ b/go.mod @@ -28,7 +28,6 @@ require ( k8s.io/apiextensions-apiserver v0.32.1 k8s.io/apimachinery v0.32.1 k8s.io/client-go v0.32.1 - k8s.io/code-generator v0.32.1 k8s.io/component-base v0.32.1 k8s.io/klog/v2 v2.130.1 k8s.io/kubectl v0.32.1 @@ -153,6 +152,7 @@ require ( howett.net/plist v1.0.0 // indirect k8s.io/apiserver v0.32.1 // indirect k8s.io/cloud-provider v0.32.1 // indirect + k8s.io/code-generator v0.32.1 // indirect k8s.io/component-helpers v0.32.1 // indirect k8s.io/controller-manager v0.32.1 // indirect k8s.io/cri-api v0.32.1 // indirect @@ -201,3 +201,5 @@ replace ( k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.32.1 sigs.k8s.io/node-feature-discovery/api/nfd => ./api/nfd ) + +tool k8s.io/code-generator diff --git a/hack/tools.go b/hack/tools.go deleted file mode 100644 index e38e6c643..000000000 --- a/hack/tools.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2024 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// This package imports things required by build scripts, to force `go mod` to see them as dependencies -package tools - -import _ "k8s.io/code-generator" From cb54d4d422ac733645b2993238ba11b69b92a5ec Mon Sep 17 00:00:00 2001 From: Feruzjon Muyassarov Date: Fri, 14 Feb 2025 15:51:11 +0200 Subject: [PATCH 3/3] bump golangci-lint to v1.64.5 Signed-off-by: Feruzjon Muyassarov --- scripts/test-infra/verify.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test-infra/verify.sh b/scripts/test-infra/verify.sh index bd041d0f4..c6b957c28 100755 --- a/scripts/test-infra/verify.sh +++ b/scripts/test-infra/verify.sh @@ -4,7 +4,7 @@ this_dir=`dirname $0` # Install deps gobinpath="$(go env GOPATH)/bin" -curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b "$gobinpath" v1.60.3 +curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b "$gobinpath" v1.64.5 export PATH=$PATH:$(go env GOPATH)/bin curl -sfL https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash -s -- --version v3.15.3