Skip to content

build: use Go 1.25 and trixie #2104

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lib-validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v7
with:
version: v2.1.6
version: v2.4.0
args: -v --timeout 5m
build:
name: Build and check device plugins
Expand Down
6 changes: 0 additions & 6 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ linters:
- unconvert
- unused
- whitespace
- wsl
settings:
gocognit:
min-complexity: 31
Expand Down Expand Up @@ -60,16 +59,11 @@ linters:
- linters:
- gocognit
- gocyclo
- wsl
path: _test\.go
- linters:
- gocognit
- gocyclo
- wsl
path: test/e2e/
- linters:
- wsl
path: cmd/gpu_fakedev/
- linters:
- goconst
path: (.+)_test\.go
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ EXTRA_BUILD_ARGS ?= ""

CERT_MANAGER_VERSION ?= v1.15.2
CONTROLLER_GEN_VERSION ?= v0.18.0
GOLANGCI_LINT_VERSION ?= v2.1.6
GOLANGCI_LINT_VERSION ?= v2.4.0
KIND_VERSION ?= v0.23.0
GOLICENSES_VERSION ?= v1.6.0
# Default bundle image tag
Expand Down Expand Up @@ -170,7 +170,7 @@ e2e-spr:

pre-pull:
ifeq ($(TAG),devel)
@$(BUILDER) pull golang:1.24-bookworm
@$(BUILDER) pull golang:1.25-trixie
@$(BUILDER) pull debian:unstable-slim
@$(BUILDER) pull ubuntu:22.04
endif
Expand Down
2 changes: 1 addition & 1 deletion build/docker/build-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fi

BUILD_ARGS="${BUILD_ARGS} \
--build-arg FINAL_BASE=gcr.io/distroless/static \
--build-arg BUILD_BASE=golang:1.24-bookworm \
--build-arg BUILD_BASE=golang:1.25-trixie \
--build-arg FINAL_BASE_DYN=debian:unstable-slim \
--build-arg ROCKYLINUX=0"

Expand Down
2 changes: 1 addition & 1 deletion build/docker/intel-deviceplugin-operator.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ARG FINAL_BASE=registry.access.redhat.com/ubi9-micro:latest
##
## This is used on release branches before tagging a stable version.
## The main branch defaults to using the latest Golang base image.
ARG GOLANG_BASE=golang:1.24-bookworm
ARG GOLANG_BASE=golang:1.25-trixie
###
FROM ${GOLANG_BASE} AS builder
ARG DIR=/intel-device-plugins-for-kubernetes
Expand Down
2 changes: 1 addition & 1 deletion build/docker/intel-dlb-initcontainer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ARG FINAL_BASE=registry.access.redhat.com/ubi9-micro:latest
##
## This is used on release branches before tagging a stable version.
## The main branch defaults to using the latest Golang base image.
ARG GOLANG_BASE=golang:1.24-bookworm
ARG GOLANG_BASE=golang:1.25-trixie
###
FROM ${GOLANG_BASE} AS builder
ARG DIR=/intel-device-plugins-for-kubernetes
Expand Down
2 changes: 1 addition & 1 deletion build/docker/intel-dlb-plugin.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ARG FINAL_BASE=registry.access.redhat.com/ubi9-micro:latest
##
## This is used on release branches before tagging a stable version.
## The main branch defaults to using the latest Golang base image.
ARG GOLANG_BASE=golang:1.24-bookworm
ARG GOLANG_BASE=golang:1.25-trixie
###
FROM ${GOLANG_BASE} AS builder
ARG DIR=/intel-device-plugins-for-kubernetes
Expand Down
2 changes: 1 addition & 1 deletion build/docker/intel-dsa-plugin.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ARG FINAL_BASE=registry.access.redhat.com/ubi9-micro:latest
##
## This is used on release branches before tagging a stable version.
## The main branch defaults to using the latest Golang base image.
ARG GOLANG_BASE=golang:1.24-bookworm
ARG GOLANG_BASE=golang:1.25-trixie
###
FROM ${GOLANG_BASE} AS builder
ARG DIR=/intel-device-plugins-for-kubernetes
Expand Down
2 changes: 1 addition & 1 deletion build/docker/intel-fpga-admissionwebhook.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ARG FINAL_BASE=registry.access.redhat.com/ubi9-micro:latest
##
## This is used on release branches before tagging a stable version.
## The main branch defaults to using the latest Golang base image.
ARG GOLANG_BASE=golang:1.24-bookworm
ARG GOLANG_BASE=golang:1.25-trixie
###
FROM ${GOLANG_BASE} AS builder
ARG DIR=/intel-device-plugins-for-kubernetes
Expand Down
2 changes: 1 addition & 1 deletion build/docker/intel-fpga-initcontainer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ARG FINAL_BASE=registry.access.redhat.com/ubi9-micro:latest
##
## This is used on release branches before tagging a stable version.
## The main branch defaults to using the latest Golang base image.
ARG GOLANG_BASE=golang:1.24-bookworm
ARG GOLANG_BASE=golang:1.25-trixie
###
FROM ${GOLANG_BASE} AS builder
ARG DIR=/intel-device-plugins-for-kubernetes
Expand Down
2 changes: 1 addition & 1 deletion build/docker/intel-fpga-plugin.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ARG FINAL_BASE=registry.access.redhat.com/ubi9-micro:latest
##
## This is used on release branches before tagging a stable version.
## The main branch defaults to using the latest Golang base image.
ARG GOLANG_BASE=golang:1.24-bookworm
ARG GOLANG_BASE=golang:1.25-trixie
###
FROM ${GOLANG_BASE} AS builder
ARG DIR=/intel-device-plugins-for-kubernetes
Expand Down
2 changes: 1 addition & 1 deletion build/docker/intel-gpu-fakedev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ARG FINAL_BASE=registry.access.redhat.com/ubi9-micro:latest
##
## This is used on release branches before tagging a stable version.
## The main branch defaults to using the latest Golang base image.
ARG GOLANG_BASE=golang:1.24-bookworm
ARG GOLANG_BASE=golang:1.25-trixie
###
FROM ${GOLANG_BASE} AS builder
ARG DIR=/intel-device-plugins-for-kubernetes
Expand Down
2 changes: 1 addition & 1 deletion build/docker/intel-gpu-initcontainer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ARG FINAL_BASE=registry.access.redhat.com/ubi9-micro:latest
##
## This is used on release branches before tagging a stable version.
## The main branch defaults to using the latest Golang base image.
ARG GOLANG_BASE=golang:1.24-bookworm
ARG GOLANG_BASE=golang:1.25-trixie
###
FROM ${GOLANG_BASE} AS builder
ARG DIR=/intel-device-plugins-for-kubernetes
Expand Down
4 changes: 2 additions & 2 deletions build/docker/intel-gpu-levelzero.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ARG ROCKYLINUX=1
ARG BUILD_BASE=rockylinux:9
ARG FINAL_BASE_DYN=registry.access.redhat.com/ubi9/ubi-minimal:9.3
###
## Use the BUILD_BASE when either the a) golang-bookworm is updated to a newer glibc
## Use the BUILD_BASE when either the a) golang-trixie is updated to a newer glibc
## or b) the intel-igc-core libraries are fixed to not to demand a newer glibc
FROM ${FINAL_BASE_DYN} AS builder
ARG DIR=/intel-device-plugins-for-kubernetes
Expand All @@ -37,7 +37,7 @@ ENV LDFLAGS="all=-linkmode=external -s -w"
ARG GOLICENSES_VERSION
ARG CMD
ARG ROCKYLINUX
ARG CGO_VERSION=1.24
ARG CGO_VERSION=1.25
RUN mkdir /runtime
RUN if [ $ROCKYLINUX -eq 0 ]; then \
apt-get update && apt-get install --no-install-recommends -y wget jq curl libc6-dev ocl-icd-libopencl1 gcc ca-certificates && \
Expand Down
2 changes: 1 addition & 1 deletion build/docker/intel-gpu-plugin.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ARG FINAL_BASE=registry.access.redhat.com/ubi9-micro:latest
##
## This is used on release branches before tagging a stable version.
## The main branch defaults to using the latest Golang base image.
ARG GOLANG_BASE=golang:1.24-bookworm
ARG GOLANG_BASE=golang:1.25-trixie
###
FROM ${GOLANG_BASE} AS builder
ARG DIR=/intel-device-plugins-for-kubernetes
Expand Down
2 changes: 1 addition & 1 deletion build/docker/intel-iaa-plugin.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ARG FINAL_BASE=registry.access.redhat.com/ubi9-micro:latest
##
## This is used on release branches before tagging a stable version.
## The main branch defaults to using the latest Golang base image.
ARG GOLANG_BASE=golang:1.24-bookworm
ARG GOLANG_BASE=golang:1.25-trixie
###
FROM ${GOLANG_BASE} AS builder
ARG DIR=/intel-device-plugins-for-kubernetes
Expand Down
2 changes: 1 addition & 1 deletion build/docker/intel-npu-plugin.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ARG FINAL_BASE=registry.access.redhat.com/ubi9-micro:latest
##
## This is used on release branches before tagging a stable version.
## The main branch defaults to using the latest Golang base image.
ARG GOLANG_BASE=golang:1.24-bookworm
ARG GOLANG_BASE=golang:1.25-trixie
###
FROM ${GOLANG_BASE} AS builder
ARG DIR=/intel-device-plugins-for-kubernetes
Expand Down
2 changes: 1 addition & 1 deletion build/docker/intel-qat-initcontainer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ARG FINAL_BASE=registry.access.redhat.com/ubi9-micro:latest
##
## This is used on release branches before tagging a stable version.
## The main branch defaults to using the latest Golang base image.
ARG GOLANG_BASE=golang:1.24-bookworm
ARG GOLANG_BASE=golang:1.25-trixie
###
FROM ${GOLANG_BASE} AS builder
ARG DIR=/intel-device-plugins-for-kubernetes
Expand Down
2 changes: 1 addition & 1 deletion build/docker/intel-qat-plugin.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ARG FINAL_BASE=registry.access.redhat.com/ubi9-micro:latest
##
## This is used on release branches before tagging a stable version.
## The main branch defaults to using the latest Golang base image.
ARG GOLANG_BASE=golang:1.24-bookworm
ARG GOLANG_BASE=golang:1.25-trixie
###
FROM ${GOLANG_BASE} AS builder
ARG DIR=/intel-device-plugins-for-kubernetes
Expand Down
2 changes: 1 addition & 1 deletion build/docker/intel-sgx-admissionwebhook.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ARG FINAL_BASE=registry.access.redhat.com/ubi9-micro:latest
##
## This is used on release branches before tagging a stable version.
## The main branch defaults to using the latest Golang base image.
ARG GOLANG_BASE=golang:1.24-bookworm
ARG GOLANG_BASE=golang:1.25-trixie
###
FROM ${GOLANG_BASE} AS builder
ARG DIR=/intel-device-plugins-for-kubernetes
Expand Down
2 changes: 1 addition & 1 deletion build/docker/intel-sgx-initcontainer.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ ARG FINAL_BASE=registry.access.redhat.com/ubi9-micro:latest
##
## This is used on release branches before tagging a stable version.
## The main branch defaults to using the latest Golang base image.
ARG GOLANG_BASE=golang:1.24-bookworm
ARG GOLANG_BASE=golang:1.25-trixie
###
FROM ${GOLANG_BASE} AS builder
ARG DIR=/intel-device-plugins-for-kubernetes
Expand Down
2 changes: 1 addition & 1 deletion build/docker/intel-sgx-plugin.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ARG FINAL_BASE=registry.access.redhat.com/ubi9-micro:latest
##
## This is used on release branches before tagging a stable version.
## The main branch defaults to using the latest Golang base image.
ARG GOLANG_BASE=golang:1.24-bookworm
ARG GOLANG_BASE=golang:1.25-trixie
###
FROM ${GOLANG_BASE} AS builder
ARG DIR=/intel-device-plugins-for-kubernetes
Expand Down
2 changes: 1 addition & 1 deletion build/docker/intel-xpumanager-sidecar.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ARG FINAL_BASE=registry.access.redhat.com/ubi9-micro:latest
##
## This is used on release branches before tagging a stable version.
## The main branch defaults to using the latest Golang base image.
ARG GOLANG_BASE=golang:1.24-bookworm
ARG GOLANG_BASE=golang:1.25-trixie
###
FROM ${GOLANG_BASE} AS builder
ARG DIR=/intel-device-plugins-for-kubernetes
Expand Down
2 changes: 1 addition & 1 deletion build/docker/lib/golang_base.docker
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
##
## This is used on release branches before tagging a stable version.
## The main branch defaults to using the latest Golang base image.
ARG GOLANG_BASE=golang:1.24-bookworm
ARG GOLANG_BASE=golang:1.25-trixie
###
4 changes: 2 additions & 2 deletions build/docker/templates/intel-gpu-levelzero.Dockerfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ARG BUILD_BASE=rockylinux:9
ARG FINAL_BASE_DYN=registry.access.redhat.com/ubi9/ubi-minimal:9.3
###

## Use the BUILD_BASE when either the a) golang-bookworm is updated to a newer glibc
## Use the BUILD_BASE when either the a) golang-trixie is updated to a newer glibc
## or b) the intel-igc-core libraries are fixed to not to demand a newer glibc
FROM ${FINAL_BASE_DYN} AS builder

Expand All @@ -28,7 +28,7 @@ ENV LDFLAGS="all=-linkmode=external -s -w"
ARG GOLICENSES_VERSION
ARG CMD
ARG ROCKYLINUX
ARG CGO_VERSION=1.24
ARG CGO_VERSION=1.25

RUN mkdir /runtime

Expand Down
4 changes: 3 additions & 1 deletion cmd/gpu_levelzero/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ func main() {
}
})

lis, err := net.Listen("unix", *socketPath)
var lc net.ListenConfig

lis, err := lc.Listen(context.Background(), "unix", *socketPath)
if err != nil {
klog.Fatalf("failed to listen: %v", err)
}
Expand Down
4 changes: 3 additions & 1 deletion cmd/gpu_plugin/levelzeroservice/levelzero_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ type mockServer struct {
}

func (m *mockServer) serve(socketPath string) {
lis, err := net.Listen("unix", socketPath)
var lc net.ListenConfig

lis, err := lc.Listen(context.Background(), "unix", socketPath)
if err != nil {
log.Fatalf("failed to listen: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/intel/intel-device-plugins-for-kubernetes

go 1.24.0
go 1.25.0

require (
github.com/fsnotify/fsnotify v1.9.0
Expand Down
4 changes: 3 additions & 1 deletion pkg/deviceplugin/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,9 @@ func (srv *server) setupAndServe(namespace string, devicePluginPath string, kube
// We don't care if the plugin's socket file doesn't exist.
_ = os.Remove(pluginSocket)

lis, err := net.Listen("unix", pluginSocket)
var lc net.ListenConfig

lis, err := lc.Listen(context.Background(), "unix", pluginSocket)
if err != nil {
return errors.Wrap(err, "Failed to listen to plugin socket")
}
Expand Down
4 changes: 3 additions & 1 deletion pkg/deviceplugin/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ func (k *kubeletStub) Register(ctx context.Context, r *pluginapi.RegisterRequest
func (k *kubeletStub) start() error {
_ = os.Remove(k.socket)

s, err := net.Listen("unix", k.socket)
var lc net.ListenConfig

s, err := lc.Listen(context.Background(), "unix", k.socket)
if err != nil {
return errors.Wrap(err, "Can't listen at the socket")
}
Expand Down
Loading