diff --git a/.github/workflows/lib-validate.yaml b/.github/workflows/lib-validate.yaml index fc7b6586..97bdb19c 100644 --- a/.github/workflows/lib-validate.yaml +++ b/.github/workflows/lib-validate.yaml @@ -46,7 +46,7 @@ jobs: - name: golangci-lint uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6 with: - version: v1.60.3 + version: v1.63.1 args: -v --timeout 5m build: name: Build and check device plugins diff --git a/Makefile b/Makefile index 7ea7d29b..4eb65f91 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ EXTRA_BUILD_ARGS ?= "" CERT_MANAGER_VERSION ?= v1.15.2 CONTROLLER_GEN_VERSION ?= v0.16.1 -GOLANGCI_LINT_VERSION ?= v1.60.3 +GOLANGCI_LINT_VERSION ?= v1.63.1 KIND_VERSION ?= v0.23.0 GOLICENSES_VERSION ?= v1.6.0 # Default bundle image tag diff --git a/cmd/gpu_levelzero/main.go b/cmd/gpu_levelzero/main.go index 7ff2d30e..1280bf01 100644 --- a/cmd/gpu_levelzero/main.go +++ b/cmd/gpu_levelzero/main.go @@ -58,11 +58,13 @@ func (s *server) GetDeviceHealth(c context.Context, deviceid *levelzero.DeviceId cBdfAddress := C.CString(deviceid.BdfAddress) memHealth := bool(C.zes_device_memory_is_healthy(cBdfAddress, (*C.uint32_t)(unsafe.Pointer(&errorVal)))) + if errorVal != 0 { klog.Warningf("device memory health read returned an error: 0x%X", errorVal) } busHealth := bool(C.zes_device_bus_is_healthy(cBdfAddress, (*C.uint32_t)(unsafe.Pointer(&errorVal)))) + if errorVal != 0 { klog.Warningf("device bus health read returned an error: 0x%X", errorVal) } @@ -93,16 +95,19 @@ func (s *server) GetDeviceTemperature(c context.Context, deviceid *levelzero.Dev cBdfAddress := C.CString(deviceid.BdfAddress) globalTemp := float64(C.zes_device_temp_max(cBdfAddress, C.CString("global"), (*C.uint32_t)(unsafe.Pointer(&errorVal)))) + if errorVal != 0 { klog.Warningf("global temperature read returned an error: 0x%X", errorVal) } gpuTemp := float64(C.zes_device_temp_max(cBdfAddress, C.CString("gpu"), (*C.uint32_t)(unsafe.Pointer(&errorVal)))) + if errorVal != 0 { klog.Warningf("gpu temperature read returned an error: 0x%X", errorVal) } memTemp := float64(C.zes_device_temp_max(cBdfAddress, C.CString("memory"), (*C.uint32_t)(unsafe.Pointer(&errorVal)))) + if errorVal != 0 { klog.Warningf("memory temperature read returned an error: 0x%X", errorVal) }