diff --git a/.github/workflows/ci-pr-checks.yaml b/.github/workflows/ci-pr-checks.yaml index ccbdf1e05..1bef9856a 100644 --- a/.github/workflows/ci-pr-checks.yaml +++ b/.github/workflows/ci-pr-checks.yaml @@ -71,7 +71,7 @@ jobs: - name: Run lint checks uses: golangci/golangci-lint-action@v9 with: - version: "v2.1.6" + version: "v2.8.0" args: "--config=./.golangci.yml" skip-cache: true env: diff --git a/Dockerfile.epp b/Dockerfile.epp index 4996c6fbe..906c27fed 100644 --- a/Dockerfile.epp +++ b/Dockerfile.epp @@ -1,6 +1,6 @@ ## Minimal runtime Dockerfile (microdnf-only, no torch, wrapper in site-packages) # Go dependencies stage: download go modules and extract kv-cache -FROM quay.io/projectquay/golang:1.24 AS go-deps +FROM quay.io/projectquay/golang:1.25 AS go-deps WORKDIR /workspace @@ -41,7 +41,7 @@ RUN python3.12 -m venv /workspace/kv-cache/build/venv && \ fi # Go build stage -FROM quay.io/projectquay/golang:1.24 AS go-builder +FROM quay.io/projectquay/golang:1.25 AS go-builder ARG TARGETOS ARG TARGETARCH diff --git a/Dockerfile.sidecar b/Dockerfile.sidecar index 164e5e624..9c9e747e2 100644 --- a/Dockerfile.sidecar +++ b/Dockerfile.sidecar @@ -1,5 +1,5 @@ -# Build Stage: using Go 1.24 image -FROM quay.io/projectquay/golang:1.24 AS builder +# Build Stage: using Go 1.25 image +FROM quay.io/projectquay/golang:1.25 AS builder ARG TARGETOS ARG TARGETARCH ARG COMMIT_SHA=unknown diff --git a/Makefile.tools.mk b/Makefile.tools.mk index 7bf41b369..5263a7cac 100644 --- a/Makefile.tools.mk +++ b/Makefile.tools.mk @@ -15,7 +15,7 @@ TOKENIZER_LIB = $(LOCALLIB)/libtokenizers.a ## Tool fixed versions. GINKGO_VERSION ?= v2.27.2 -GOLANGCI_LINT_VERSION ?= v2.1.6 +GOLANGCI_LINT_VERSION ?= v2.8.0 KUSTOMIZE_VERSION ?= v5.5.0 TYPOS_VERSION ?= v1.34.0 VLLM_VERSION ?= 0.14.0 diff --git a/go.mod b/go.mod index 57c502280..888b312d0 100644 --- a/go.mod +++ b/go.mod @@ -1,8 +1,6 @@ module github.com/llm-d/llm-d-inference-scheduler -go 1.24.9 - -toolchain go1.24.12 +go 1.25.7 require ( github.com/go-logr/logr v1.4.3 diff --git a/pkg/plugins/filter/by_label_selector_test.go b/pkg/plugins/filter/by_label_selector_test.go index 0d7947f09..eeee954ff 100644 --- a/pkg/plugins/filter/by_label_selector_test.go +++ b/pkg/plugins/filter/by_label_selector_test.go @@ -302,9 +302,9 @@ func TestByLabelSelectorFiltering(t *testing.T) { filteredEndpoints := blf.Filter(ctx, nil, nil, endpoints) - var actualEndpointNames []string - for _, endpoint := range filteredEndpoints { - actualEndpointNames = append(actualEndpointNames, endpoint.GetMetadata().NamespacedName.Name) + actualEndpointNames := make([]string, len(filteredEndpoints)) + for idx, endpoint := range filteredEndpoints { + actualEndpointNames[idx] = endpoint.GetMetadata().NamespacedName.Name } assert.ElementsMatch(t, tt.expectedPods, actualEndpointNames, diff --git a/pkg/plugins/filter/by_label_test.go b/pkg/plugins/filter/by_label_test.go index 933871b61..5a8e6b3e7 100644 --- a/pkg/plugins/filter/by_label_test.go +++ b/pkg/plugins/filter/by_label_test.go @@ -249,9 +249,9 @@ func TestByLabelFiltering(t *testing.T) { filteredEndpoints := blf.Filter(ctx, nil, nil, endpoints) - var actualEndpointNames []string - for _, endpoint := range filteredEndpoints { - actualEndpointNames = append(actualEndpointNames, endpoint.GetMetadata().NamespacedName.Name) + actualEndpointNames := make([]string, len(filteredEndpoints)) + for idx, endpoint := range filteredEndpoints { + actualEndpointNames[idx] = endpoint.GetMetadata().NamespacedName.Name } assert.ElementsMatch(t, tt.expectedPods, actualEndpointNames, diff --git a/pkg/plugins/scorer/precise_prefix_cache_test.go b/pkg/plugins/scorer/precise_prefix_cache_test.go index 968497798..d7cff1385 100644 --- a/pkg/plugins/scorer/precise_prefix_cache_test.go +++ b/pkg/plugins/scorer/precise_prefix_cache_test.go @@ -217,12 +217,12 @@ func TestPrefixCacheTracking_Score(t *testing.T) { require.NotNil(t, req.ChatCompletions, "req expected to use ChatCompletions API") // convert to preprocessing format - var conversations []preprocessing.Conversation - for _, msg := range req.ChatCompletions.Messages { - conversations = append(conversations, preprocessing.Conversation{ + conversations := make([]preprocessing.Conversation, len(req.ChatCompletions.Messages)) + for idx, msg := range req.ChatCompletions.Messages { + conversations[idx] = preprocessing.Conversation{ Role: msg.Role, Content: msg.Content.Raw, - }) + } } processor := preprocessing.NewChatTemplatingProcessor() diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index 44671ed71..436afb4e7 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -491,7 +491,8 @@ func createEndPointPicker(eppConfig string) []string { err := testConfig.K8sClient.Create(testConfig.Context, configMap) gomega.Expect(err).ShouldNot(gomega.HaveOccurred()) - objects := []string{"ConfigMap/epp-config"} + objects := make([]string, 1, 10) + objects[0] = "ConfigMap/epp-config" eppYamls := testutils.ReadYaml(eppManifest) eppYamls = substituteMany(eppYamls, diff --git a/test/e2e/utils_test.go b/test/e2e/utils_test.go index edfe32e45..d50493fba 100644 --- a/test/e2e/utils_test.go +++ b/test/e2e/utils_test.go @@ -129,13 +129,13 @@ func runKustomize(kustomizeDir string) []string { } func substituteMany(inputs []string, substitutions map[string]string) []string { - outputs := []string{} - for _, input := range inputs { + outputs := make([]string, len(inputs)) + for idx, input := range inputs { output := input for key, value := range substitutions { output = strings.ReplaceAll(output, key, value) } - outputs = append(outputs, output) + outputs[idx] = output } return outputs }