From 4c417b13b351ad9c947a35f58611f0b7015501a3 Mon Sep 17 00:00:00 2001 From: Felix Matouschek Date: Mon, 25 Mar 2024 14:02:38 +0100 Subject: [PATCH] chore: Bump golangci-lint ... and update its configuration and fix an issue found by the new version. Signed-off-by: Felix Matouschek --- .golangci.yml | 2 +- Makefile | 2 +- cmd/medius/images/verify.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 4c371322..94428c7a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -40,7 +40,7 @@ linters-settings: # don't include the "operation" and "assign" checks: argument,case,condition,return govet: - check-shadowing: true + shadow: true lll: line-length: 140 maligned: diff --git a/Makefile b/Makefile index 43fb761f..b6f6ec85 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ vendor: go mod vendor GOLANGCI_LINT ?= $(LOCALBIN)/golangci-lint -GOLANGCI_LINT_VERSION ?= v1.55.2 +GOLANGCI_LINT_VERSION ?= v1.57.1 .PHONY: lint lint: diff --git a/cmd/medius/images/verify.go b/cmd/medius/images/verify.go index 9d23db53..58df0570 100644 --- a/cmd/medius/images/verify.go +++ b/cmd/medius/images/verify.go @@ -225,7 +225,7 @@ func randName(name string) string { } func waitVMReady(ctx context.Context, name string, client kvirtcli.VirtualMachineInterface, timeout int) error { - return wait.PollImmediateWithContext(ctx, time.Second, time.Duration(timeout)*time.Second, func(_ context.Context) (bool, error) { + return wait.PollUntilContextTimeout(ctx, time.Second, time.Duration(timeout)*time.Second, true, func(_ context.Context) (bool, error) { vm, err := client.Get(ctx, name, &metav1.GetOptions{}) if err != nil {