Skip to content

Commit

Permalink
chore: Bump go to 1.23.1
Browse files Browse the repository at this point in the history
mrueg committed Sep 9, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent aebbb39 commit f34cd69
Showing 8 changed files with 11 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -20,8 +20,8 @@ env:
E2E_SETUP_KIND: yes
E2E_SETUP_KUBECTL: yes
SUDO: sudo
GO_VERSION: "^1.22"
GOLANGCI_LINT_VERSION: "v1.56.2"
GO_VERSION: "^1.23"
GOLANGCI_LINT_VERSION: "v1.61.0"

jobs:
ci-go-lint:
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
run:
deadline: 10m
timeout: 10m

linters:
disable-all: true
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -15,13 +15,13 @@ GIT_COMMIT ?= $(shell git rev-parse --short HEAD)
OS ?= $(shell uname -s | tr A-Z a-z)
ALL_ARCH = amd64 arm arm64 ppc64le s390x
PKG = github.com/prometheus/common
PROMETHEUS_VERSION = 2.53.1
GO_VERSION = 1.22.5
PROMETHEUS_VERSION = 2.54.1
GO_VERSION = 1.23.1
IMAGE = $(REGISTRY)/kube-state-metrics
MULTI_ARCH_IMG = $(IMAGE)-$(ARCH)
USER ?= $(shell id -u -n)
HOST ?= $(shell hostname)
MARKDOWNLINT_CLI2_VERSION = 0.13.0
MARKDOWNLINT_CLI2_VERSION = 0.14.0


export DOCKER_CLI_EXPERIMENTAL=enabled
4 changes: 1 addition & 3 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module k8s.io/kube-state-metrics/v2

go 1.22.0

toolchain go1.22.5
go 1.23.0

require (
github.com/KimMachineGun/automemlimit v0.6.1
2 changes: 1 addition & 1 deletion pkg/app/server_test.go
Original file line number Diff line number Diff line change
@@ -861,7 +861,7 @@ func pod(client *fake.Clientset, index int) error {

func foo(client *samplefake.Clientset, index int) error {
i := strconv.Itoa(index)
desiredReplicas := int32(index)
desiredReplicas := int32(index) //nolint:gosec

foo := samplev1alpha1.Foo{
ObjectMeta: metav1.ObjectMeta{
2 changes: 1 addition & 1 deletion pkg/customresourcestate/custom_resource_metrics_test.go
Original file line number Diff line number Diff line change
@@ -229,7 +229,7 @@ func TestNewCustomResourceMetrics(t *testing.T) {
t.Run(tt.name, func(t *testing.T) {
v, err := NewCustomResourceMetrics(tt.r)
if err != nil {
t.Errorf(err.Error())
t.Error(err.Error())
}

// convert to JSON for easier nil comparison
2 changes: 1 addition & 1 deletion pkg/metricshandler/metrics_handler.go
Original file line number Diff line number Diff line change
@@ -256,7 +256,7 @@ func detectNominalFromPod(statefulSetName, podName string) (int32, error) {
return 0, fmt.Errorf("failed to detect shard index for Pod %s of StatefulSet %s, parsed %s: %w", podName, statefulSetName, nominalString, err)
}

return int32(nominal), nil
return int32(nominal), nil //nolint:gosec
}

func detectStatefulSet(kubeClient kubernetes.Interface, podName, namespaceName string) (*appsv1.StatefulSet, error) {
2 changes: 1 addition & 1 deletion tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module k8s.io/kube-state-metrics/v2/tools

go 1.21
go 1.23.0

require (
github.com/brancz/gojsontoyaml v0.1.0

0 comments on commit f34cd69

Please sign in to comment.