From 1ef7fa9c4e563ea665e8d35098180d7085b9632f Mon Sep 17 00:00:00 2001 From: Orestis Floros Date: Thu, 10 Aug 2023 19:10:09 +0300 Subject: [PATCH] Fix golangci-lint 1.54 breaking changes (#1216) Related to https://github.com/GaijinEntertainment/go-exhaustruct/releases/tag/v3.0.0 --- .golangci.yaml | 2 ++ ...golangci-lint-1.53.3.pkg => .golangci-lint-1.54.0.pkg} | 0 bin/golangci-lint | 2 +- resources/fetching/factory/k8s_factory.go | 8 ++++---- resources/fetching/fetchers/aws/rds_fetcher_test.go | 8 +++++++- 5 files changed, 14 insertions(+), 6 deletions(-) rename bin/{.golangci-lint-1.53.3.pkg => .golangci-lint-1.54.0.pkg} (100%) diff --git a/.golangci.yaml b/.golangci.yaml index 537dc6b753..2cff39527b 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -61,5 +61,7 @@ linters-settings: exclude: - '.*cloudbeat.*fetching.fetchers.k8s.FileCommonData' - '.*cloudbeat.*fetching.fetchers.k8s.ProcCommonData' + - '.*cloudbeat.*fetching.fetchers.*' + - '.*cloudbeat.*flavors.benchmark.*' tenv: all: true diff --git a/bin/.golangci-lint-1.53.3.pkg b/bin/.golangci-lint-1.54.0.pkg similarity index 100% rename from bin/.golangci-lint-1.53.3.pkg rename to bin/.golangci-lint-1.54.0.pkg diff --git a/bin/golangci-lint b/bin/golangci-lint index d07a3ce4a6..e65be940ca 120000 --- a/bin/golangci-lint +++ b/bin/golangci-lint @@ -1 +1 @@ -.golangci-lint-1.53.3.pkg \ No newline at end of file +.golangci-lint-1.54.0.pkg \ No newline at end of file diff --git a/resources/fetching/factory/k8s_factory.go b/resources/fetching/factory/k8s_factory.go index d52803d0e2..e1beca050d 100644 --- a/resources/fetching/factory/k8s_factory.go +++ b/resources/fetching/factory/k8s_factory.go @@ -44,10 +44,10 @@ var vanillaFsPatterns = []string{ } var vanillaRequiredProcesses = fetchers.ProcessesConfigMap{ - "etcd": {}, - "kube-apiserver": {}, - "kube-controller": {}, - "kube-scheduler": {}, + "etcd": {ConfigFileArguments: nil}, + "kube-apiserver": {ConfigFileArguments: nil}, + "kube-controller": {ConfigFileArguments: nil}, + "kube-scheduler": {ConfigFileArguments: nil}, "kubelet": {ConfigFileArguments: []string{"config"}}, } diff --git a/resources/fetching/fetchers/aws/rds_fetcher_test.go b/resources/fetching/fetchers/aws/rds_fetcher_test.go index cddbdd9762..18baa26c72 100644 --- a/resources/fetching/fetchers/aws/rds_fetcher_test.go +++ b/resources/fetching/fetchers/aws/rds_fetcher_test.go @@ -75,7 +75,13 @@ func (s *RdsFetcherTestSuite) TestFetcher_Fetch() { rdsMocksReturnVals: rdsMocksReturnVals{ "DescribeDBInstances": {[]awslib.AwsResource{dbInstance1, dbInstance2}, nil}, }, - expected: []fetching.ResourceInfo{{Resource: RdsResource{dbInstance: dbInstance1}}, {Resource: RdsResource{dbInstance: dbInstance2}}}, + expected: []fetching.ResourceInfo{{ + Resource: RdsResource{dbInstance: dbInstance1}, + CycleMetadata: fetching.CycleMetadata{}, + }, { + Resource: RdsResource{dbInstance: dbInstance2}, + CycleMetadata: fetching.CycleMetadata{}, + }}, }, }