diff --git a/Makefile b/Makefile index 69f2ea58a0a..39d1e2da962 100644 --- a/Makefile +++ b/Makefile @@ -76,7 +76,7 @@ ENVSUBST_VER := v2.0.0-20210730161058-179042472c46 ENVSUBST_BIN := envsubst ENVSUBST := $(TOOLS_BIN_DIR)/$(ENVSUBST_BIN)-$(ENVSUBST_VER) -GOLANGCI_LINT_VER := v1.43.0 +GOLANGCI_LINT_VER := v1.44.2 GOLANGCI_LINT_BIN := golangci-lint GOLANGCI_LINT := $(TOOLS_BIN_DIR)/$(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VER) diff --git a/azure/services/loadbalancers/client.go b/azure/services/loadbalancers/client.go index 3f4a18bab04..99a856b22b9 100644 --- a/azure/services/loadbalancers/client.go +++ b/azure/services/loadbalancers/client.go @@ -85,7 +85,10 @@ func (ac *azureClient) CreateOrUpdateAsync(ctx context.Context, spec azure.Resou createFuture, err := ac.loadbalancers.CreateOrUpdateSender(req) if err != nil { - err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "CreateOrUpdate", createFuture.Response(), "Failure sending request") + res := createFuture.Response() + err = autorest.NewErrorWithError(err, "network.LoadBalancersClient", "CreateOrUpdate", res, "Failure sending request") + // response body must be closed + res.Body.Close() return nil, nil, err } diff --git a/exp/controllers/azuremanagedmachinepool_reconciler_test.go b/exp/controllers/azuremanagedmachinepool_reconciler_test.go index e9fca8c070d..1f511884326 100644 --- a/exp/controllers/azuremanagedmachinepool_reconciler_test.go +++ b/exp/controllers/azuremanagedmachinepool_reconciler_test.go @@ -36,7 +36,7 @@ func TestIsAgentPoolVMSSNotFoundError(t *testing.T) { }, { Name: "WithAWrappedNotFoundError", - Err: errors.Wrap(NewAgentPoolVMSSNotFoundError("foo", "baz"), "boom!"), + Err: errors.Wrap(NewAgentPoolVMSSNotFoundError("foo", "baz"), "boom"), Expected: true, }, {