mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00
ci: move to golangci-lint v1.63.1
along with it, fix some wsl findings. Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
This commit is contained in:
parent
f9bad08b23
commit
3e141cc736
2
.github/workflows/lib-validate.yaml
vendored
2
.github/workflows/lib-validate.yaml
vendored
@ -46,7 +46,7 @@ jobs:
|
|||||||
- name: golangci-lint
|
- name: golangci-lint
|
||||||
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6
|
uses: golangci/golangci-lint-action@971e284b6050e8a5849b72094c50ab08da042db8 # v6
|
||||||
with:
|
with:
|
||||||
version: v1.60.3
|
version: v1.63.1
|
||||||
args: -v --timeout 5m
|
args: -v --timeout 5m
|
||||||
build:
|
build:
|
||||||
name: Build and check device plugins
|
name: Build and check device plugins
|
||||||
|
2
Makefile
2
Makefile
@ -10,7 +10,7 @@ EXTRA_BUILD_ARGS ?= ""
|
|||||||
|
|
||||||
CERT_MANAGER_VERSION ?= v1.15.2
|
CERT_MANAGER_VERSION ?= v1.15.2
|
||||||
CONTROLLER_GEN_VERSION ?= v0.16.1
|
CONTROLLER_GEN_VERSION ?= v0.16.1
|
||||||
GOLANGCI_LINT_VERSION ?= v1.60.3
|
GOLANGCI_LINT_VERSION ?= v1.63.1
|
||||||
KIND_VERSION ?= v0.23.0
|
KIND_VERSION ?= v0.23.0
|
||||||
GOLICENSES_VERSION ?= v1.6.0
|
GOLICENSES_VERSION ?= v1.6.0
|
||||||
# Default bundle image tag
|
# Default bundle image tag
|
||||||
|
@ -58,11 +58,13 @@ func (s *server) GetDeviceHealth(c context.Context, deviceid *levelzero.DeviceId
|
|||||||
cBdfAddress := C.CString(deviceid.BdfAddress)
|
cBdfAddress := C.CString(deviceid.BdfAddress)
|
||||||
|
|
||||||
memHealth := bool(C.zes_device_memory_is_healthy(cBdfAddress, (*C.uint32_t)(unsafe.Pointer(&errorVal))))
|
memHealth := bool(C.zes_device_memory_is_healthy(cBdfAddress, (*C.uint32_t)(unsafe.Pointer(&errorVal))))
|
||||||
|
|
||||||
if errorVal != 0 {
|
if errorVal != 0 {
|
||||||
klog.Warningf("device memory health read returned an error: 0x%X", errorVal)
|
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))))
|
busHealth := bool(C.zes_device_bus_is_healthy(cBdfAddress, (*C.uint32_t)(unsafe.Pointer(&errorVal))))
|
||||||
|
|
||||||
if errorVal != 0 {
|
if errorVal != 0 {
|
||||||
klog.Warningf("device bus health read returned an error: 0x%X", errorVal)
|
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)
|
cBdfAddress := C.CString(deviceid.BdfAddress)
|
||||||
|
|
||||||
globalTemp := float64(C.zes_device_temp_max(cBdfAddress, C.CString("global"), (*C.uint32_t)(unsafe.Pointer(&errorVal))))
|
globalTemp := float64(C.zes_device_temp_max(cBdfAddress, C.CString("global"), (*C.uint32_t)(unsafe.Pointer(&errorVal))))
|
||||||
|
|
||||||
if errorVal != 0 {
|
if errorVal != 0 {
|
||||||
klog.Warningf("global temperature read returned an error: 0x%X", errorVal)
|
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))))
|
gpuTemp := float64(C.zes_device_temp_max(cBdfAddress, C.CString("gpu"), (*C.uint32_t)(unsafe.Pointer(&errorVal))))
|
||||||
|
|
||||||
if errorVal != 0 {
|
if errorVal != 0 {
|
||||||
klog.Warningf("gpu temperature read returned an error: 0x%X", errorVal)
|
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))))
|
memTemp := float64(C.zes_device_temp_max(cBdfAddress, C.CString("memory"), (*C.uint32_t)(unsafe.Pointer(&errorVal))))
|
||||||
|
|
||||||
if errorVal != 0 {
|
if errorVal != 0 {
|
||||||
klog.Warningf("memory temperature read returned an error: 0x%X", errorVal)
|
klog.Warningf("memory temperature read returned an error: 0x%X", errorVal)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user