From be69ca2b21680951fec7d396206cf7bd4b57472f Mon Sep 17 00:00:00 2001 From: zengk Date: Mon, 22 Jul 2024 15:34:43 -0700 Subject: [PATCH 01/16] uncomment lint and fix some lint errors --- .buildkite/pipeline.yml | 255 +++++++++--------- src/dbnode/x/encoding/shallow_cloner_test.go | 7 +- .../resources/docker/dockerexternal/etcd.go | 7 +- src/x/process/process_linux_test.go | 4 +- 4 files changed, 142 insertions(+), 131 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 9317cc1bf8..03927142c0 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -74,91 +74,57 @@ steps: # - |- # make clean install-vendor-m3 test-all-gen # <<: *common - - name: "Unit %n" - parallelism: 4 - plugins: - docker-compose#v2.5.1: - run: app - workdir: /go/src/github.com/m3db/m3 - kubernetes: - <<: *kubernetes - podSpec: - <<: *podSpec - containers: - - <<: *commandContainer - command: - - |- - make clean install-vendor-m3 test-base - <<: *common - - name: "Big Unit %n" - parallelism: 2 - plugins: - docker-compose#v2.5.1: - run: app - workdir: /go/src/github.com/m3db/m3 - kubernetes: - <<: *kubernetes - podSpec: - <<: *podSpec - containers: - - <<: *commandContainer - command: - - |- - make clean install-vendor-m3 test-big-base - <<: *common - - name: "Services, Tools" - plugins: - docker-compose#v2.5.1: - run: app - workdir: /go/src/github.com/m3db/m3 - kubernetes: - <<: *kubernetes - podSpec: - <<: *podSpec - containers: - - <<: *commandContainer - command: - - |- - make clean install-vendor-m3 services tools - <<: *common -# - name: "Lint" -# command: make clean lint -# env: -# CGO_ENABLED: 0 +# - name: "Unit %n" +# parallelism: 4 # plugins: # docker-compose#v2.5.1: # run: app # workdir: /go/src/github.com/m3db/m3 +# kubernetes: +# <<: *kubernetes +# podSpec: +# <<: *podSpec +# containers: +# - <<: *commandContainer +# command: +# - |- +# make clean install-vendor-m3 test-base # <<: *common -# - name: "Integration (:docker:)" -# command: make clean install-vendor-m3 docker-integration-test +# - name: "Big Unit %n" # parallelism: 2 -# env: -# CGO_ENABLED: 0 -# GIMME_GO_VERSION: 1.18.x # plugins: -# gopath-checkout#v1.0.1: -# import: github.com/m3db/m3 +# docker-compose#v2.5.1: +# run: app +# workdir: /go/src/github.com/m3db/m3 +# kubernetes: +# <<: *kubernetes +# podSpec: +# <<: *podSpec +# containers: +# - <<: *commandContainer +# command: +# - |- +# make clean install-vendor-m3 test-big-base +# <<: *common +# - name: "Services, Tools" +# plugins: +# docker-compose#v2.5.1: +# run: app +# workdir: /go/src/github.com/m3db/m3 +# kubernetes: +# <<: *kubernetes +# podSpec: +# <<: *podSpec +# containers: +# - <<: *commandContainer +# command: +# - |- +# make clean install-vendor-m3 services tools # <<: *common - - label: "M3 Cluster Integration Tests" + - name: "Lint" env: CGO_ENABLED: 0 GIMME_GO_VERSION: 1.18.x - plugins: - gopath-checkout#v1.0.1: - import: github.com/m3db/m3 - kubernetes: - <<: *kubernetes - podSpec: - <<: *podSpec - containers: - - <<: *commandContainer - command: - - |- - make clean test-ci-cluster-integration - <<: *common - - label: "M3 Cluster Integration Test Harness Tests" - skip: "NB(nate): temporarily disabling to resolve some tests flakes" plugins: docker-compose#v2.5.1: run: app @@ -171,8 +137,51 @@ steps: - <<: *commandContainer command: - |- - make clean test-ci-test-harness + make clean lint <<: *common +# - name: "Integration (:docker:)" +# command: make clean install-vendor-m3 docker-integration-test +# parallelism: 2 +# env: +# CGO_ENABLED: 0 +# GIMME_GO_VERSION: 1.18.x +# plugins: +# gopath-checkout#v1.0.1: +# import: github.com/m3db/m3 +# <<: *common +# - label: "M3 Cluster Integration Tests" +# env: +# CGO_ENABLED: 0 +# GIMME_GO_VERSION: 1.18.x +# plugins: +# gopath-checkout#v1.0.1: +# import: github.com/m3db/m3 +# kubernetes: +# <<: *kubernetes +# podSpec: +# <<: *podSpec +# containers: +# - <<: *commandContainer +# command: +# - |- +# make clean test-ci-cluster-integration +# <<: *common +# - label: "M3 Cluster Integration Test Harness Tests" +# skip: "NB(nate): temporarily disabling to resolve some tests flakes" +# plugins: +# docker-compose#v2.5.1: +# run: app +# workdir: /go/src/github.com/m3db/m3 +# kubernetes: +# <<: *kubernetes +# podSpec: +# <<: *podSpec +# containers: +# - <<: *commandContainer +# command: +# - |- +# make clean test-ci-test-harness +# <<: *common # - name: "Prometheus compatibility (:docker:)" # command: make clean install-vendor-m3 docker-compatibility-test # parallelism: 1 @@ -199,54 +208,54 @@ steps: # run: app # workdir: /go/src/github.com/m3db/m3 # <<: *common - - name: "Integration (aggregator TCP client) %n" - parallelism: 1 - plugins: - docker-compose#v2.5.1: - run: app - workdir: /go/src/github.com/m3db/m3 - kubernetes: - <<: *kubernetes - podSpec: - <<: *podSpec - containers: - - <<: *commandContainer - command: - - |- - make clean install-vendor-m3 test-ci-integration-aggregator aggregator_client=tcp - <<: *common - - name: "Integration (aggregator m3msg client) %n" - parallelism: 1 - plugins: - docker-compose#v2.5.1: - run: app - workdir: /go/src/github.com/m3db/m3 - kubernetes: - <<: *kubernetes - podSpec: - <<: *podSpec - containers: - - <<: *commandContainer - command: - - |- - make clean install-vendor-m3 test-ci-integration-aggregator aggregator_client=m3msg - <<: *common - - label: "Integration (m3em, cluster, msg, metrics) %n" - parallelism: 4 - plugins: - docker-compose#v2.5.1: - run: app - workdir: /go/src/github.com/m3db/m3 - kubernetes: - <<: *kubernetes - podSpec: - <<: *podSpec - containers: - - <<: *commandContainer - command: - - |- - make clean install-vendor-m3 test-ci-integration-m3em test-ci-integration-cluster test-ci-integration-msg test-ci-integration-metrics - <<: *common +# - name: "Integration (aggregator TCP client) %n" +# parallelism: 1 +# plugins: +# docker-compose#v2.5.1: +# run: app +# workdir: /go/src/github.com/m3db/m3 +# kubernetes: +# <<: *kubernetes +# podSpec: +# <<: *podSpec +# containers: +# - <<: *commandContainer +# command: +# - |- +# make clean install-vendor-m3 test-ci-integration-aggregator aggregator_client=tcp +# <<: *common +# - name: "Integration (aggregator m3msg client) %n" +# parallelism: 1 +# plugins: +# docker-compose#v2.5.1: +# run: app +# workdir: /go/src/github.com/m3db/m3 +# kubernetes: +# <<: *kubernetes +# podSpec: +# <<: *podSpec +# containers: +# - <<: *commandContainer +# command: +# - |- +# make clean install-vendor-m3 test-ci-integration-aggregator aggregator_client=m3msg +# <<: *common +# - label: "Integration (m3em, cluster, msg, metrics) %n" +# parallelism: 4 +# plugins: +# docker-compose#v2.5.1: +# run: app +# workdir: /go/src/github.com/m3db/m3 +# kubernetes: +# <<: *kubernetes +# podSpec: +# <<: *podSpec +# containers: +# - <<: *commandContainer +# command: +# - |- +# make clean install-vendor-m3 test-ci-integration-m3em test-ci-integration-cluster test-ci-integration-msg test-ci-integration-metrics +# <<: *common # - name: "Documentation tests" # command: make clean install-vendor-m3 docs-test # env: diff --git a/src/dbnode/x/encoding/shallow_cloner_test.go b/src/dbnode/x/encoding/shallow_cloner_test.go index 8636300219..1f921fec5a 100644 --- a/src/dbnode/x/encoding/shallow_cloner_test.go +++ b/src/dbnode/x/encoding/shallow_cloner_test.go @@ -45,9 +45,10 @@ func TestCloneMultiReaderIterator(t *testing.T) { f := newFixture(t) defer f.ctrl.Finish() - f.shallowCloner.cloneBlockReaderFn = func(b xio.BlockReader, _ xtime.UnixNano, _ time.Duration) (xio.BlockReader, error) { - return b, nil - } + f.shallowCloner.cloneBlockReaderFn = + func(b xio.BlockReader, _ xtime.UnixNano, _ time.Duration) (xio.BlockReader, error) { + return b, nil + } testBlockSize := time.Hour now := time.Now() diff --git a/src/integration/resources/docker/dockerexternal/etcd.go b/src/integration/resources/docker/dockerexternal/etcd.go index fbc00b2033..829dc088c9 100644 --- a/src/integration/resources/docker/dockerexternal/etcd.go +++ b/src/integration/resources/docker/dockerexternal/etcd.go @@ -221,14 +221,15 @@ func (c *EtcdNode) containerClientHostPort() string { var ipAddress string _, err := net.ResolveIPAddr("ip4", "host.docker.internal") - if err == nil && runtime.GOOS == "darwin" { + switch { + case err == nil && runtime.GOOS == "darwin": c.logger.Info("Running on Mac; using 127.0.0.1 to talk to etcd") ipAddress = "127.0.0.1" - } else if err == nil { + case err == nil: c.logger.Info("Running tests within a docker container (e.g. for buildkite. " + "Using host.docker.internal to talk to etcd") ipAddress = "host.docker.internal" - } else { + default: c.logger.Info("Running tests in environment without host.docker.internal set. Using 127.0.0.1 to talk to etcd") ipAddress = "127.0.0.1" } diff --git a/src/x/process/process_linux_test.go b/src/x/process/process_linux_test.go index aedfc175ad..17e9c5a213 100644 --- a/src/x/process/process_linux_test.go +++ b/src/x/process/process_linux_test.go @@ -58,8 +58,8 @@ func TestNumFDs(t *testing.T) { func() { numExpectedFds := numFilesToCreate + stdProcessFiles - cleanupFn := createTempFiles(numFilesToCreate) - defer cleanupFn() + cleanupFnFromFiles := createTempFiles(numFilesToCreate) + defer cleanupFnFromFiles() selfPID := os.Getpid() From 26dea063aa9c679234caca2ea26fafc82c055e5d Mon Sep 17 00:00:00 2001 From: zengk Date: Mon, 22 Jul 2024 15:47:01 -0700 Subject: [PATCH 02/16] test add no lint comment --- src/metrics/rules/active_ruleset_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/metrics/rules/active_ruleset_test.go b/src/metrics/rules/active_ruleset_test.go index 74a669996c..c4d82aebf8 100644 --- a/src/metrics/rules/active_ruleset_test.go +++ b/src/metrics/rules/active_ruleset_test.go @@ -1598,6 +1598,7 @@ func TestActiveRuleSetForwardMatchWithRollupRulesWithIncludeTags(t *testing.T) { }, }, }, + //nolint:dupl // Test case that has two include tags in the metric id { id: "rtagName1=rtagValue1,rtagName2=rtagValue2,rtagName3=rtagValue3,includeThisTag1=includeValue1,includeThisTag2=includeThisValue2", From 2608a86a19b0e6180b4be7cba8a43503a4afb04a Mon Sep 17 00:00:00 2001 From: zengk Date: Mon, 22 Jul 2024 15:56:43 -0700 Subject: [PATCH 03/16] add nolint to line 1532 --- src/metrics/rules/active_ruleset_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/metrics/rules/active_ruleset_test.go b/src/metrics/rules/active_ruleset_test.go index c4d82aebf8..06ec330b84 100644 --- a/src/metrics/rules/active_ruleset_test.go +++ b/src/metrics/rules/active_ruleset_test.go @@ -1529,6 +1529,7 @@ func TestActiveRuleSetForwardMatchWithRollupRulesWithIncludeTags(t *testing.T) { }, }), }, + //nolint:dupl { AggregationID: aggregation.MustCompressTypes(aggregation.Last), StoragePolicies: policy.StoragePolicies{ @@ -1598,7 +1599,6 @@ func TestActiveRuleSetForwardMatchWithRollupRulesWithIncludeTags(t *testing.T) { }, }, }, - //nolint:dupl // Test case that has two include tags in the metric id { id: "rtagName1=rtagValue1,rtagName2=rtagValue2,rtagName3=rtagValue3,includeThisTag1=includeValue1,includeThisTag2=includeThisValue2", From 27946af5e6a927a671fb0a88a50137a1c3d84d53 Mon Sep 17 00:00:00 2001 From: zengk Date: Mon, 22 Jul 2024 16:05:05 -0700 Subject: [PATCH 04/16] move nolint comment --- src/metrics/rules/active_ruleset_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/metrics/rules/active_ruleset_test.go b/src/metrics/rules/active_ruleset_test.go index 06ec330b84..c54022217d 100644 --- a/src/metrics/rules/active_ruleset_test.go +++ b/src/metrics/rules/active_ruleset_test.go @@ -1512,6 +1512,7 @@ func TestActiveRuleSetForwardMatchWithRollupRulesWithIncludeTags(t *testing.T) { Metadata: metadata.Metadata{ Pipelines: []metadata.PipelineMetadata{ metadata.DefaultPipelineMetadata, + //nolint:dupl { AggregationID: aggregation.MustCompressTypes(aggregation.Sum), StoragePolicies: policy.StoragePolicies{ @@ -1529,7 +1530,6 @@ func TestActiveRuleSetForwardMatchWithRollupRulesWithIncludeTags(t *testing.T) { }, }), }, - //nolint:dupl { AggregationID: aggregation.MustCompressTypes(aggregation.Last), StoragePolicies: policy.StoragePolicies{ From ce543da34ede1c1f199bf15eab26a2fb2fd6f6b1 Mon Sep 17 00:00:00 2001 From: zengk Date: Mon, 22 Jul 2024 16:55:12 -0700 Subject: [PATCH 05/16] add another dupl comment --- src/metrics/rules/active_ruleset_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/metrics/rules/active_ruleset_test.go b/src/metrics/rules/active_ruleset_test.go index c54022217d..4f75d030fc 100644 --- a/src/metrics/rules/active_ruleset_test.go +++ b/src/metrics/rules/active_ruleset_test.go @@ -1613,6 +1613,7 @@ func TestActiveRuleSetForwardMatchWithRollupRulesWithIncludeTags(t *testing.T) { Metadata: metadata.Metadata{ Pipelines: []metadata.PipelineMetadata{ metadata.DefaultPipelineMetadata, + //nolint:dupl { AggregationID: aggregation.MustCompressTypes(aggregation.Sum), StoragePolicies: policy.StoragePolicies{ From 9ab7f3509ab01acedfc462f09ea464658b8caf93 Mon Sep 17 00:00:00 2001 From: zengk Date: Mon, 22 Jul 2024 17:02:52 -0700 Subject: [PATCH 06/16] more dupl comments --- src/metrics/rules/active_ruleset_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/metrics/rules/active_ruleset_test.go b/src/metrics/rules/active_ruleset_test.go index 4f75d030fc..c6f30f6fba 100644 --- a/src/metrics/rules/active_ruleset_test.go +++ b/src/metrics/rules/active_ruleset_test.go @@ -1530,6 +1530,7 @@ func TestActiveRuleSetForwardMatchWithRollupRulesWithIncludeTags(t *testing.T) { }, }), }, + //nolint:dupl { AggregationID: aggregation.MustCompressTypes(aggregation.Last), StoragePolicies: policy.StoragePolicies{ @@ -1631,6 +1632,7 @@ func TestActiveRuleSetForwardMatchWithRollupRulesWithIncludeTags(t *testing.T) { }, }), }, + //nolint:dupl { AggregationID: aggregation.MustCompressTypes(aggregation.Last), StoragePolicies: policy.StoragePolicies{ @@ -1785,6 +1787,7 @@ func TestActiveRuleSetForwardMatchWithRollupRulesWithIncludeTags(t *testing.T) { Metadata: metadata.Metadata{ Pipelines: []metadata.PipelineMetadata{ metadata.DefaultPipelineMetadata, + //nolint:dupl { AggregationID: aggregation.MustCompressTypes(aggregation.Sum), StoragePolicies: policy.StoragePolicies{ @@ -1811,6 +1814,7 @@ func TestActiveRuleSetForwardMatchWithRollupRulesWithIncludeTags(t *testing.T) { Metadata: metadata.Metadata{ Pipelines: []metadata.PipelineMetadata{ metadata.DefaultPipelineMetadata, + //nolint:dupl { AggregationID: aggregation.MustCompressTypes(aggregation.Sum), StoragePolicies: policy.StoragePolicies{ @@ -1828,6 +1832,7 @@ func TestActiveRuleSetForwardMatchWithRollupRulesWithIncludeTags(t *testing.T) { }, }), }, + //nolint:dupl { AggregationID: aggregation.MustCompressTypes(aggregation.Last), StoragePolicies: policy.StoragePolicies{ @@ -1859,6 +1864,7 @@ func TestActiveRuleSetForwardMatchWithRollupRulesWithIncludeTags(t *testing.T) { Metadata: metadata.Metadata{ Pipelines: []metadata.PipelineMetadata{ metadata.DefaultPipelineMetadata, + //nolint:dupl { AggregationID: aggregation.MustCompressTypes(aggregation.Sum), StoragePolicies: policy.StoragePolicies{ From 12de176988a659aff9086ca168c4f15f482b64ad Mon Sep 17 00:00:00 2001 From: zengk Date: Mon, 22 Jul 2024 17:07:14 -0700 Subject: [PATCH 07/16] add dupl at the beginning of test function --- src/metrics/rules/active_ruleset_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/metrics/rules/active_ruleset_test.go b/src/metrics/rules/active_ruleset_test.go index c6f30f6fba..ed69dcae14 100644 --- a/src/metrics/rules/active_ruleset_test.go +++ b/src/metrics/rules/active_ruleset_test.go @@ -1496,6 +1496,7 @@ func TestActiveRuleSetForwardMatchWithRollupRules(t *testing.T) { } } +//nolint:dupl func TestActiveRuleSetForwardMatchWithRollupRulesWithIncludeTags(t *testing.T) { inputs := []testMatchInput{ // Test case that has one include tag in the metric id From dd291e952a3bfe3d56c2db8eaf362bc59a749aa3 Mon Sep 17 00:00:00 2001 From: zengk Date: Wed, 24 Jul 2024 11:14:44 -0700 Subject: [PATCH 08/16] add another dupl comment --- src/metrics/rules/active_ruleset_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/metrics/rules/active_ruleset_test.go b/src/metrics/rules/active_ruleset_test.go index ed69dcae14..1b58be1630 100644 --- a/src/metrics/rules/active_ruleset_test.go +++ b/src/metrics/rules/active_ruleset_test.go @@ -629,6 +629,7 @@ func TestActiveRuleSetForwardMatchWithAnyKeepOriginal(t *testing.T) { } } +//nolint:dupl func TestActiveRuleSetForwardMatchWithRollupRules(t *testing.T) { inputs := []testMatchInput{ { From 8e6ce8402e8de200e650bc399af6aeaa174009aa Mon Sep 17 00:00:00 2001 From: zengk Date: Wed, 24 Jul 2024 15:28:19 -0700 Subject: [PATCH 09/16] add nolint:lll comment --- src/metrics/rules/active_ruleset_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/metrics/rules/active_ruleset_test.go b/src/metrics/rules/active_ruleset_test.go index 1b58be1630..a961570b9c 100644 --- a/src/metrics/rules/active_ruleset_test.go +++ b/src/metrics/rules/active_ruleset_test.go @@ -1498,6 +1498,7 @@ func TestActiveRuleSetForwardMatchWithRollupRules(t *testing.T) { } //nolint:dupl +//nolint:lll func TestActiveRuleSetForwardMatchWithRollupRulesWithIncludeTags(t *testing.T) { inputs := []testMatchInput{ // Test case that has one include tag in the metric id From 08952738f20633a91b9a39a8409e8c9c0615ca34 Mon Sep 17 00:00:00 2001 From: zengk Date: Wed, 24 Jul 2024 15:40:09 -0700 Subject: [PATCH 10/16] add a bunch of nolint:lll --- src/metrics/rules/active_ruleset_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/metrics/rules/active_ruleset_test.go b/src/metrics/rules/active_ruleset_test.go index a961570b9c..744022c8b8 100644 --- a/src/metrics/rules/active_ruleset_test.go +++ b/src/metrics/rules/active_ruleset_test.go @@ -1498,9 +1498,9 @@ func TestActiveRuleSetForwardMatchWithRollupRules(t *testing.T) { } //nolint:dupl -//nolint:lll func TestActiveRuleSetForwardMatchWithRollupRulesWithIncludeTags(t *testing.T) { inputs := []testMatchInput{ + //nolint:lll // Test case that has one include tag in the metric id { id: "rtagName1=rtagValue1,rtagName2=rtagValue2,rtagName3=rtagValue3,includeThisTag1=includeValue1", @@ -1603,6 +1603,7 @@ func TestActiveRuleSetForwardMatchWithRollupRulesWithIncludeTags(t *testing.T) { }, }, }, + //nolint:lll // Test case that has two include tags in the metric id { id: "rtagName1=rtagValue1,rtagName2=rtagValue2,rtagName3=rtagValue3,includeThisTag1=includeValue1,includeThisTag2=includeThisValue2", @@ -1705,6 +1706,7 @@ func TestActiveRuleSetForwardMatchWithRollupRulesWithIncludeTags(t *testing.T) { }, }, }, + //nolint:lll { id: "rtagName1=rtagValue2,includeThisTag1=includeValue1,includeThisTag2=includeThisValue2", matchFrom: 25000, @@ -1767,6 +1769,7 @@ func TestActiveRuleSetForwardMatchWithRollupRulesWithIncludeTags(t *testing.T) { keepOriginal: false, forExistingIDResult: metadata.DefaultStagedMetadatas, }, + //nolint:lll { id: "rtagName1=rtagValue1,rtagName2=rtagValue2,rtagName3=rtagValue3,includeThisTag1=includeValue1,includeThisTag2=includeThisValue2", matchFrom: 10000, @@ -2362,6 +2365,7 @@ func TestActiveRuleSetForwardMatchWithRollupRulesWithIncludeTags(t *testing.T) { }, }, }, + //nolint:lll //nolint:dupl { id: "rtagName1=rtagValue3,rtagName2=rtagValue2,rtagName3=rtagValue3,includeThisTag1=includeValue1,includeThisTag2=includeThisValue2", From c462cfa396c0007674dd33831bbd20e61468766d Mon Sep 17 00:00:00 2001 From: zengk Date: Wed, 24 Jul 2024 15:57:04 -0700 Subject: [PATCH 11/16] fix expected m issue lint --- src/aggregator/integration/integration_data.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/aggregator/integration/integration_data.go b/src/aggregator/integration/integration_data.go index 10ff0ac583..a3459794cc 100644 --- a/src/aggregator/integration/integration_data.go +++ b/src/aggregator/integration/integration_data.go @@ -35,7 +35,6 @@ import ( "github.com/m3db/m3/src/metrics/metric/aggregated" metricid "github.com/m3db/m3/src/metrics/metric/id" "github.com/m3db/m3/src/metrics/metric/unaggregated" - "github.com/m3db/m3/src/metrics/pipeline" mpipeline "github.com/m3db/m3/src/metrics/pipeline" "github.com/m3db/m3/src/metrics/pipeline/applied" "github.com/m3db/m3/src/metrics/policy" @@ -137,7 +136,7 @@ var ( Operations: []applied.OpUnion{ { Type: mpipeline.TransformationOpType, - Transformation: pipeline.TransformationOp{ + Transformation: mpipeline.TransformationOp{ Type: transformation.Absolute, }, }, From 81623b6a9f5a6a78aec2565ece59f7641cea4c3a Mon Sep 17 00:00:00 2001 From: zengk Date: Wed, 24 Jul 2024 16:08:17 -0700 Subject: [PATCH 12/16] attempt to fix n and t errors --- .../integration/one_client_r2_preserve_original_test.go | 2 +- src/integration/resources/docker/dockerexternal/etcd.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/aggregator/integration/one_client_r2_preserve_original_test.go b/src/aggregator/integration/one_client_r2_preserve_original_test.go index be1250962b..5d7eb35ff6 100644 --- a/src/aggregator/integration/one_client_r2_preserve_original_test.go +++ b/src/aggregator/integration/one_client_r2_preserve_original_test.go @@ -33,7 +33,7 @@ import ( "github.com/m3db/m3/src/metrics/metric/aggregated" metricid "github.com/m3db/m3/src/metrics/metric/id" "github.com/m3db/m3/src/metrics/metric/unaggregated" - "github.com/stretchr/testify/require" + require "github.com/stretchr/testify/require" "go.uber.org/zap" ) diff --git a/src/integration/resources/docker/dockerexternal/etcd.go b/src/integration/resources/docker/dockerexternal/etcd.go index 829dc088c9..06ea68d910 100644 --- a/src/integration/resources/docker/dockerexternal/etcd.go +++ b/src/integration/resources/docker/dockerexternal/etcd.go @@ -35,7 +35,7 @@ import ( xerrors "github.com/m3db/m3/src/x/errors" "github.com/m3db/m3/src/x/instrument" "github.com/m3db/m3/src/x/retry" - "github.com/ory/dockertest/v3" + dockertest "github.com/ory/dockertest/v3" "github.com/ory/dockertest/v3/docker" clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/zap" From 65e55382e0f836cc70b677fe2e8739710d5fea37 Mon Sep 17 00:00:00 2001 From: zengk Date: Wed, 24 Jul 2024 16:15:18 -0700 Subject: [PATCH 13/16] attempt to fix tab issue --- .../integration/one_client_r2_preserve_original_test.go | 2 +- src/integration/resources/docker/dockerexternal/etcd.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/aggregator/integration/one_client_r2_preserve_original_test.go b/src/aggregator/integration/one_client_r2_preserve_original_test.go index 5d7eb35ff6..be1250962b 100644 --- a/src/aggregator/integration/one_client_r2_preserve_original_test.go +++ b/src/aggregator/integration/one_client_r2_preserve_original_test.go @@ -33,7 +33,7 @@ import ( "github.com/m3db/m3/src/metrics/metric/aggregated" metricid "github.com/m3db/m3/src/metrics/metric/id" "github.com/m3db/m3/src/metrics/metric/unaggregated" - require "github.com/stretchr/testify/require" + "github.com/stretchr/testify/require" "go.uber.org/zap" ) diff --git a/src/integration/resources/docker/dockerexternal/etcd.go b/src/integration/resources/docker/dockerexternal/etcd.go index 06ea68d910..829dc088c9 100644 --- a/src/integration/resources/docker/dockerexternal/etcd.go +++ b/src/integration/resources/docker/dockerexternal/etcd.go @@ -35,7 +35,7 @@ import ( xerrors "github.com/m3db/m3/src/x/errors" "github.com/m3db/m3/src/x/instrument" "github.com/m3db/m3/src/x/retry" - dockertest "github.com/ory/dockertest/v3" + "github.com/ory/dockertest/v3" "github.com/ory/dockertest/v3/docker" clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/zap" From 46f84cfd11d5e40ca6cb2462f29d4ba5f5da22fd Mon Sep 17 00:00:00 2001 From: zengk Date: Wed, 24 Jul 2024 16:45:35 -0700 Subject: [PATCH 14/16] add blank lines --- .../integration/one_client_r2_preserve_original_test.go | 1 + src/integration/resources/docker/dockerexternal/etcd.go | 1 + 2 files changed, 2 insertions(+) diff --git a/src/aggregator/integration/one_client_r2_preserve_original_test.go b/src/aggregator/integration/one_client_r2_preserve_original_test.go index be1250962b..d13521fb88 100644 --- a/src/aggregator/integration/one_client_r2_preserve_original_test.go +++ b/src/aggregator/integration/one_client_r2_preserve_original_test.go @@ -34,6 +34,7 @@ import ( metricid "github.com/m3db/m3/src/metrics/metric/id" "github.com/m3db/m3/src/metrics/metric/unaggregated" "github.com/stretchr/testify/require" + "go.uber.org/zap" ) diff --git a/src/integration/resources/docker/dockerexternal/etcd.go b/src/integration/resources/docker/dockerexternal/etcd.go index 829dc088c9..080efba9aa 100644 --- a/src/integration/resources/docker/dockerexternal/etcd.go +++ b/src/integration/resources/docker/dockerexternal/etcd.go @@ -37,6 +37,7 @@ import ( "github.com/m3db/m3/src/x/retry" "github.com/ory/dockertest/v3" "github.com/ory/dockertest/v3/docker" + clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/zap" "google.golang.org/grpc" From 6029808cb299f6091da260a253866f14868c03c5 Mon Sep 17 00:00:00 2001 From: zengk Date: Wed, 24 Jul 2024 16:52:05 -0700 Subject: [PATCH 15/16] change new lines --- .../integration/one_client_r2_preserve_original_test.go | 2 +- src/integration/resources/docker/dockerexternal/etcd.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/aggregator/integration/one_client_r2_preserve_original_test.go b/src/aggregator/integration/one_client_r2_preserve_original_test.go index d13521fb88..c44d35fd91 100644 --- a/src/aggregator/integration/one_client_r2_preserve_original_test.go +++ b/src/aggregator/integration/one_client_r2_preserve_original_test.go @@ -33,8 +33,8 @@ import ( "github.com/m3db/m3/src/metrics/metric/aggregated" metricid "github.com/m3db/m3/src/metrics/metric/id" "github.com/m3db/m3/src/metrics/metric/unaggregated" - "github.com/stretchr/testify/require" + "github.com/stretchr/testify/require" "go.uber.org/zap" ) diff --git a/src/integration/resources/docker/dockerexternal/etcd.go b/src/integration/resources/docker/dockerexternal/etcd.go index 080efba9aa..e3a5d07ad6 100644 --- a/src/integration/resources/docker/dockerexternal/etcd.go +++ b/src/integration/resources/docker/dockerexternal/etcd.go @@ -35,9 +35,9 @@ import ( xerrors "github.com/m3db/m3/src/x/errors" "github.com/m3db/m3/src/x/instrument" "github.com/m3db/m3/src/x/retry" + "github.com/ory/dockertest/v3" "github.com/ory/dockertest/v3/docker" - clientv3 "go.etcd.io/etcd/client/v3" "go.uber.org/zap" "google.golang.org/grpc" From d4218db368d0d111316803674f530dd022cefbaa Mon Sep 17 00:00:00 2001 From: zengk Date: Wed, 24 Jul 2024 20:45:27 -0700 Subject: [PATCH 16/16] uncomment passing pipeline tests --- .buildkite/pipeline.yml | 256 ++++++++++++++++++++-------------------- 1 file changed, 128 insertions(+), 128 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 03927142c0..d2e8e5d92f 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -74,53 +74,53 @@ steps: # - |- # make clean install-vendor-m3 test-all-gen # <<: *common -# - name: "Unit %n" -# parallelism: 4 -# plugins: -# docker-compose#v2.5.1: -# run: app -# workdir: /go/src/github.com/m3db/m3 -# kubernetes: -# <<: *kubernetes -# podSpec: -# <<: *podSpec -# containers: -# - <<: *commandContainer -# command: -# - |- -# make clean install-vendor-m3 test-base -# <<: *common -# - name: "Big Unit %n" -# parallelism: 2 -# plugins: -# docker-compose#v2.5.1: -# run: app -# workdir: /go/src/github.com/m3db/m3 -# kubernetes: -# <<: *kubernetes -# podSpec: -# <<: *podSpec -# containers: -# - <<: *commandContainer -# command: -# - |- -# make clean install-vendor-m3 test-big-base -# <<: *common -# - name: "Services, Tools" -# plugins: -# docker-compose#v2.5.1: -# run: app -# workdir: /go/src/github.com/m3db/m3 -# kubernetes: -# <<: *kubernetes -# podSpec: -# <<: *podSpec -# containers: -# - <<: *commandContainer -# command: -# - |- -# make clean install-vendor-m3 services tools -# <<: *common + - name: "Unit %n" + parallelism: 4 + plugins: + docker-compose#v2.5.1: + run: app + workdir: /go/src/github.com/m3db/m3 + kubernetes: + <<: *kubernetes + podSpec: + <<: *podSpec + containers: + - <<: *commandContainer + command: + - |- + make clean install-vendor-m3 test-base + <<: *common + - name: "Big Unit %n" + parallelism: 2 + plugins: + docker-compose#v2.5.1: + run: app + workdir: /go/src/github.com/m3db/m3 + kubernetes: + <<: *kubernetes + podSpec: + <<: *podSpec + containers: + - <<: *commandContainer + command: + - |- + make clean install-vendor-m3 test-big-base + <<: *common + - name: "Services, Tools" + plugins: + docker-compose#v2.5.1: + run: app + workdir: /go/src/github.com/m3db/m3 + kubernetes: + <<: *kubernetes + podSpec: + <<: *podSpec + containers: + - <<: *commandContainer + command: + - |- + make clean install-vendor-m3 services tools + <<: *common - name: "Lint" env: CGO_ENABLED: 0 @@ -149,39 +149,39 @@ steps: # gopath-checkout#v1.0.1: # import: github.com/m3db/m3 # <<: *common -# - label: "M3 Cluster Integration Tests" -# env: -# CGO_ENABLED: 0 -# GIMME_GO_VERSION: 1.18.x -# plugins: -# gopath-checkout#v1.0.1: -# import: github.com/m3db/m3 -# kubernetes: -# <<: *kubernetes -# podSpec: -# <<: *podSpec -# containers: -# - <<: *commandContainer -# command: -# - |- -# make clean test-ci-cluster-integration -# <<: *common -# - label: "M3 Cluster Integration Test Harness Tests" -# skip: "NB(nate): temporarily disabling to resolve some tests flakes" -# plugins: -# docker-compose#v2.5.1: -# run: app -# workdir: /go/src/github.com/m3db/m3 -# kubernetes: -# <<: *kubernetes -# podSpec: -# <<: *podSpec -# containers: -# - <<: *commandContainer -# command: -# - |- -# make clean test-ci-test-harness -# <<: *common + - label: "M3 Cluster Integration Tests" + env: + CGO_ENABLED: 0 + GIMME_GO_VERSION: 1.18.x + plugins: + gopath-checkout#v1.0.1: + import: github.com/m3db/m3 + kubernetes: + <<: *kubernetes + podSpec: + <<: *podSpec + containers: + - <<: *commandContainer + command: + - |- + make clean test-ci-cluster-integration + <<: *common + - label: "M3 Cluster Integration Test Harness Tests" + skip: "NB(nate): temporarily disabling to resolve some tests flakes" + plugins: + docker-compose#v2.5.1: + run: app + workdir: /go/src/github.com/m3db/m3 + kubernetes: + <<: *kubernetes + podSpec: + <<: *podSpec + containers: + - <<: *commandContainer + command: + - |- + make clean test-ci-test-harness + <<: *common # - name: "Prometheus compatibility (:docker:)" # command: make clean install-vendor-m3 docker-compatibility-test # parallelism: 1 @@ -208,54 +208,54 @@ steps: # run: app # workdir: /go/src/github.com/m3db/m3 # <<: *common -# - name: "Integration (aggregator TCP client) %n" -# parallelism: 1 -# plugins: -# docker-compose#v2.5.1: -# run: app -# workdir: /go/src/github.com/m3db/m3 -# kubernetes: -# <<: *kubernetes -# podSpec: -# <<: *podSpec -# containers: -# - <<: *commandContainer -# command: -# - |- -# make clean install-vendor-m3 test-ci-integration-aggregator aggregator_client=tcp -# <<: *common -# - name: "Integration (aggregator m3msg client) %n" -# parallelism: 1 -# plugins: -# docker-compose#v2.5.1: -# run: app -# workdir: /go/src/github.com/m3db/m3 -# kubernetes: -# <<: *kubernetes -# podSpec: -# <<: *podSpec -# containers: -# - <<: *commandContainer -# command: -# - |- -# make clean install-vendor-m3 test-ci-integration-aggregator aggregator_client=m3msg -# <<: *common -# - label: "Integration (m3em, cluster, msg, metrics) %n" -# parallelism: 4 -# plugins: -# docker-compose#v2.5.1: -# run: app -# workdir: /go/src/github.com/m3db/m3 -# kubernetes: -# <<: *kubernetes -# podSpec: -# <<: *podSpec -# containers: -# - <<: *commandContainer -# command: -# - |- -# make clean install-vendor-m3 test-ci-integration-m3em test-ci-integration-cluster test-ci-integration-msg test-ci-integration-metrics -# <<: *common + - name: "Integration (aggregator TCP client) %n" + parallelism: 1 + plugins: + docker-compose#v2.5.1: + run: app + workdir: /go/src/github.com/m3db/m3 + kubernetes: + <<: *kubernetes + podSpec: + <<: *podSpec + containers: + - <<: *commandContainer + command: + - |- + make clean install-vendor-m3 test-ci-integration-aggregator aggregator_client=tcp + <<: *common + - name: "Integration (aggregator m3msg client) %n" + parallelism: 1 + plugins: + docker-compose#v2.5.1: + run: app + workdir: /go/src/github.com/m3db/m3 + kubernetes: + <<: *kubernetes + podSpec: + <<: *podSpec + containers: + - <<: *commandContainer + command: + - |- + make clean install-vendor-m3 test-ci-integration-aggregator aggregator_client=m3msg + <<: *common + - label: "Integration (m3em, cluster, msg, metrics) %n" + parallelism: 4 + plugins: + docker-compose#v2.5.1: + run: app + workdir: /go/src/github.com/m3db/m3 + kubernetes: + <<: *kubernetes + podSpec: + <<: *podSpec + containers: + - <<: *commandContainer + command: + - |- + make clean install-vendor-m3 test-ci-integration-m3em test-ci-integration-cluster test-ci-integration-msg test-ci-integration-metrics + <<: *common # - name: "Documentation tests" # command: make clean install-vendor-m3 docs-test # env: