From 27625cacd77b5fe839a9a21b3d4f9ad4d39490de Mon Sep 17 00:00:00 2001 From: Vytenis Darulis Date: Fri, 29 Apr 2022 13:54:31 -0400 Subject: [PATCH] [build] Use go 1.18 (#4107) --- .buildkite/pipeline.yml | 10 +- .golangci.yml | 42 ++++-- Dockerfile | 2 +- Makefile | 6 +- docker/m3aggregator/Dockerfile | 4 +- docker/m3coordinator/Dockerfile | 4 +- docker/m3dbnode/Dockerfile | 4 +- docker/m3dbnode/Dockerfile-setcap | 4 +- docker/m3query/Dockerfile | 4 +- go.mod | 131 +++++++++++++++--- go.sum | 58 +------- src/aggregator/aggregator/aggregator_test.go | 3 +- src/aggregator/aggregator/elem_base.go | 8 +- src/aggregator/aggregator/elem_test.go | 7 +- src/aggregator/aggregator/entry_test.go | 3 +- src/aggregator/aggregator/generic_elem.go | 8 +- src/aggregator/aggregator/list.go | 6 +- src/aggregator/client/writer_mgr.go | 6 +- src/aggregator/integration/clock.go | 1 + .../integration/custom_aggregations_test.go | 4 +- src/aggregator/integration/election.go | 6 +- .../integration/metadata_change_test.go | 4 +- .../integration/multi_client_one_type_test.go | 4 +- .../integration/multi_server_resend_test.go | 9 +- src/aggregator/integration/options.go | 4 +- src/aggregator/integration/placement.go | 4 +- .../integration/placement_change_test.go | 9 +- .../integration/resend_stress_test.go | 5 +- .../integration/same_id_multi_type_test.go | 4 +- src/aggregator/integration/setup.go | 6 +- src/aggregator/integration/topic.go | 4 +- src/aggregator/server/rawtcp/server_test.go | 16 +-- src/cluster/client/etcd/options.go | 4 +- src/cluster/client/etcd/types.go | 4 +- .../placement/algo/sharded_prop_test.go | 4 +- src/cluster/placement/compress.go | 4 +- src/cluster/placement/compress_test.go | 6 +- src/cluster/placement/config.go | 4 +- src/cluster/placement/placements_test.go | 4 +- src/cluster/placement/placements_watcher.go | 4 +- .../placement/placements_watcher_test.go | 6 +- src/cluster/placementhandler/add.go | 6 +- src/cluster/placementhandler/common_test.go | 8 +- src/cluster/placementhandler/remove.go | 6 +- src/cluster/placementhandler/remove_test.go | 8 +- src/cluster/placementhandler/replace.go | 6 +- src/cluster/shard/shard.go | 4 +- src/cluster/shard/shard_test.go | 4 +- .../services/m3aggregator/config/config.go | 4 +- .../downsample/id_pool_types_test.go | 4 +- .../m3coordinator/downsample/options.go | 3 +- .../downsample/samples_appender.go | 4 +- src/cmd/services/m3dbnode/config/config.go | 12 +- .../services/m3dbnode/config/config_test.go | 2 +- src/cmd/tools/annotation_checker/main/main.go | 6 +- src/cmd/tools/m3ctl/topics/delete.go | 4 +- src/cmd/tools/m3ctl/topics/get.go | 4 +- src/cmd/tools/read_commitlog/main/main.go | 6 +- src/cmd/tools/split_index_shards/main/main.go | 6 +- src/cmd/tools/split_shards/main/main.go | 6 +- src/dbnode/client/errors.go | 4 +- src/dbnode/client/errors_test.go | 6 +- src/dbnode/client/options.go | 6 +- src/dbnode/client/types.go | 6 +- src/dbnode/encoding/annotation_holder_test.go | 4 +- .../encoding/m3tsz/decoder_benchmark_test.go | 4 +- .../encoding/m3tsz/timestamp_encoder.go | 4 +- .../integration/bootstrap_retries_test.go | 9 +- .../disk_cleanup_index_corrupted_test.go | 7 +- .../integration/fs_bootstrap_index_test.go | 6 +- .../index_active_block_rotate_test.go | 18 +-- .../index_block_orphaned_entry_test.go | 10 +- src/dbnode/integration/index_helpers.go | 6 +- src/dbnode/integration/integration.go | 17 ++- .../peers_bootstrap_none_available_test.go | 6 +- .../peers_bootstrap_partial_data_test.go | 5 +- .../query_cancellation_client_test.go | 8 +- .../repair_force_only_compare_test.go | 7 +- .../series_wired_list_panic_test.go | 5 +- src/dbnode/integration/setup.go | 12 +- src/dbnode/namespace/types.go | 4 +- .../tchannelthrift/cluster/service_test.go | 8 +- src/dbnode/storage/bootstrap/process.go | 8 +- src/dbnode/storage/bootstrap/process_test.go | 6 +- .../bootstrap/result/shard_ranges_test.go | 4 +- .../storage/bootstrap_instrumentation_test.go | 6 +- src/dbnode/storage/database.go | 8 +- src/dbnode/storage/database_test.go | 16 +-- src/dbnode/storage/entry.go | 6 +- src/dbnode/storage/entry_blackbox_test.go | 12 +- src/dbnode/storage/index.go | 6 +- src/dbnode/storage/index/block.go | 8 +- .../index/convert/tag_resolver_test.go | 4 +- src/dbnode/storage/index/mutable_segments.go | 10 +- .../storage/index/mutable_segments_test.go | 8 +- .../storage/index_query_concurrent_test.go | 12 +- src/dbnode/storage/lease_verifier_test.go | 4 +- .../storage/limits/permits/fixed_permits.go | 4 +- .../limits/permits/fixed_permits_test.go | 4 +- .../permits/lookback_limit_permit_test.go | 4 +- src/dbnode/storage/limits/permits/permit.go | 4 +- src/dbnode/storage/namespace.go | 8 +- .../storage/series/series_parallel_test.go | 6 +- src/dbnode/storage/series_resolver_test.go | 4 +- src/dbnode/storage/shard_test.go | 10 +- src/integration/aggregator/aggregator.go | 4 +- src/integration/prometheus/prometheus.go | 8 +- .../repair/repair_and_replication.go | 4 +- .../resources/coordinator_client.go | 14 +- .../resources/docker/coordinator.go | 6 +- src/integration/resources/docker/harness.go | 6 +- .../resources/docker/prometheus.go | 6 +- .../resources/inprocess/aggregator.go | 8 +- .../resources/inprocess/cluster.go | 8 +- .../resources/inprocess/coordinator.go | 8 +- src/integration/resources/inprocess/dbnode.go | 8 +- src/integration/resources/resources.go | 6 +- src/integration/resources/types.go | 4 +- src/integration/simple/simple.go | 6 +- src/m3ninx/postings/roaring/roaring.go | 4 +- src/metrics/encoding/protobuf/reset_test.go | 4 +- src/metrics/filters/filter_benchmark_test.go | 4 +- src/metrics/rules/rollup.go | 4 +- src/msg/consumer/consumer.go | 3 +- src/msg/producer/config/writer.go | 4 +- src/msg/producer/config/writer_test.go | 8 +- src/msg/producer/writer/message_writer.go | 4 +- .../api/v1/handler/graphite/find_test.go | 8 +- src/query/api/v1/handler/graphite/render.go | 6 +- .../api/v1/handler/influxdb/write_test.go | 5 +- src/query/api/v1/handler/prom/prom.go | 6 +- src/query/api/v1/handler/prom/read_test.go | 12 +- src/query/api/v1/handler/prometheus/common.go | 4 +- .../prometheus/native/list_tags_test.go | 8 +- .../handler/prometheus/native/middleware.go | 4 +- .../prometheus/native/middleware_test.go | 10 +- .../handler/prometheus/remote/write_test.go | 10 +- .../api/v1/httpd/graphite_router_test.go | 4 +- src/query/api/v1/httpd/handler.go | 8 +- src/query/api/v1/httpd/handler_test.go | 10 +- src/query/api/v1/middleware/logging.go | 8 +- src/query/api/v1/middleware/logging_test.go | 6 +- src/query/api/v1/middleware/metrics.go | 6 +- src/query/api/v1/middleware/metrics_test.go | 8 +- src/query/api/v1/middleware/middleware.go | 6 +- .../api/v1/middleware/middleware_test.go | 6 +- src/query/api/v1/middleware/panic.go | 8 +- .../v1/middleware/request_classification.go | 8 +- src/query/api/v1/middleware/rewrite.go | 12 +- src/query/api/v1/middleware/rewrite_test.go | 10 +- src/query/api/v1/middleware/source.go | 6 +- src/query/api/v1/middleware/source_test.go | 10 +- src/query/api/v1/middleware/tracing.go | 6 +- src/query/api/v1/options/handler.go | 6 +- src/query/functions/scalar/time.go | 4 +- .../graphite/native/alias_functions_test.go | 8 +- src/query/graphite/native/compiler_test.go | 8 +- src/query/graphite/storage/m3_wrapper.go | 4 +- src/query/graphite/storage/m3_wrapper_test.go | 8 +- src/query/parser/promql/parse.go | 4 +- src/query/pools/query_pools.go | 4 +- src/query/server/query.go | 26 ++-- src/query/server/query_test.go | 16 +-- src/query/storage/fanout/storage.go | 4 +- src/query/storage/fetch.go | 4 +- src/query/storage/m3/cluster_resolver_test.go | 8 +- .../m3/consolidators/id_dedupe_map_test.go | 8 +- src/query/storage/m3/storage.go | 10 +- src/query/storage/promremote/options.go | 6 +- src/query/storage/promremote/options_test.go | 8 +- .../promremote/query_converter_test.go | 8 +- .../storage/promremote/query_coverter.go | 4 +- src/query/storage/promremote/storage.go | 8 +- src/query/storage/promremote/storage_test.go | 12 +- src/query/storage/promremote/types.go | 6 +- src/query/storage/promremote/types_test.go | 6 +- src/query/storage/types.go | 4 +- src/query/test/builder.go | 4 +- src/query/test/m3/test_storage.go | 6 +- src/query/util/json/writer.go | 40 +++--- src/x/debug/ext/ext_test.go | 6 +- src/x/debug/ext/placement_test.go | 6 +- src/x/debug/test/test.go | 6 +- src/x/generated/mock.go | 1 - src/x/net/http/errors.go | 4 +- src/x/net/http/errors_test.go | 6 +- src/x/sync/num_cores_darwin.go | 2 + src/x/sync/num_cores_linux.go | 2 + 188 files changed, 760 insertions(+), 690 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index b84d9723a5..547e536c68 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -18,7 +18,7 @@ steps: command: make clean install-vendor-m3 test-all-gen env: CGO_ENABLED: 0 - GIMME_GO_VERSION: 1.16.x + GIMME_GO_VERSION: 1.18.x plugins: gopath-checkout#v1.0.1: import: github.com/m3db/m3 @@ -60,7 +60,7 @@ steps: parallelism: 2 env: CGO_ENABLED: 0 - GIMME_GO_VERSION: 1.16.x + GIMME_GO_VERSION: 1.18.x plugins: gopath-checkout#v1.0.1: import: github.com/m3db/m3 @@ -69,7 +69,7 @@ steps: command: make clean test-ci-cluster-integration env: CGO_ENABLED: 0 - GIMME_GO_VERSION: 1.16.x + GIMME_GO_VERSION: 1.18.x plugins: gopath-checkout#v1.0.1: import: github.com/m3db/m3 @@ -87,7 +87,7 @@ steps: parallelism: 1 env: CGO_ENABLED: 0 - GIMME_GO_VERSION: 1.16.x + GIMME_GO_VERSION: 1.18.x plugins: gopath-checkout#v1.0.1: import: github.com/m3db/m3 @@ -136,7 +136,7 @@ steps: command: make clean install-vendor-m3 docs-test env: CGO_ENABLED: 0 - GIMME_GO_VERSION: 1.16.x + GIMME_GO_VERSION: 1.18.x plugins: gopath-checkout#v1.0.1: import: github.com/m3db/m3 diff --git a/.golangci.yml b/.golangci.yml index 904c7aaf3a..0785343a08 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -70,10 +70,6 @@ linters-settings: govet: # report about shadowed variables check-shadowing: true - goimports: - # put imports beginning with prefix after 3rd-party packages; - # it's a comma-separated list of prefixes - local-prefixes: github.com/m3db/m3 maligned: # print struct with more effective memory layout or not, false by default suggest-new: true @@ -161,15 +157,19 @@ linters-settings: - hugeParam - rangeValCopy enabled-checks: - - ruleguard + # temp disabled, something wrong on go 1.18 + # - ruleguard settings: # settings passed to gocritic captLocal: # must be valid enabled check name paramsOnly: true - ruleguard: - rules: "src/cmd/tools/linter/gorules/rules.go" + # ruleguard: + # rules: "src/cmd/tools/linter/gorules/rules.go" gci: # gci control golang package import order and make it always deterministic - local-prefixes: github.com/m3db/m3 + sections: + - standard + - prefix(github.com/m3db/m3) + - default linters: enable: @@ -180,7 +180,6 @@ linters: - gci - goconst - gocritic - - goimports - golint - gosimple - govet @@ -216,16 +215,16 @@ linters: - interfacer # Valid use for not explicitly setting every field when they are optional nil/empty. - exhaustivestruct - # We allow cuddling assignment following conditions because there are valid + # We allow cuddling assignment following conditions because there are valid # logical groupings for this use-case (e.g. when evaluating config values). - - wsl + - wsl # Wrapcheck can cause errors until all callsites checking explicit error # types like io.EOF are converted to use errors.Is instead. Re-enable this # linter once all error checks are upgraded. - wrapcheck # godox prevents using TODOs or FIXMEs which can be useful for demarkation # of future work. - - godox + - godox # New line required before return would require a large fraction of the # code base to need updating, it's not worth the perceived benefit. - nlreturn @@ -237,6 +236,23 @@ linters: - gocyclo # Doesn't buy us much being super opinionated on how to name test functions. - thelper + # Useless, fails pretty much every file. + - varnamelen + # Accept interfaces, return structs is a geat mantra that's too late to adopt. + - ireturn + # Not a problem worthy enough to change lots of code. Also has a section named `What if I think it's bullshit?` in README.md + - nilnil + # Wants yaml tags to look like `perCpu` vs `perCPU`. + - tagliatelle + # There are valid uses for context in structs. + - containedctx + # These are new and flag a lot, need a separate evaluation: + - forcetypeassert + - errname + - promlinter + - gomoddirectives + - gofumpt + - ifshort disable-all: false presets: # bodyclose, errcheck, gosec, govet, scopelint, staticcheck, typecheck @@ -280,6 +296,8 @@ issues: # The errcheck linter already checks for unhandled errors so we can disable the equivalent # lint by gosec. - "G104: Errors unhandled" + # Random numbers here are not used in a security-sensitive context. + - "G404: Use of weak random number generator (math/rand instead of crypto/rand)" # Excluding configuration per-path, per-linter, per-text and per-source exclude-rules: diff --git a/Dockerfile b/Dockerfile index 0c1399639a..a9c6a392f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,3 @@ -FROM golang:1.16-stretch +FROM golang:1.18-stretch RUN apt-get update && apt-get install -y lsof diff --git a/Makefile b/Makefile index b9c0ece418..b905fae94b 100644 --- a/Makefile +++ b/Makefile @@ -37,11 +37,11 @@ GO_BUILD_LDFLAGS_CMD := $(abspath ./scripts/go-build-ldflags.sh) GO_BUILD_LDFLAGS := $(shell $(GO_BUILD_LDFLAGS_CMD) LDFLAG) GO_BUILD_COMMON_ENV := CGO_ENABLED=0 LINUX_AMD64_ENV := GOOS=linux GOARCH=amd64 $(GO_BUILD_COMMON_ENV) -# GO_RELEASER_DOCKER_IMAGE is latest goreleaser for go 1.16 -GO_RELEASER_DOCKER_IMAGE := goreleaser/goreleaser:v0.173.2 +# GO_RELEASER_DOCKER_IMAGE is latest goreleaser for go 1.18 +GO_RELEASER_DOCKER_IMAGE := goreleaser/goreleaser:v1.8.3 GO_RELEASER_RELEASE_ARGS ?= --rm-dist GO_RELEASER_WORKING_DIR := /go/src/github.com/m3db/m3 -GOLANGCI_LINT_VERSION := v1.37.0 +GOLANGCI_LINT_VERSION := v1.45.2 export NPROC := 2 # Maximum package concurrency for unit tests. diff --git a/docker/m3aggregator/Dockerfile b/docker/m3aggregator/Dockerfile index 6e29d327c9..222e66344f 100644 --- a/docker/m3aggregator/Dockerfile +++ b/docker/m3aggregator/Dockerfile @@ -1,5 +1,5 @@ # stage 1: build -FROM golang:1.16.5-alpine3.13 AS builder +FROM golang:1.18-alpine3.15 AS builder LABEL maintainer="The M3DB Authors " # Install deps @@ -15,7 +15,7 @@ RUN cd /go/src/github.com/m3db/m3/ && \ make m3aggregator-linux-amd64 # stage 2: lightweight "release" -FROM alpine:3.11 +FROM alpine:3.15 LABEL maintainer="The M3DB Authors " EXPOSE 5000/tcp 6000/tcp 6001/tcp diff --git a/docker/m3coordinator/Dockerfile b/docker/m3coordinator/Dockerfile index c54427a106..01313b01aa 100644 --- a/docker/m3coordinator/Dockerfile +++ b/docker/m3coordinator/Dockerfile @@ -1,5 +1,5 @@ # stage 1: build -FROM golang:1.16.5-alpine3.13 AS builder +FROM golang:1.18-alpine3.15 AS builder LABEL maintainer="The M3DB Authors " # Install deps @@ -15,7 +15,7 @@ RUN cd /go/src/github.com/m3db/m3/ && \ make m3coordinator-linux-amd64 # stage 2: lightweight "release" -FROM alpine:3.11 +FROM alpine:3.14 LABEL maintainer="The M3DB Authors " # Provide timezone data to allow TZ environment variable to be set diff --git a/docker/m3dbnode/Dockerfile b/docker/m3dbnode/Dockerfile index e2e6ad2fb3..1075d9c6f4 100644 --- a/docker/m3dbnode/Dockerfile +++ b/docker/m3dbnode/Dockerfile @@ -1,5 +1,5 @@ # stage 1: build -FROM golang:1.16.5-alpine3.13 AS builder +FROM golang:1.18-alpine3.15 AS builder LABEL maintainer="The M3DB Authors " # Install deps @@ -15,7 +15,7 @@ RUN cd /go/src/github.com/m3db/m3/ && \ make m3dbnode-linux-amd64 # Stage 2: lightweight "release" -FROM alpine:3.11 +FROM alpine:3.15 LABEL maintainer="The M3DB Authors " ENV GODEBUG madvdontneed=1 diff --git a/docker/m3dbnode/Dockerfile-setcap b/docker/m3dbnode/Dockerfile-setcap index 458d8628d4..270cfb37e8 100644 --- a/docker/m3dbnode/Dockerfile-setcap +++ b/docker/m3dbnode/Dockerfile-setcap @@ -1,5 +1,5 @@ # stage 1: build -FROM golang:1.16.5-alpine3.13 AS builder +FROM golang:1.18-alpine3.15 AS builder LABEL maintainer="The M3DB Authors " # Install deps @@ -15,7 +15,7 @@ RUN cd /go/src/github.com/m3db/m3/ && \ make m3dbnode-linux-amd64 # Stage 2: lightweight "release" -FROM alpine:3.11 +FROM alpine:3.15 LABEL maintainer="The M3DB Authors " ENV GODEBUG madvdontneed=1 diff --git a/docker/m3query/Dockerfile b/docker/m3query/Dockerfile index 0935f2d2dc..63e5178f62 100644 --- a/docker/m3query/Dockerfile +++ b/docker/m3query/Dockerfile @@ -1,5 +1,5 @@ # stage 1: build -FROM golang:1.16.5-alpine3.13 AS builder +FROM golang:1.18-alpine3.15 AS builder LABEL maintainer="The M3DB Authors " # Install deps @@ -15,7 +15,7 @@ RUN cd /go/src/github.com/m3db/m3/ && \ make m3query-linux-amd64 # stage 2: lightweight "release" -FROM alpine:3.11 +FROM alpine:3.15 LABEL maintainer="The M3DB Authors " EXPOSE 7201/tcp 7203/tcp diff --git a/go.mod b/go.mod index e92fd4cd9e..6bb85e152e 100644 --- a/go.mod +++ b/go.mod @@ -1,35 +1,25 @@ module github.com/m3db/m3 -go 1.16 +go 1.18 require ( - github.com/CAFxX/gcnotifier v0.0.0-20190112062741-224a280d589d // indirect - github.com/DataDog/datadog-go v3.7.1+incompatible // indirect github.com/MichaelTJones/pcg v0.0.0-20180122055547-df440c6ed7ed github.com/RoaringBitmap/roaring v0.4.21 - github.com/StackExchange/wmi v0.0.0-20210224194228-fe8f1750fd46 // indirect github.com/apache/thrift v0.14.2 - github.com/aws/aws-sdk-go v1.38.68 // indirect - github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b // indirect github.com/c2h5oh/datasize v0.0.0-20171227191756-4eba002a5eae github.com/cenkalti/backoff/v3 v3.0.0 github.com/cespare/xxhash/v2 v2.1.2 - github.com/containerd/continuity v0.0.0-20200413184840-d3ef23f19fbb // indirect github.com/davecgh/go-spew v1.1.1 - github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect github.com/fortytw2/leaktest v1.3.0 github.com/ghodss/yaml v1.0.0 github.com/go-kit/kit v0.10.0 - github.com/go-playground/universal-translator v0.17.0 // indirect github.com/gogo/protobuf v1.3.2 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.2 github.com/golang/snappy v0.0.4 github.com/google/go-cmp v0.5.7 github.com/google/uuid v1.3.0 - github.com/gorilla/handlers v1.5.1 // indirect github.com/gorilla/mux v1.8.0 - github.com/hashicorp/hcl v1.0.1-0.20190611123218-cf7d376da96d // indirect github.com/hydrogen18/stalecucumber v0.0.0-20151102144322-9b38526d4bdf github.com/influxdata/influxdb v1.9.2 github.com/jhump/protoreflect v1.6.1 @@ -37,8 +27,6 @@ require ( github.com/json-iterator/go v1.1.12 github.com/klauspost/compress v1.14.2 github.com/leanovate/gopter v0.2.8 - github.com/leodido/go-urn v1.2.1 // indirect - github.com/lib/pq v1.9.0 // indirect github.com/lightstep/lightstep-tracer-go v0.18.1 github.com/m3db/bitset v2.0.0+incompatible github.com/m3db/bloom/v4 v4.0.0-20200901140942-52efb8544fe9 @@ -51,8 +39,6 @@ require ( github.com/m3dbx/pilosa v1.4.1 github.com/m3dbx/vellum v0.0.0-20201119082309-5b47f7a70f69 github.com/mauricelam/genny v0.0.0-20180903214747-eb2c5232c885 - github.com/onsi/ginkgo v1.14.2 // indirect - github.com/onsi/gomega v1.10.4 // indirect github.com/opentracing-contrib/go-stdlib v1.0.0 github.com/opentracing/opentracing-go v1.2.0 github.com/ory/dockertest/v3 v3.6.3 @@ -60,17 +46,13 @@ require ( github.com/pborman/uuid v1.2.0 github.com/pkg/errors v0.9.1 github.com/pkg/profile v1.2.1 - github.com/prashantv/protectmem v0.0.0-20171002184600-e20412882b3a // indirect github.com/prometheus/client_golang v1.12.1 github.com/prometheus/common v0.32.1 github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 github.com/rakyll/statik v0.1.6 github.com/sergi/go-diff v1.1.0 - github.com/shirou/gopsutil v3.21.6+incompatible // indirect github.com/spf13/cobra v1.3.0 - github.com/streadway/quantile v0.0.0-20150917103942-b0c588724d25 // indirect github.com/stretchr/testify v1.7.0 - github.com/twmb/murmur3 v1.1.6 // indirect github.com/twotwotwo/sorts v0.0.0-20160814051341-bf5c1f2b8553 github.com/uber-go/tally v3.4.3+incompatible github.com/uber/jaeger-client-go v2.29.1+incompatible @@ -102,17 +84,122 @@ require ( go.uber.org/zap v1.21.0 golang.org/x/net v0.0.0-20220105145211-5b0dc2dfae98 golang.org/x/sync v0.0.0-20210220032951-036812b2e83c - golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 + golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 google.golang.org/grpc v1.44.0 google.golang.org/protobuf v1.27.1 - gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect - gopkg.in/go-playground/assert.v1 v1.2.1 // indirect gopkg.in/go-playground/validator.v9 v9.29.1 gopkg.in/validator.v2 v2.0.0-20160201165114-3e4f037f12a1 gopkg.in/vmihailenco/msgpack.v2 v2.8.3 gopkg.in/yaml.v2 v2.4.0 ) +require ( + github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect + github.com/CAFxX/gcnotifier v0.0.0-20190112062741-224a280d589d // indirect + github.com/DataDog/datadog-go v3.7.1+incompatible // indirect + github.com/Microsoft/go-winio v0.4.16 // indirect + github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 // indirect + github.com/StackExchange/wmi v0.0.0-20210224194228-fe8f1750fd46 // indirect + github.com/alecthomas/units v0.0.0-20210208195552-ff826a37aa15 // indirect + github.com/aws/aws-sdk-go v1.38.68 // indirect + github.com/benbjohnson/clock v1.3.0 // indirect + github.com/beorn7/perks v1.0.1 // indirect + github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b // indirect + github.com/cenkalti/backoff/v4 v4.1.2 // indirect + github.com/containerd/continuity v0.0.0-20200413184840-d3ef23f19fbb // indirect + github.com/coreos/go-semver v0.3.0 // indirect + github.com/coreos/go-systemd/v22 v22.3.2 // indirect + github.com/docker/go-connections v0.4.0 // indirect + github.com/docker/go-units v0.4.0 // indirect + github.com/dustin/go-humanize v1.0.0 // indirect + github.com/edsrzf/mmap-go v1.0.0 // indirect + github.com/felixge/httpsnoop v1.0.2 // indirect + github.com/form3tech-oss/jwt-go v3.2.3+incompatible // indirect + github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2 // indirect + github.com/go-kit/log v0.1.0 // indirect + github.com/go-logfmt/logfmt v0.5.0 // indirect + github.com/go-logr/logr v1.2.2 // indirect + github.com/go-logr/stdr v1.2.2 // indirect + github.com/go-playground/locales v0.13.0 // indirect + github.com/go-playground/universal-translator v0.17.0 // indirect + github.com/golang-jwt/jwt v3.2.2+incompatible // indirect + github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect + github.com/google/btree v1.0.1 // indirect + github.com/gorilla/handlers v1.5.1 // indirect + github.com/gorilla/websocket v1.4.2 // indirect + github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect + github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect + github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect + github.com/hashicorp/hcl v1.0.1-0.20190611123218-cf7d376da96d // indirect + github.com/inconshreveable/mousetrap v1.0.0 // indirect + github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/jpillora/backoff v1.0.0 // indirect + github.com/knadh/koanf v1.4.0 // indirect + github.com/leodido/go-urn v1.2.1 // indirect + github.com/lib/pq v1.9.0 // indirect + github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743 // indirect + github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect + github.com/mitchellh/copystructure v1.2.0 // indirect + github.com/mitchellh/mapstructure v1.4.3 // indirect + github.com/mitchellh/reflectwalk v1.0.2 // indirect + github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect + github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect + github.com/modern-go/reflect2 v1.0.2 // indirect + github.com/mostynb/go-grpc-compression v1.1.16 // indirect + github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae // indirect + github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect + github.com/oklog/ulid v1.3.1 // indirect + github.com/onsi/ginkgo v1.14.2 // indirect + github.com/onsi/gomega v1.10.4 // indirect + github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/image-spec v1.0.1 // indirect + github.com/opencontainers/runc v1.0.0-rc9 // indirect + github.com/philhofer/fwd v1.0.0 // indirect + github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/prashantv/protectmem v0.0.0-20171002184600-e20412882b3a // indirect + github.com/prometheus/client_model v0.2.0 // indirect + github.com/prometheus/procfs v0.7.3 // indirect + github.com/rs/cors v1.8.2 // indirect + github.com/shirou/gopsutil v3.21.6+incompatible // indirect + github.com/sirupsen/logrus v1.8.1 // indirect + github.com/soheilhy/cmux v0.1.5 // indirect + github.com/spf13/cast v1.4.1 // indirect + github.com/spf13/pflag v1.0.5 // indirect + github.com/streadway/quantile v0.0.0-20150917103942-b0c588724d25 // indirect + github.com/stretchr/objx v0.2.0 // indirect + github.com/tinylib/msgp v1.1.0 // indirect + github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 // indirect + github.com/twmb/murmur3 v1.1.6 // indirect + github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect + go.etcd.io/bbolt v1.3.6 // indirect + go.etcd.io/etcd/client/v2 v2.306.0-alpha.0 // indirect + go.etcd.io/etcd/pkg/v3 v3.6.0-alpha.0 // indirect + go.etcd.io/etcd/raft/v3 v3.6.0-alpha.0 // indirect + go.opencensus.io v0.23.0 // indirect + go.opentelemetry.io/collector/model v0.45.0 // indirect + go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.28.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.28.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.4.1 // indirect + go.opentelemetry.io/otel/internal/metric v0.27.0 // indirect + go.opentelemetry.io/otel/metric v0.27.0 // indirect + go.opentelemetry.io/otel/trace v1.4.1 // indirect + go.opentelemetry.io/proto/otlp v0.12.0 // indirect + go.uber.org/multierr v1.7.0 // indirect + golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect + golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect + golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect + golang.org/x/text v0.3.7 // indirect + golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6 // indirect + golang.org/x/tools v0.1.5 // indirect + golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect + gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect + gopkg.in/go-playground/assert.v1 v1.2.1 // indirect + gopkg.in/natefinch/lumberjack.v2 v2.0.0 // indirect + sigs.k8s.io/yaml v1.2.0 // indirect +) + // branch 0.9.3-patch replace github.com/apache/thrift => github.com/m3dbx/thrift v0.0.0-20210326170526-6e3eef8b4a26 diff --git a/go.sum b/go.sum index 7cee07ae8e..ff650e59d5 100644 --- a/go.sum +++ b/go.sum @@ -53,7 +53,6 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= code.cloudfoundry.org/bytefmt v0.0.0-20190710193110-1eb035ffe2b6/go.mod h1:wN/zk7mhREp/oviagqUXY3EwuHhWyOvAdsn5Y4CzOrc= collectd.org v0.3.0/go.mod h1:A/8DzQBkF6abtvrT2j/AU/4tiBgJWYyh0y/oB/4MlWE= -contrib.go.opencensus.io/exporter/prometheus v0.4.0/go.mod h1:o7cosnyfuPVK0tB8q0QmaQNhGnptITnPQB+z1+qeFB0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v41.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v55.2.0+incompatible h1:TL2/vJWJEPOrmv97nHcbvjXES0Ntlb9P95hqGA1J2dU= @@ -202,7 +201,6 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= github.com/bmizerany/pat v0.0.0-20170815010413-6226ea591a40/go.mod h1:8rLXio+WjiTceGBHIoTvn60HIbs7Hm7bcHjyrSqYB9c= github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b h1:AP/Y7sqYicnjGDfD5VcY4CIfh1hRXBUavxrvELjTiOE= github.com/bmizerany/perks v0.0.0-20141205001514-d9a9656a3a4b/go.mod h1:ac9efd0D1fsDb3EJvhqgXRbFx7bs2wqZ10HQPeU8U/Q= @@ -214,19 +212,15 @@ github.com/c2h5oh/datasize v0.0.0-20171227191756-4eba002a5eae/go.mod h1:S/7n9cop github.com/cactus/go-statsd-client/statsd v0.0.0-20191106001114-12b4e2b38748/go.mod h1:l/bIBLeOl9eX+wxJAzxS4TveKRtAqlyDpHjhkfO0MEI= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v0.0.0-20181003080854-62661b46c409/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= -github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v3 v3.0.0 h1:ske+9nBpD9qZsTBoF41nW5L+AIuFBKMeze18XQ3eG1c= github.com/cenkalti/backoff/v3 v3.0.0/go.mod h1:cIeZDE3IrqwwJl6VUwCN6trj1oXrTS4rc0ij+ULvLYs= github.com/cenkalti/backoff/v4 v4.1.0/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/cenkalti/backoff/v4 v4.1.2 h1:6Yo7N8UP2K6LWZnW94DLVSSrbobcWdVzAYOisuDPIFo= github.com/cenkalti/backoff/v4 v4.1.2/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= -github.com/certifi/gocertifi v0.0.0-20191021191039-0944d244cd40/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054 h1:uH66TXeswKn5PW5zdZ39xEwfS9an067BirqA+P4QaLI= -github.com/certifi/gocertifi v0.0.0-20200922220541-2c3bb06c6054/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.0/go.mod h1:dgIUBU3pDso/gPgZ1osOZ0iQf77oPR28Tjxl5dIMyVM= @@ -246,11 +240,8 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211130200136-a8f946100490/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5 h1:xD/lrqdvwsc+O2bjSSi3YqY73Ke3LAiSCx49aCesA0E= -github.com/cockroachdb/datadriven v0.0.0-20200714090401-bf6692d28da5/go.mod h1:h6jFvWxBdQXxjopDMZyH2UVceIRfR84bdzbkoKrsWNo= github.com/cockroachdb/errors v1.2.4 h1:Lap807SXTH5tri2TivECb/4abUkMZC9zRoLarvcKDqs= -github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoCr5oaCLELYA= github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f h1:o/kfcElHqOiXqcou5a3rIlMc7oJbMQkeLk0VQJ7zgqY= -github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/containerd/containerd v1.4.3 h1:ijQT13JedHSHrQGWFcGEwzcNKrAGIiZ+jSD5QQG07SY= github.com/containerd/containerd v1.4.3/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= @@ -265,7 +256,6 @@ github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e h1:Wf6HqHfScWJN9/ZjdUKyjop4mf3Qdd+1TvvltAvM3m8= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= @@ -273,7 +263,6 @@ github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfc github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= @@ -346,7 +335,6 @@ github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4 github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/getsentry/raven-go v0.2.0 h1:no+xWJRb5ZI7eE8TWgIq1jLulQiIoLG0IfYxv5JYMGs= -github.com/getsentry/raven-go v0.2.0/go.mod h1:KungGk8q33+aIAZUIVWZDr2OfAEBsO49PX4NzFV5kcQ= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= @@ -383,7 +371,6 @@ github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= @@ -849,7 +836,6 @@ github.com/lightstep/lightstep-tracer-go v0.18.1 h1:vi1F1IQ8N7hNWytK9DpJsUfQhGuN github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linode/linodego v0.28.5 h1:JaCziTxHJ7a01MYyjHqskRc8zXQxXOddwrDeoQ2rBnw= github.com/linode/linodego v0.28.5/go.mod h1:BR0gVkCJffEdIGJSl6bHR80Ty+Uvg/2jkjmrWaFectM= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= github.com/m3db/bitset v2.0.0+incompatible h1:wMgri1Z2QSwJ8K/7ZuV7vE4feLOT7EofVC8RakIOybI= github.com/m3db/bitset v2.0.0+incompatible/go.mod h1:X8CCqZmZxs2O6d4qHhiqtAKCin4G5mScPhiwX9rsc5c= @@ -908,7 +894,6 @@ github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9 github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-tty v0.0.0-20180907095812-13ff1204f104/go.mod h1:XPvLUNfbS4fJH25nqRHfWLMa1ONC8Amw+mIA639KxkE= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= @@ -988,7 +973,6 @@ github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DV github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -1041,7 +1025,6 @@ github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtP github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= -github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= @@ -1067,7 +1050,6 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= github.com/prashantv/protectmem v0.0.0-20171002184600-e20412882b3a h1:AA9vgIBDjMHPC2McaGPojgV2dcI78ZC0TLNhYCXEKH8= github.com/prashantv/protectmem v0.0.0-20171002184600-e20412882b3a/go.mod h1:lzZQ3Noex5pfAy7mkAeCjcBDteYU85uWWnJ/y6gKU8k= github.com/prometheus/alertmanager v0.20.0/go.mod h1:9g2i48FAyZW6BtbsnvHtMHQXl2aVtrORKwKVCQ+nbrg= @@ -1104,7 +1086,6 @@ github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16 github.com/prometheus/common v0.18.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= github.com/prometheus/common v0.23.0/go.mod h1:H6QK/N6XVT42whUeIdI3dp36w49c+/iMDk7UAI2qm7Q= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= -github.com/prometheus/common v0.28.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= @@ -1123,7 +1104,6 @@ github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/prometheus/prometheus v0.0.0-20200609090129-a6600f564e3c/go.mod h1:S5n0C6tSgdnwWshBUceRx5G1OsjLv/EeZ9t3wIfEtsY= github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02 h1:waKRn/b6LBaXHjQ3dlZd+0li1nIykM34r5XEYr4lTBM= github.com/prometheus/prometheus v1.8.2-0.20210621150501-ff58416a0b02/go.mod h1:fC6ROpjS/2o+MQTO7X8NSZLhLBSNlDzxaeDMqQm+TUM= -github.com/prometheus/statsd_exporter v0.21.0/go.mod h1:rbT83sZq2V+p73lHhPZfMc3MLCHmSHelCh9hSGYNLTQ= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/rakyll/statik v0.1.6 h1:uICcfUXpgqtw2VopbIncslhAmE5hwc4g20TEyEENBNs= github.com/rakyll/statik v0.1.6/go.mod h1:OEi9wJV/fMUAGx1eNjq75DKDsJVuEv1U0oYdX6GX8Zs= @@ -1166,7 +1146,6 @@ github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNX github.com/shirou/gopsutil v2.17.13-0.20180801053943-8048a2e9c577+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/shirou/gopsutil v3.21.6+incompatible h1:mmZtAlWSd8U2HeRTjswbnDLPxqsEoK01NK+GZ1P+nEM= github.com/shirou/gopsutil v3.21.6+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= -github.com/shirou/gopsutil/v3 v3.22.1/go.mod h1:WapW1AOOPlHyXr+yOyw3uYx36enocrtSoSBy0L5vUHY= github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= @@ -1194,13 +1173,11 @@ github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTd github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= -github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/cobra v1.3.0 h1:R7cSvGu+Vv+qX0gW5R/85dx2kmmJT5z5NM8ifdYjdn0= github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= @@ -1213,7 +1190,6 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= -github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -1232,9 +1208,7 @@ github.com/tinylib/msgp v1.0.2/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDW github.com/tinylib/msgp v1.1.0 h1:9fQd+ICuRIu/ue4vxJZu6/LzxN0HwMds2nq/0cFvxHU= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= github.com/tklauser/go-sysconf v0.3.9 h1:JeUVdAOWhhxVcU6Eqr/ATFHgXk/mmiItdKeJPev3vTo= -github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs= github.com/tklauser/numcpus v0.3.0 h1:ILuRUQBtssgnxw0XXIjKUC56fgnOrFoQQ/4+DeU2biQ= -github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802 h1:uruHq4dN7GR16kFc5fp3d1RIYzJW5onx8Ybykw2YQFA= @@ -1286,13 +1260,11 @@ github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= -github.com/yusufpapurcu/wmi v1.2.2/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 h1:VcrIfasaLFkyjk6KNlXQSzO+B0fZcnECiDrKJsfxka0= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= @@ -1306,7 +1278,6 @@ go.etcd.io/etcd/client/v2 v2.305.0-alpha.0.0.20211029212747-6656181d312a h1:QPs9 go.etcd.io/etcd/client/v2 v2.305.0-alpha.0.0.20211029212747-6656181d312a/go.mod h1:FJu6BdnY7u/JiFObq/nS0UPx+p2L3p1tw2kMj/UZGg0= go.etcd.io/etcd/client/v3 v3.6.0-alpha.0 h1:hHaJ8CvTPJ9iv7xPz3G0gxt3csEqJW8evgty/kYICwo= go.etcd.io/etcd/client/v3 v3.6.0-alpha.0/go.mod h1:a9JuChoQBDnw7WclHYBYCtTOIC12Wwj+Fw0LX4TI/Gs= -go.etcd.io/etcd/etcdutl/v3 v3.6.0-alpha.0/go.mod h1:0ILo94EKC+jgp/IMfxePlfJD1OVtMVfgTQ/xM8+joOA= go.etcd.io/etcd/pkg/v3 v3.6.0-alpha.0 h1:cV/VsaYde/tcc2G9aHN5DQwx6CtUsWSEW4UqYzXuyyk= go.etcd.io/etcd/pkg/v3 v3.6.0-alpha.0/go.mod h1:tXqWms0MpOJAS6L0B9nhFqZr0C/WEYzj/OtN90G8xzo= go.etcd.io/etcd/raft/v3 v3.6.0-alpha.0 h1:BQ6CnNP4pIpy5rusFlTBxAacDgPXhuiHFwoTsBNsVpI= @@ -1339,14 +1310,10 @@ go.opentelemetry.io/collector v0.45.0 h1:y6Bc181dkOB8vYmiU//AnaYLpHNNzJSO94RAgsH go.opentelemetry.io/collector v0.45.0/go.mod h1:7QaqwfebCFzvH4q96IAaqqxj3VzB37VBn22uIpNKeG4= go.opentelemetry.io/collector/model v0.45.0 h1:GEq/lk8uWKspFLiBoA7SoDj2rZJ/HJUGfZpAD9tgzJQ= go.opentelemetry.io/collector/model v0.45.0/go.mod h1:uyiyyq8lV45zrJ94MnLip26sorfNLP6J9XmOvaEmy7w= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.26.1/go.mod h1:4wsfAAW5N9wUHM0QTmZS8z7fvYZ1rv3m+sVeSpf8NhU= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.28.0 h1:Ky1MObd188aGbgb5OgNnwGuEEwI9MVIcc7rBW6zk5Ak= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.28.0/go.mod h1:vEhqr0m4eTc+DWxfsXoXue2GBgV2uUwVznkGIHW/e5w= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.28.0 h1:hpEoMBvKLC6CqFZogJypr9IHwwSNF3ayEkNzD502QAM= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.28.0/go.mod h1:Ihno+mNBfZlT0Qot3XyRTdZ/9U/Cg2Pfgj75DTdIfq4= -go.opentelemetry.io/contrib/zpages v0.28.0/go.mod h1:y5RYQQgfEQV6oASayfbUv5ye5bnnncor+Ln18jMrVKY= -go.opentelemetry.io/otel v1.1.0/go.mod h1:7cww0OW51jQ8IaZChIEdqLwgh+44+7uiTdWsAL0wQpA= -go.opentelemetry.io/otel v1.2.0/go.mod h1:aT17Fk0Z1Nor9e0uisf98LrntPGMnk4frBO9+dkf69I= go.opentelemetry.io/otel v1.3.0/go.mod h1:PWIKzi6JCp7sM0k9yZ43VX+T345uNbAkDKwHVjb2PTs= go.opentelemetry.io/otel v1.4.0/go.mod h1:jeAqMFKy2uLIxCtKxoFj0FAL5zAPKQagc3+GtBWakzk= go.opentelemetry.io/otel v1.4.1 h1:QbINgGDDcoQUoMJa2mMaWno49lja9sHwp6aoa2n3a4g= @@ -1355,35 +1322,22 @@ go.opentelemetry.io/otel/bridge/opentracing v1.4.1 h1:DkqG1Pvgd8W2cXh1x+KUA19PHM go.opentelemetry.io/otel/bridge/opentracing v1.4.1/go.mod h1:Y/lcDE+dY5xrnYm2Zmf37iF360dXIMegYd1WbQB6RL4= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.4.1 h1:imIM3vRDMyZK1ypQlQlO+brE22I9lRhJsBDXpDWjlz8= go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.4.1/go.mod h1:VpP4/RMn8bv8gNo9uK7/IMY4mtWLELsS+JIP0inH0h4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.1.0/go.mod h1:/E4iniSqAEvqbq6KM5qThKZR2sd42kDvD+SrYt00vRw= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.1 h1:WPpPsAAs8I2rA47v5u0558meKmmwm1Dj99ZbqCV8sZ8= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.4.1/go.mod h1:o5RW5o2pKpJLD5dNTCmjF1DorYwMeFJmb/rKr5sLaa8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.1.0/go.mod h1:Gyc0evUosTBVNRqTFGuu0xqebkEWLkLwv42qggTCwro= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.4.1 h1:AxqDiGk8CorEXStMDZF5Hz9vo9Z7ZZ+I5m8JRl/ko40= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.4.1/go.mod h1:c6E4V3/U+miqjs/8l950wggHGL1qzlp0Ypj9xoGrPqo= -go.opentelemetry.io/otel/exporters/prometheus v0.27.0/go.mod h1:u0vTzijx2B6gGDa8FuIVoESW6z0HdKkXZWZMSTsoJKs= go.opentelemetry.io/otel/internal/metric v0.26.0/go.mod h1:CbBP6AxKynRs3QCbhklyLUtpfzbqCLiafV9oY2Zj1Jk= go.opentelemetry.io/otel/internal/metric v0.27.0 h1:9dAVGAfFiiEq5NVB9FUJ5et+btbDQAUIJehJ+ikyryk= go.opentelemetry.io/otel/internal/metric v0.27.0/go.mod h1:n1CVxRqKqYZtqyTh9U/onvKapPGv7y/rpyOTI+LFNzw= go.opentelemetry.io/otel/metric v0.26.0/go.mod h1:c6YL0fhRo4YVoNs6GoByzUgBp36hBL523rECoZA5UWg= go.opentelemetry.io/otel/metric v0.27.0 h1:HhJPsGhJoKRSegPQILFbODU56NS/L1UE4fS1sC5kIwQ= go.opentelemetry.io/otel/metric v0.27.0/go.mod h1:raXDJ7uP2/Jc0nVZWQjJtzoyssOYWu/+pjZqRzfvZ7g= -go.opentelemetry.io/otel/sdk v1.1.0/go.mod h1:3aQvM6uLm6C4wJpHtT8Od3vNzeZ34Pqc6bps8MywWzo= -go.opentelemetry.io/otel/sdk v1.2.0/go.mod h1:jNN8QtpvbsKhgaC6V5lHiejMoKD+V8uadoSafgHPx1U= -go.opentelemetry.io/otel/sdk v1.3.0/go.mod h1:rIo4suHNhQwBIPg9axF8V9CA72Wz2mKF1teNrup8yzs= -go.opentelemetry.io/otel/sdk v1.4.0/go.mod h1:71GJPNJh4Qju6zJuYl1CrYtXbrgfau/M9UAggqiy1UE= go.opentelemetry.io/otel/sdk v1.4.1 h1:J7EaW71E0v87qflB4cDolaqq3AcujGrtyIPGQoZOB0Y= go.opentelemetry.io/otel/sdk v1.4.1/go.mod h1:NBwHDgDIBYjwK2WNu1OPgsIc2IJzmBXNnvIJxJc8BpE= -go.opentelemetry.io/otel/sdk/export/metric v0.27.0/go.mod h1:d30U31er9jws2ZMsV1N36Zyr2v8QA5E3NtAQvj1WFQo= -go.opentelemetry.io/otel/sdk/metric v0.27.0/go.mod h1:lOgrT5C3ORdbqp2LsDrx+pBj6gbZtQ5Omk27vH3EaW0= -go.opentelemetry.io/otel/trace v1.1.0/go.mod h1:i47XtdcBQiktu5IsrPqOHe8w+sBmnLwwHt8wiUsWGTI= -go.opentelemetry.io/otel/trace v1.2.0/go.mod h1:N5FLswTubnxKxOJHM7XZC074qpeEdLy3CgAVsdMucK0= go.opentelemetry.io/otel/trace v1.3.0/go.mod h1:c/VDhno8888bvQYmbYLqe41/Ldmr/KKunbvWM4/fEjk= go.opentelemetry.io/otel/trace v1.4.0/go.mod h1:uc3eRsqDfWs9R7b92xbQbU42/eTNz4N+gLP8qJCi4aE= go.opentelemetry.io/otel/trace v1.4.1 h1:O+16qcdTrT7zxv2J6GejTPFinSwA++cYerC5iSiF8EQ= go.opentelemetry.io/otel/trace v1.4.1/go.mod h1:iYEVbroFCNut9QkwEczV9vMRPHNKSSwYZjulEtsmhFc= -go.opentelemetry.io/proto/otlp v0.9.0/go.mod h1:1vKfU9rv61e9EVGthD1zNvUbiwPcimSsOPU9brfSHJg= -go.opentelemetry.io/proto/otlp v0.10.0/go.mod h1:zG20xCK0szZ1xdokeSOwEcmlXu+x9kkdRe6N1DhKcfU= go.opentelemetry.io/proto/otlp v0.12.0 h1:CMJ/3Wp7iOWES+CYLfnBv+DVmPbB+kmy9PJ92XvlR6c= go.opentelemetry.io/proto/otlp v0.12.0/go.mod h1:TsIjwGWIx5VFYv9KGVlOpxoBl5Dy+63SUguV7GGvlSQ= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= @@ -1446,7 +1400,6 @@ golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1565,7 +1518,6 @@ golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= @@ -1654,7 +1606,6 @@ golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201204225414-ed752295db88/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1679,18 +1630,16 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210816183151-1e6c022a8912/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20211123173158-ef496fb156ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 h1:xHms4gcpe1YE7A3yIllJXP16CMAGuqwO2lX1mTyyRRc= +golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d h1:SZxvLBoTP5yHO3Frd4z4vrF+DBX9vMVanchswa69toE= @@ -1830,7 +1779,6 @@ google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34q google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= @@ -1962,7 +1910,6 @@ gopkg.in/go-playground/validator.v9 v9.29.1/go.mod h1:+c9/zcJMFNgbLvly1L1V+PpxWd gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0 h1:1Lc07Kr7qY4U2YPouBjpCLxpiyxIVoxqXgkXLknAOE8= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= @@ -2027,7 +1974,6 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= -sigs.k8s.io/json v0.0.0-20211020170558-c049b76a60c6/go.mod h1:p4QtZmO4uMYipTQNzagwnNoseA6OxSUutVw05NhYDRs= sigs.k8s.io/structured-merge-diff/v2 v2.0.1/go.mod h1:Wb7vfKAodbKgf6tn1Kl0VvGj7mRH6DGaRcixXEJXTsE= sigs.k8s.io/structured-merge-diff/v4 v4.0.2/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/structured-merge-diff/v4 v4.1.0 h1:C4r9BgJ98vrKnnVCjwCSXcWjWe0NKcUQkmzDXZXGwH8= diff --git a/src/aggregator/aggregator/aggregator_test.go b/src/aggregator/aggregator/aggregator_test.go index 8e5866120d..4120c0b58d 100644 --- a/src/aggregator/aggregator/aggregator_test.go +++ b/src/aggregator/aggregator/aggregator_test.go @@ -27,8 +27,6 @@ import ( "testing" "time" - "go.uber.org/zap" - "github.com/m3db/m3/src/aggregator/aggregator/handler" "github.com/m3db/m3/src/aggregator/aggregator/handler/writer" "github.com/m3db/m3/src/aggregator/client" @@ -56,6 +54,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/uber-go/tally" + "go.uber.org/zap" ) const ( diff --git a/src/aggregator/aggregator/elem_base.go b/src/aggregator/aggregator/elem_base.go index 0a1f1b5750..bdb767fd86 100644 --- a/src/aggregator/aggregator/elem_base.go +++ b/src/aggregator/aggregator/elem_base.go @@ -27,10 +27,6 @@ import ( "sync" "time" - "github.com/uber-go/tally" - "github.com/willf/bitset" - "go.uber.org/zap" - raggregation "github.com/m3db/m3/src/aggregator/aggregation" maggregation "github.com/m3db/m3/src/metrics/aggregation" "github.com/m3db/m3/src/metrics/metadata" @@ -44,6 +40,10 @@ import ( "github.com/m3db/m3/src/metrics/transformation" "github.com/m3db/m3/src/x/pool" xtime "github.com/m3db/m3/src/x/time" + + "github.com/uber-go/tally" + "github.com/willf/bitset" + "go.uber.org/zap" ) const ( diff --git a/src/aggregator/aggregator/elem_test.go b/src/aggregator/aggregator/elem_test.go index b200fd2411..44b6b9a26a 100644 --- a/src/aggregator/aggregator/elem_test.go +++ b/src/aggregator/aggregator/elem_test.go @@ -26,10 +26,6 @@ import ( "testing" "time" - "github.com/uber-go/tally" - "github.com/willf/bitset" - "go.uber.org/atomic" - raggregation "github.com/m3db/m3/src/aggregator/aggregation" "github.com/m3db/m3/src/aggregator/aggregation/quantile/cm" maggregation "github.com/m3db/m3/src/metrics/aggregation" @@ -47,6 +43,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/uber-go/tally" + "github.com/willf/bitset" + "go.uber.org/atomic" ) var ( diff --git a/src/aggregator/aggregator/entry_test.go b/src/aggregator/aggregator/entry_test.go index f7a9bfa2fd..f8b0f4f2ad 100644 --- a/src/aggregator/aggregator/entry_test.go +++ b/src/aggregator/aggregator/entry_test.go @@ -28,8 +28,6 @@ import ( "testing" "time" - "github.com/uber-go/tally" - "github.com/m3db/m3/src/aggregator/runtime" "github.com/m3db/m3/src/metrics/aggregation" "github.com/m3db/m3/src/metrics/metadata" @@ -47,6 +45,7 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" + "github.com/uber-go/tally" ) var ( diff --git a/src/aggregator/aggregator/generic_elem.go b/src/aggregator/aggregator/generic_elem.go index 4d14eee0f8..42c4cf4ae5 100644 --- a/src/aggregator/aggregator/generic_elem.go +++ b/src/aggregator/aggregator/generic_elem.go @@ -26,10 +26,6 @@ import ( "sync" "time" - "github.com/mauricelam/genny/generic" - "github.com/willf/bitset" - "go.uber.org/zap" - raggregation "github.com/m3db/m3/src/aggregator/aggregation" maggregation "github.com/m3db/m3/src/metrics/aggregation" "github.com/m3db/m3/src/metrics/metadata" @@ -39,6 +35,10 @@ import ( "github.com/m3db/m3/src/metrics/transformation" "github.com/m3db/m3/src/x/instrument" xtime "github.com/m3db/m3/src/x/time" + + "github.com/mauricelam/genny/generic" + "github.com/willf/bitset" + "go.uber.org/zap" ) type typeSpecificAggregation interface { diff --git a/src/aggregator/aggregator/list.go b/src/aggregator/aggregator/list.go index 43520d5cce..b2e50cab6b 100644 --- a/src/aggregator/aggregator/list.go +++ b/src/aggregator/aggregator/list.go @@ -28,9 +28,6 @@ import ( "sync/atomic" "time" - "github.com/uber-go/tally" - "go.uber.org/zap" - "github.com/m3db/m3/src/aggregator/aggregator/handler" "github.com/m3db/m3/src/aggregator/aggregator/handler/writer" "github.com/m3db/m3/src/metrics/metric/aggregated" @@ -38,6 +35,9 @@ import ( "github.com/m3db/m3/src/metrics/policy" "github.com/m3db/m3/src/x/clock" xtime "github.com/m3db/m3/src/x/time" + + "github.com/uber-go/tally" + "go.uber.org/zap" ) var ( diff --git a/src/aggregator/client/writer_mgr.go b/src/aggregator/client/writer_mgr.go index aea69d4370..49710201e0 100644 --- a/src/aggregator/client/writer_mgr.go +++ b/src/aggregator/client/writer_mgr.go @@ -26,12 +26,12 @@ import ( "sync" "time" - "github.com/uber-go/tally" - "golang.org/x/sys/cpu" - "github.com/m3db/m3/src/cluster/placement" xerrors "github.com/m3db/m3/src/x/errors" xsync "github.com/m3db/m3/src/x/sync" + + "github.com/uber-go/tally" + "golang.org/x/sys/cpu" ) var ( diff --git a/src/aggregator/integration/clock.go b/src/aggregator/integration/clock.go index b97e1aa02e..bb6a201608 100644 --- a/src/aggregator/integration/clock.go +++ b/src/aggregator/integration/clock.go @@ -1,3 +1,4 @@ +//go:build integration // +build integration // Copyright (c) 2021 Uber Technologies, Inc. diff --git a/src/aggregator/integration/custom_aggregations_test.go b/src/aggregator/integration/custom_aggregations_test.go index 0a44a06ee9..d9c58cbe41 100644 --- a/src/aggregator/integration/custom_aggregations_test.go +++ b/src/aggregator/integration/custom_aggregations_test.go @@ -27,11 +27,11 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/cluster/placement" "github.com/m3db/m3/src/metrics/aggregation" "github.com/m3db/m3/src/metrics/metric/aggregated" + + "github.com/stretchr/testify/require" ) func TestCustomAggregationWithStagedMetadatas(t *testing.T) { diff --git a/src/aggregator/integration/election.go b/src/aggregator/integration/election.go index 9a42d2fa12..1f24e02263 100644 --- a/src/aggregator/integration/election.go +++ b/src/aggregator/integration/election.go @@ -23,12 +23,12 @@ package integration import ( "testing" + "github.com/m3db/m3/src/cluster/services" + "github.com/m3db/m3/src/cluster/services/leader" + "github.com/stretchr/testify/require" clientv3 "go.etcd.io/etcd/client/v3" "go.etcd.io/etcd/tests/v3/framework/integration" - - "github.com/m3db/m3/src/cluster/services" - "github.com/m3db/m3/src/cluster/services/leader" ) var ( diff --git a/src/aggregator/integration/metadata_change_test.go b/src/aggregator/integration/metadata_change_test.go index f55ae4987e..fa93ce7baf 100644 --- a/src/aggregator/integration/metadata_change_test.go +++ b/src/aggregator/integration/metadata_change_test.go @@ -27,10 +27,10 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/cluster/placement" "github.com/m3db/m3/src/metrics/metric/aggregated" + + "github.com/stretchr/testify/require" ) func TestMetadataChangeWithStagedMetadatas(t *testing.T) { diff --git a/src/aggregator/integration/multi_client_one_type_test.go b/src/aggregator/integration/multi_client_one_type_test.go index b6516f9b12..d05185a9ab 100644 --- a/src/aggregator/integration/multi_client_one_type_test.go +++ b/src/aggregator/integration/multi_client_one_type_test.go @@ -27,10 +27,10 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/cluster/placement" "github.com/m3db/m3/src/metrics/metric" + + "github.com/stretchr/testify/require" ) func TestMultiClientOneTypeWithStagedMetadatas(t *testing.T) { diff --git a/src/aggregator/integration/multi_server_resend_test.go b/src/aggregator/integration/multi_server_resend_test.go index 5800f969fb..6b7c2fb71e 100644 --- a/src/aggregator/integration/multi_server_resend_test.go +++ b/src/aggregator/integration/multi_server_resend_test.go @@ -1,3 +1,4 @@ +//go:build integration // +build integration // Copyright (c) 2018 Uber Technologies, Inc. @@ -30,10 +31,6 @@ import ( "testing" "time" - "github.com/google/go-cmp/cmp" - "github.com/stretchr/testify/require" - "go.uber.org/zap" - "github.com/m3db/m3/src/aggregator/aggregation" aggclient "github.com/m3db/m3/src/aggregator/client" "github.com/m3db/m3/src/cluster/kv" @@ -50,6 +47,10 @@ import ( "github.com/m3db/m3/src/x/instrument" xtest "github.com/m3db/m3/src/x/test" xtime "github.com/m3db/m3/src/x/time" + + "github.com/google/go-cmp/cmp" + "github.com/stretchr/testify/require" + "go.uber.org/zap" ) //nolint:dupl diff --git a/src/aggregator/integration/options.go b/src/aggregator/integration/options.go index dd8417a327..9b26147e08 100644 --- a/src/aggregator/integration/options.go +++ b/src/aggregator/integration/options.go @@ -24,8 +24,6 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/aggregator/aggregator" aggclient "github.com/m3db/m3/src/aggregator/client" "github.com/m3db/m3/src/aggregator/sharding" @@ -36,6 +34,8 @@ import ( "github.com/m3db/m3/src/msg/topic" "github.com/m3db/m3/src/x/clock" "github.com/m3db/m3/src/x/instrument" + + "github.com/stretchr/testify/require" ) const ( diff --git a/src/aggregator/integration/placement.go b/src/aggregator/integration/placement.go index 91c5733f1f..919ad81f06 100644 --- a/src/aggregator/integration/placement.go +++ b/src/aggregator/integration/placement.go @@ -24,12 +24,12 @@ import ( "math" "testing" - "github.com/stretchr/testify/require" - clusterclient "github.com/m3db/m3/src/cluster/client" "github.com/m3db/m3/src/cluster/placement" "github.com/m3db/m3/src/cluster/services" "github.com/m3db/m3/src/cluster/shard" + + "github.com/stretchr/testify/require" ) type placementInstanceConfig struct { diff --git a/src/aggregator/integration/placement_change_test.go b/src/aggregator/integration/placement_change_test.go index 6edb3ac468..99683d7f3d 100644 --- a/src/aggregator/integration/placement_change_test.go +++ b/src/aggregator/integration/placement_change_test.go @@ -1,3 +1,4 @@ +//go:build integration // +build integration // Copyright (c) 2018 Uber Technologies, Inc. @@ -27,10 +28,6 @@ import ( "testing" "time" - "github.com/google/go-cmp/cmp" - "github.com/stretchr/testify/require" - "go.uber.org/zap" - aggclient "github.com/m3db/m3/src/aggregator/client" "github.com/m3db/m3/src/cluster/kv" memcluster "github.com/m3db/m3/src/cluster/mem" @@ -42,6 +39,10 @@ import ( "github.com/m3db/m3/src/x/instrument" xtest "github.com/m3db/m3/src/x/test" xtime "github.com/m3db/m3/src/x/time" + + "github.com/google/go-cmp/cmp" + "github.com/stretchr/testify/require" + "go.uber.org/zap" ) func TestPlacementChange(t *testing.T) { diff --git a/src/aggregator/integration/resend_stress_test.go b/src/aggregator/integration/resend_stress_test.go index 5a6e2e4f43..c1510ac7ee 100644 --- a/src/aggregator/integration/resend_stress_test.go +++ b/src/aggregator/integration/resend_stress_test.go @@ -1,3 +1,4 @@ +//go:build integration // +build integration // Copyright (c) 2018 Uber Technologies, Inc. @@ -28,8 +29,6 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/aggregator/aggregator" aggclient "github.com/m3db/m3/src/aggregator/client" "github.com/m3db/m3/src/cluster/placement" @@ -46,6 +45,8 @@ import ( "github.com/m3db/m3/src/x/instrument" xtest "github.com/m3db/m3/src/x/test" xtime "github.com/m3db/m3/src/x/time" + + "github.com/stretchr/testify/require" ) //nolint diff --git a/src/aggregator/integration/same_id_multi_type_test.go b/src/aggregator/integration/same_id_multi_type_test.go index 7d4ba3bc1a..09974adb2d 100644 --- a/src/aggregator/integration/same_id_multi_type_test.go +++ b/src/aggregator/integration/same_id_multi_type_test.go @@ -26,10 +26,10 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/cluster/placement" "github.com/m3db/m3/src/metrics/metric" + + "github.com/stretchr/testify/require" ) func TestSameIDMultiTypeWithStagedMetadatas(t *testing.T) { diff --git a/src/aggregator/integration/setup.go b/src/aggregator/integration/setup.go index 7af7d093eb..b0723392dc 100644 --- a/src/aggregator/integration/setup.go +++ b/src/aggregator/integration/setup.go @@ -31,9 +31,6 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "github.com/uber-go/tally" - "github.com/m3db/m3/src/aggregator/aggregator" "github.com/m3db/m3/src/aggregator/aggregator/handler" "github.com/m3db/m3/src/aggregator/aggregator/handler/writer" @@ -56,6 +53,9 @@ import ( "github.com/m3db/m3/src/x/retry" xserver "github.com/m3db/m3/src/x/server" xsync "github.com/m3db/m3/src/x/sync" + + "github.com/stretchr/testify/require" + "github.com/uber-go/tally" ) var ( diff --git a/src/aggregator/integration/topic.go b/src/aggregator/integration/topic.go index a83ae7b82e..3a6d82b5e5 100644 --- a/src/aggregator/integration/topic.go +++ b/src/aggregator/integration/topic.go @@ -24,12 +24,12 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - clusterclient "github.com/m3db/m3/src/cluster/client" "github.com/m3db/m3/src/cluster/placement" "github.com/m3db/m3/src/cluster/services" "github.com/m3db/m3/src/msg/topic" + + "github.com/stretchr/testify/require" ) func initializeTopic( diff --git a/src/aggregator/server/rawtcp/server_test.go b/src/aggregator/server/rawtcp/server_test.go index d2d61c81e4..9be15c2145 100644 --- a/src/aggregator/server/rawtcp/server_test.go +++ b/src/aggregator/server/rawtcp/server_test.go @@ -27,14 +27,6 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" - "github.com/google/go-cmp/cmp" - "github.com/google/go-cmp/cmp/cmpopts" - "github.com/stretchr/testify/require" - "go.uber.org/zap" - "go.uber.org/zap/zapcore" - "go.uber.org/zap/zaptest/observer" - "github.com/m3db/m3/src/aggregator/aggregator" "github.com/m3db/m3/src/aggregator/aggregator/capture" "github.com/m3db/m3/src/metrics/aggregation" @@ -53,6 +45,14 @@ import ( xserver "github.com/m3db/m3/src/x/server" xtest "github.com/m3db/m3/src/x/test" xtime "github.com/m3db/m3/src/x/time" + + "github.com/golang/mock/gomock" + "github.com/google/go-cmp/cmp" + "github.com/google/go-cmp/cmp/cmpopts" + "github.com/stretchr/testify/require" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" + "go.uber.org/zap/zaptest/observer" ) const ( diff --git a/src/cluster/client/etcd/options.go b/src/cluster/client/etcd/options.go index 018387be4a..6dc98848ed 100644 --- a/src/cluster/client/etcd/options.go +++ b/src/cluster/client/etcd/options.go @@ -30,11 +30,11 @@ import ( "os" "time" - "google.golang.org/grpc" - "github.com/m3db/m3/src/cluster/services" "github.com/m3db/m3/src/x/instrument" "github.com/m3db/m3/src/x/retry" + + "google.golang.org/grpc" ) const ( diff --git a/src/cluster/client/etcd/types.go b/src/cluster/client/etcd/types.go index 8745cf20ae..9caf012e70 100644 --- a/src/cluster/client/etcd/types.go +++ b/src/cluster/client/etcd/types.go @@ -25,12 +25,12 @@ import ( "os" "time" - "google.golang.org/grpc" - "github.com/m3db/m3/src/cluster/client" "github.com/m3db/m3/src/cluster/services" "github.com/m3db/m3/src/x/instrument" "github.com/m3db/m3/src/x/retry" + + "google.golang.org/grpc" ) // Options is the Options to create a config service client. diff --git a/src/cluster/placement/algo/sharded_prop_test.go b/src/cluster/placement/algo/sharded_prop_test.go index ded632b79a..b6eafac390 100644 --- a/src/cluster/placement/algo/sharded_prop_test.go +++ b/src/cluster/placement/algo/sharded_prop_test.go @@ -27,11 +27,11 @@ import ( "testing" "time" + "github.com/m3db/m3/src/cluster/placement" + "github.com/leanovate/gopter" "github.com/leanovate/gopter/gen" "github.com/leanovate/gopter/prop" - - "github.com/m3db/m3/src/cluster/placement" ) const minSuccessfulTests = 100 diff --git a/src/cluster/placement/compress.go b/src/cluster/placement/compress.go index 2ac2ce8f14..77d4805e88 100644 --- a/src/cluster/placement/compress.go +++ b/src/cluster/placement/compress.go @@ -21,10 +21,10 @@ package placement import ( + "github.com/m3db/m3/src/cluster/generated/proto/placementpb" + "github.com/gogo/protobuf/proto" "github.com/klauspost/compress/zstd" - - "github.com/m3db/m3/src/cluster/generated/proto/placementpb" ) const _decoderInitialBufferSize = 131072 diff --git a/src/cluster/placement/compress_test.go b/src/cluster/placement/compress_test.go index 96a146a74a..662026c454 100644 --- a/src/cluster/placement/compress_test.go +++ b/src/cluster/placement/compress_test.go @@ -26,12 +26,12 @@ import ( "sync" "testing" + "github.com/m3db/m3/src/cluster/generated/proto/placementpb" + "github.com/m3db/m3/src/cluster/shard" + "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/require" "go.uber.org/goleak" - - "github.com/m3db/m3/src/cluster/generated/proto/placementpb" - "github.com/m3db/m3/src/cluster/shard" ) func TestMarshalAndUnmarshalPlacementProto(t *testing.T) { diff --git a/src/cluster/placement/config.go b/src/cluster/placement/config.go index 2988cbbb88..8c7bbf5f15 100644 --- a/src/cluster/placement/config.go +++ b/src/cluster/placement/config.go @@ -23,11 +23,11 @@ package placement import ( "time" - "gopkg.in/yaml.v2" - "github.com/m3db/m3/src/cluster/generated/proto/placementpb" "github.com/m3db/m3/src/cluster/kv" "github.com/m3db/m3/src/x/instrument" + + "gopkg.in/yaml.v2" ) // Configuration is configuration for placement options. diff --git a/src/cluster/placement/placements_test.go b/src/cluster/placement/placements_test.go index a3500821a8..d4fe9a0253 100644 --- a/src/cluster/placement/placements_test.go +++ b/src/cluster/placement/placements_test.go @@ -23,9 +23,9 @@ package placement import ( "testing" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/cluster/generated/proto/placementpb" + + "github.com/stretchr/testify/require" ) var ( diff --git a/src/cluster/placement/placements_watcher.go b/src/cluster/placement/placements_watcher.go index 3a42d8da45..19db59050d 100644 --- a/src/cluster/placement/placements_watcher.go +++ b/src/cluster/placement/placements_watcher.go @@ -24,11 +24,11 @@ import ( "errors" "sync" - "go.uber.org/atomic" - "github.com/m3db/m3/src/cluster/generated/proto/placementpb" "github.com/m3db/m3/src/cluster/kv" "github.com/m3db/m3/src/cluster/kv/util/runtime" + + "go.uber.org/atomic" ) var ( diff --git a/src/cluster/placement/placements_watcher_test.go b/src/cluster/placement/placements_watcher_test.go index 2983b2c469..32a353d7ad 100644 --- a/src/cluster/placement/placements_watcher_test.go +++ b/src/cluster/placement/placements_watcher_test.go @@ -24,11 +24,11 @@ import ( "testing" "time" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/cluster/kv" "github.com/m3db/m3/src/cluster/kv/mem" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) const ( diff --git a/src/cluster/placementhandler/add.go b/src/cluster/placementhandler/add.go index 9b5e4e69fd..c77ff1ce87 100644 --- a/src/cluster/placementhandler/add.go +++ b/src/cluster/placementhandler/add.go @@ -25,9 +25,6 @@ import ( "path" "time" - "github.com/gogo/protobuf/jsonpb" - "go.uber.org/zap" - "github.com/m3db/m3/src/cluster/placement" "github.com/m3db/m3/src/cluster/placementhandler/handleroptions" "github.com/m3db/m3/src/query/api/v1/route" @@ -35,6 +32,9 @@ import ( "github.com/m3db/m3/src/query/util/logging" xerrors "github.com/m3db/m3/src/x/errors" xhttp "github.com/m3db/m3/src/x/net/http" + + "github.com/gogo/protobuf/jsonpb" + "go.uber.org/zap" ) const ( diff --git a/src/cluster/placementhandler/common_test.go b/src/cluster/placementhandler/common_test.go index bceea16835..a82ce5ec4a 100644 --- a/src/cluster/placementhandler/common_test.go +++ b/src/cluster/placementhandler/common_test.go @@ -25,16 +25,16 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/cluster/client" "github.com/m3db/m3/src/cluster/generated/proto/placementpb" "github.com/m3db/m3/src/cluster/placement" "github.com/m3db/m3/src/cluster/placementhandler/handleroptions" "github.com/m3db/m3/src/cluster/services" "github.com/m3db/m3/src/cluster/shard" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestPlacementService(t *testing.T) { diff --git a/src/cluster/placementhandler/remove.go b/src/cluster/placementhandler/remove.go index e56e24c258..3567e52961 100644 --- a/src/cluster/placementhandler/remove.go +++ b/src/cluster/placementhandler/remove.go @@ -25,9 +25,6 @@ import ( "path" "time" - "github.com/gogo/protobuf/jsonpb" - "go.uber.org/zap" - "github.com/m3db/m3/src/cluster/placement" "github.com/m3db/m3/src/cluster/placementhandler/handleroptions" "github.com/m3db/m3/src/query/api/v1/route" @@ -35,6 +32,9 @@ import ( "github.com/m3db/m3/src/query/util/logging" xerrors "github.com/m3db/m3/src/x/errors" xhttp "github.com/m3db/m3/src/x/net/http" + + "github.com/gogo/protobuf/jsonpb" + "go.uber.org/zap" ) const ( diff --git a/src/cluster/placementhandler/remove_test.go b/src/cluster/placementhandler/remove_test.go index a8342fb06a..65bd59f662 100644 --- a/src/cluster/placementhandler/remove_test.go +++ b/src/cluster/placementhandler/remove_test.go @@ -29,13 +29,13 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/cluster/placement" "github.com/m3db/m3/src/cluster/placementhandler/handleroptions" "github.com/m3db/m3/src/x/instrument" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestPlacementRemoveHandler_Force(t *testing.T) { diff --git a/src/cluster/placementhandler/replace.go b/src/cluster/placementhandler/replace.go index 1709fc1ab0..c488facdad 100644 --- a/src/cluster/placementhandler/replace.go +++ b/src/cluster/placementhandler/replace.go @@ -25,9 +25,6 @@ import ( "path" "time" - "github.com/gogo/protobuf/jsonpb" - "go.uber.org/zap" - "github.com/m3db/m3/src/cluster/placement" "github.com/m3db/m3/src/cluster/placementhandler/handleroptions" "github.com/m3db/m3/src/query/api/v1/route" @@ -35,6 +32,9 @@ import ( "github.com/m3db/m3/src/query/util/logging" xerrors "github.com/m3db/m3/src/x/errors" xhttp "github.com/m3db/m3/src/x/net/http" + + "github.com/gogo/protobuf/jsonpb" + "go.uber.org/zap" ) const ( diff --git a/src/cluster/shard/shard.go b/src/cluster/shard/shard.go index f200a71b32..aa65ed335e 100644 --- a/src/cluster/shard/shard.go +++ b/src/cluster/shard/shard.go @@ -27,9 +27,9 @@ import ( "strconv" "strings" - "github.com/gogo/protobuf/types" - "github.com/m3db/m3/src/cluster/generated/proto/placementpb" + + "github.com/gogo/protobuf/types" ) var ( diff --git a/src/cluster/shard/shard_test.go b/src/cluster/shard/shard_test.go index 15769903f5..8b47270666 100644 --- a/src/cluster/shard/shard_test.go +++ b/src/cluster/shard/shard_test.go @@ -47,7 +47,7 @@ func TestShard(t *testing.T) { func TestShardEquals(t *testing.T) { s := NewShard(1).SetState(Initializing).SetSourceID("id").SetCutoffNanos(1000).SetCutoverNanos(100) - assert.True(t, s.Equals(s)) + assert.True(t, s.Equals(s)) //nolint assert.False(t, s.Equals(NewShard(1).SetState(Initializing).SetSourceID("id").SetCutoffNanos(1000))) assert.False(t, s.Equals(NewShard(1).SetState(Initializing).SetSourceID("id").SetCutoverNanos(100))) assert.False(t, s.Equals(NewShard(1).SetState(Initializing).SetCutoffNanos(1000).SetCutoverNanos(100))) @@ -58,7 +58,7 @@ func TestShardEquals(t *testing.T) { func TestShardEqualsWithRedirectShardID(t *testing.T) { s := NewShard(1).SetRedirectToShardID(uint32Ptr(1)) - assert.True(t, s.Equals(s)) + assert.True(t, s.Equals(s)) //nolint assert.False(t, s.Equals(NewShard(1).SetRedirectToShardID(nil))) assert.False(t, NewShard(1).SetRedirectToShardID(nil).Equals(s)) assert.False(t, s.Equals(NewShard(1).SetRedirectToShardID(uint32Ptr(0)))) diff --git a/src/cmd/services/m3aggregator/config/config.go b/src/cmd/services/m3aggregator/config/config.go index 97d1ea12d8..f4c797ec2f 100644 --- a/src/cmd/services/m3aggregator/config/config.go +++ b/src/cmd/services/m3aggregator/config/config.go @@ -21,11 +21,11 @@ package config import ( - "gopkg.in/yaml.v2" - "github.com/m3db/m3/src/x/debug/config" "github.com/m3db/m3/src/x/instrument" "github.com/m3db/m3/src/x/log" + + "gopkg.in/yaml.v2" ) // Configuration contains top-level configuration. diff --git a/src/cmd/services/m3coordinator/downsample/id_pool_types_test.go b/src/cmd/services/m3coordinator/downsample/id_pool_types_test.go index 384f467e85..5ee586be9e 100644 --- a/src/cmd/services/m3coordinator/downsample/id_pool_types_test.go +++ b/src/cmd/services/m3coordinator/downsample/id_pool_types_test.go @@ -23,11 +23,11 @@ package downsample import ( "testing" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/metrics/metric/id" "github.com/m3db/m3/src/x/ident" "github.com/m3db/m3/src/x/serialize" + + "github.com/stretchr/testify/require" ) //nolint: dupl diff --git a/src/cmd/services/m3coordinator/downsample/options.go b/src/cmd/services/m3coordinator/downsample/options.go index 7b1a1b354c..2bf8dcdcf3 100644 --- a/src/cmd/services/m3coordinator/downsample/options.go +++ b/src/cmd/services/m3coordinator/downsample/options.go @@ -27,8 +27,6 @@ import ( "runtime" "time" - "github.com/prometheus/common/model" - "github.com/m3db/m3/src/aggregator/aggregator" "github.com/m3db/m3/src/aggregator/aggregator/handler" "github.com/m3db/m3/src/aggregator/client" @@ -73,6 +71,7 @@ import ( xtime "github.com/m3db/m3/src/x/time" "github.com/pborman/uuid" + "github.com/prometheus/common/model" ) const ( diff --git a/src/cmd/services/m3coordinator/downsample/samples_appender.go b/src/cmd/services/m3coordinator/downsample/samples_appender.go index 6827d85bc1..5d52dd9c4b 100644 --- a/src/cmd/services/m3coordinator/downsample/samples_appender.go +++ b/src/cmd/services/m3coordinator/downsample/samples_appender.go @@ -21,8 +21,6 @@ package downsample import ( - "github.com/uber-go/tally" - "github.com/m3db/m3/src/aggregator/aggregator" "github.com/m3db/m3/src/aggregator/client" "github.com/m3db/m3/src/metrics/metadata" @@ -31,6 +29,8 @@ import ( "github.com/m3db/m3/src/metrics/metric/unaggregated" xerrors "github.com/m3db/m3/src/x/errors" xtime "github.com/m3db/m3/src/x/time" + + "github.com/uber-go/tally" ) // samplesAppender must have one of agg or client set diff --git a/src/cmd/services/m3dbnode/config/config.go b/src/cmd/services/m3dbnode/config/config.go index 1c13488844..6825fd22ce 100644 --- a/src/cmd/services/m3dbnode/config/config.go +++ b/src/cmd/services/m3dbnode/config/config.go @@ -29,12 +29,6 @@ import ( "strings" "time" - "github.com/m3dbx/vellum/regexp" - "go.etcd.io/etcd/client/pkg/v3/transport" - "go.etcd.io/etcd/client/pkg/v3/types" - "go.etcd.io/etcd/server/v3/embed" - "gopkg.in/yaml.v2" - coordinatorcfg "github.com/m3db/m3/src/cmd/services/m3query/config" "github.com/m3db/m3/src/dbnode/client" "github.com/m3db/m3/src/dbnode/discovery" @@ -46,6 +40,12 @@ import ( "github.com/m3db/m3/src/x/instrument" xlog "github.com/m3db/m3/src/x/log" "github.com/m3db/m3/src/x/opentracing" + + "github.com/m3dbx/vellum/regexp" + "go.etcd.io/etcd/client/pkg/v3/transport" + "go.etcd.io/etcd/client/pkg/v3/types" + "go.etcd.io/etcd/server/v3/embed" + "gopkg.in/yaml.v2" ) const ( diff --git a/src/cmd/services/m3dbnode/config/config_test.go b/src/cmd/services/m3dbnode/config/config_test.go index 2573e01621..4992769697 100644 --- a/src/cmd/services/m3dbnode/config/config_test.go +++ b/src/cmd/services/m3dbnode/config/config_test.go @@ -1105,7 +1105,7 @@ db: {} assert.NoError(t, os.Remove(fd.Name())) }() - _, err = fd.Write([]byte(tt.conf)) + _, err = fd.WriteString(tt.conf) require.NoError(t, err) var cfg Configuration diff --git a/src/cmd/tools/annotation_checker/main/main.go b/src/cmd/tools/annotation_checker/main/main.go index d8311666b7..b7aa2aa5c2 100644 --- a/src/cmd/tools/annotation_checker/main/main.go +++ b/src/cmd/tools/annotation_checker/main/main.go @@ -30,9 +30,6 @@ import ( "sort" "strconv" - "github.com/pborman/getopt" - "go.uber.org/zap" - "github.com/m3db/m3/src/dbnode/encoding" "github.com/m3db/m3/src/dbnode/encoding/m3tsz" "github.com/m3db/m3/src/dbnode/persist" @@ -42,6 +39,9 @@ import ( "github.com/m3db/m3/src/x/ident" "github.com/m3db/m3/src/x/pool" xtime "github.com/m3db/m3/src/x/time" + + "github.com/pborman/getopt" + "go.uber.org/zap" ) const ( diff --git a/src/cmd/tools/m3ctl/topics/delete.go b/src/cmd/tools/m3ctl/topics/delete.go index b08b9b7222..7ff9be9ac8 100644 --- a/src/cmd/tools/m3ctl/topics/delete.go +++ b/src/cmd/tools/m3ctl/topics/delete.go @@ -24,9 +24,9 @@ package topics import ( "fmt" - "go.uber.org/zap" - "github.com/m3db/m3/src/cmd/tools/m3ctl/client" + + "go.uber.org/zap" ) // DoDelete does the delete api calls for topics diff --git a/src/cmd/tools/m3ctl/topics/get.go b/src/cmd/tools/m3ctl/topics/get.go index 403698720e..f42e8d1744 100644 --- a/src/cmd/tools/m3ctl/topics/get.go +++ b/src/cmd/tools/m3ctl/topics/get.go @@ -24,9 +24,9 @@ package topics import ( "fmt" - "go.uber.org/zap" - "github.com/m3db/m3/src/cmd/tools/m3ctl/client" + + "go.uber.org/zap" ) // DoGet calls the backend api for get topics diff --git a/src/cmd/tools/read_commitlog/main/main.go b/src/cmd/tools/read_commitlog/main/main.go index 3a0ec59355..7f85cc9ae6 100644 --- a/src/cmd/tools/read_commitlog/main/main.go +++ b/src/cmd/tools/read_commitlog/main/main.go @@ -28,11 +28,11 @@ import ( "sort" "time" - "github.com/pborman/getopt" - "go.uber.org/zap" - "github.com/m3db/m3/src/x/ident" xtime "github.com/m3db/m3/src/x/time" + + "github.com/pborman/getopt" + "go.uber.org/zap" ) func main() { diff --git a/src/cmd/tools/split_index_shards/main/main.go b/src/cmd/tools/split_index_shards/main/main.go index 42865ca68e..07bcbda783 100644 --- a/src/cmd/tools/split_index_shards/main/main.go +++ b/src/cmd/tools/split_index_shards/main/main.go @@ -32,9 +32,6 @@ import ( "strings" "time" - "github.com/pborman/getopt" - "go.uber.org/zap" - "github.com/m3db/m3/src/dbnode/digest" "github.com/m3db/m3/src/dbnode/generated/proto/index" "github.com/m3db/m3/src/dbnode/persist/fs" @@ -42,6 +39,9 @@ import ( "github.com/m3db/m3/src/x/ident" xos "github.com/m3db/m3/src/x/os" xtime "github.com/m3db/m3/src/x/time" + + "github.com/pborman/getopt" + "go.uber.org/zap" ) var ( diff --git a/src/cmd/tools/split_shards/main/main.go b/src/cmd/tools/split_shards/main/main.go index c97f249aab..083247981a 100644 --- a/src/cmd/tools/split_shards/main/main.go +++ b/src/cmd/tools/split_shards/main/main.go @@ -34,15 +34,15 @@ import ( "strings" "time" - "github.com/pborman/getopt" - "go.uber.org/zap" - "github.com/m3db/m3/src/dbnode/persist" "github.com/m3db/m3/src/dbnode/persist/fs" "github.com/m3db/m3/src/dbnode/sharding" xerrors "github.com/m3db/m3/src/x/errors" "github.com/m3db/m3/src/x/ident" xtime "github.com/m3db/m3/src/x/time" + + "github.com/pborman/getopt" + "go.uber.org/zap" ) var checkpointPattern = regexp.MustCompile(`/data/(\w+)/([0-9]+)/fileset-([0-9]+)-([0-9]+)-checkpoint.db$`) diff --git a/src/dbnode/client/errors.go b/src/dbnode/client/errors.go index 25199999a5..fe0a4e5138 100644 --- a/src/dbnode/client/errors.go +++ b/src/dbnode/client/errors.go @@ -24,11 +24,11 @@ import ( "fmt" "sync" - "github.com/uber/tchannel-go" - "github.com/m3db/m3/src/dbnode/generated/thrift/rpc" tterrors "github.com/m3db/m3/src/dbnode/network/server/tchannelthrift/errors" xerrors "github.com/m3db/m3/src/x/errors" + + "github.com/uber/tchannel-go" ) // IsInternalServerError determines if the error is an internal server error. diff --git a/src/dbnode/client/errors_test.go b/src/dbnode/client/errors_test.go index 05af4a8c06..a411a03cab 100644 --- a/src/dbnode/client/errors_test.go +++ b/src/dbnode/client/errors_test.go @@ -25,13 +25,13 @@ import ( "strings" "testing" - "github.com/stretchr/testify/assert" - "github.com/uber/tchannel-go" - "github.com/m3db/m3/src/dbnode/generated/thrift/rpc" "github.com/m3db/m3/src/dbnode/network/server/tchannelthrift/errors" "github.com/m3db/m3/src/dbnode/topology" xerrors "github.com/m3db/m3/src/x/errors" + + "github.com/stretchr/testify/assert" + "github.com/uber/tchannel-go" ) func TestConsistencyResultError(t *testing.T) { diff --git a/src/dbnode/client/options.go b/src/dbnode/client/options.go index ca6e44e9f5..c3fd5970f5 100644 --- a/src/dbnode/client/options.go +++ b/src/dbnode/client/options.go @@ -26,9 +26,6 @@ import ( "runtime" "time" - "github.com/uber/tchannel-go" - "github.com/uber/tchannel-go/thrift" - "github.com/m3db/m3/src/dbnode/encoding" "github.com/m3db/m3/src/dbnode/encoding/m3tsz" "github.com/m3db/m3/src/dbnode/encoding/proto" @@ -49,6 +46,9 @@ import ( "github.com/m3db/m3/src/x/sampler" "github.com/m3db/m3/src/x/serialize" xsync "github.com/m3db/m3/src/x/sync" + + "github.com/uber/tchannel-go" + "github.com/uber/tchannel-go/thrift" ) const ( diff --git a/src/dbnode/client/types.go b/src/dbnode/client/types.go index ae0f64ad72..fd8fe900cc 100644 --- a/src/dbnode/client/types.go +++ b/src/dbnode/client/types.go @@ -24,9 +24,6 @@ import ( gocontext "context" "time" - "github.com/uber/tchannel-go" - "github.com/uber/tchannel-go/thrift" - "github.com/m3db/m3/src/cluster/shard" "github.com/m3db/m3/src/dbnode/encoding" "github.com/m3db/m3/src/dbnode/generated/thrift/rpc" @@ -46,6 +43,9 @@ import ( "github.com/m3db/m3/src/x/serialize" xsync "github.com/m3db/m3/src/x/sync" xtime "github.com/m3db/m3/src/x/time" + + "github.com/uber/tchannel-go" + "github.com/uber/tchannel-go/thrift" ) // Client can create sessions to write and read to a cluster. diff --git a/src/dbnode/encoding/annotation_holder_test.go b/src/dbnode/encoding/annotation_holder_test.go index b433fe3167..735358603a 100644 --- a/src/dbnode/encoding/annotation_holder_test.go +++ b/src/dbnode/encoding/annotation_holder_test.go @@ -24,9 +24,9 @@ import ( "bytes" "testing" - "github.com/stretchr/testify/assert" - "github.com/m3db/m3/src/dbnode/ts" + + "github.com/stretchr/testify/assert" ) var annotationHolderTests = []struct { diff --git a/src/dbnode/encoding/m3tsz/decoder_benchmark_test.go b/src/dbnode/encoding/m3tsz/decoder_benchmark_test.go index 967069d8b5..964c27b4c3 100644 --- a/src/dbnode/encoding/m3tsz/decoder_benchmark_test.go +++ b/src/dbnode/encoding/m3tsz/decoder_benchmark_test.go @@ -25,10 +25,10 @@ import ( "math/rand" "testing" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/dbnode/encoding" "github.com/m3db/m3/src/dbnode/x/xio" + + "github.com/stretchr/testify/require" ) // BenchmarkM3TSZDecode-12 16867 69272 ns/op diff --git a/src/dbnode/encoding/m3tsz/timestamp_encoder.go b/src/dbnode/encoding/m3tsz/timestamp_encoder.go index 4312c8184d..bf153fff0b 100644 --- a/src/dbnode/encoding/m3tsz/timestamp_encoder.go +++ b/src/dbnode/encoding/m3tsz/timestamp_encoder.go @@ -25,11 +25,11 @@ import ( "fmt" "time" - "github.com/cespare/xxhash/v2" - "github.com/m3db/m3/src/dbnode/encoding" "github.com/m3db/m3/src/dbnode/ts" xtime "github.com/m3db/m3/src/x/time" + + "github.com/cespare/xxhash/v2" ) // TimestampEncoder encapsulates the state required for a logical stream of diff --git a/src/dbnode/integration/bootstrap_retries_test.go b/src/dbnode/integration/bootstrap_retries_test.go index ac5f42733e..ddd6549198 100644 --- a/src/dbnode/integration/bootstrap_retries_test.go +++ b/src/dbnode/integration/bootstrap_retries_test.go @@ -1,3 +1,4 @@ +//go:build integration // +build integration // Copyright (c) 2021 Uber Technologies, Inc. @@ -28,10 +29,6 @@ import ( "testing" "time" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/uber-go/tally" - "github.com/m3db/m3/src/cluster/shard" "github.com/m3db/m3/src/dbnode/integration/generate" "github.com/m3db/m3/src/dbnode/namespace" @@ -41,6 +38,10 @@ import ( "github.com/m3db/m3/src/dbnode/storage/bootstrap/bootstrapper" "github.com/m3db/m3/src/x/context" "github.com/m3db/m3/src/x/ident" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/uber-go/tally" ) func TestBootstrapRetriesDueToError(t *testing.T) { diff --git a/src/dbnode/integration/disk_cleanup_index_corrupted_test.go b/src/dbnode/integration/disk_cleanup_index_corrupted_test.go index a044f6072e..dc465a1ada 100644 --- a/src/dbnode/integration/disk_cleanup_index_corrupted_test.go +++ b/src/dbnode/integration/disk_cleanup_index_corrupted_test.go @@ -1,3 +1,4 @@ +//go:build integration // +build integration // Copyright (c) 2021 Uber Technologies, Inc. @@ -30,14 +31,14 @@ import ( "testing" "time" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/dbnode/namespace" "github.com/m3db/m3/src/dbnode/persist/fs" "github.com/m3db/m3/src/dbnode/retention" xclock "github.com/m3db/m3/src/x/clock" xtime "github.com/m3db/m3/src/x/time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestDiskCleanupIndexCorrupted(t *testing.T) { diff --git a/src/dbnode/integration/fs_bootstrap_index_test.go b/src/dbnode/integration/fs_bootstrap_index_test.go index 7e398aef89..70e5afa7b8 100644 --- a/src/dbnode/integration/fs_bootstrap_index_test.go +++ b/src/dbnode/integration/fs_bootstrap_index_test.go @@ -26,9 +26,6 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "go.uber.org/zap" - "github.com/m3db/m3/src/dbnode/integration/generate" "github.com/m3db/m3/src/dbnode/namespace" "github.com/m3db/m3/src/dbnode/retention" @@ -39,6 +36,9 @@ import ( "github.com/m3db/m3/src/x/context" "github.com/m3db/m3/src/x/ident" xtime "github.com/m3db/m3/src/x/time" + + "github.com/stretchr/testify/require" + "go.uber.org/zap" ) func TestFilesystemBootstrapIndexWithIndexingEnabled(t *testing.T) { diff --git a/src/dbnode/integration/index_active_block_rotate_test.go b/src/dbnode/integration/index_active_block_rotate_test.go index 8436c7c6da..225261493b 100644 --- a/src/dbnode/integration/index_active_block_rotate_test.go +++ b/src/dbnode/integration/index_active_block_rotate_test.go @@ -1,4 +1,6 @@ +//go:build integration // +build integration + // // Copyright (c) 2021 Uber Technologies, Inc. // @@ -28,14 +30,6 @@ import ( "testing" "time" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/uber-go/tally" - "go.uber.org/atomic" - "go.uber.org/zap" - "go.uber.org/zap/zapcore" - "go.uber.org/zap/zaptest/observer" - "github.com/m3db/m3/src/dbnode/integration/generate" "github.com/m3db/m3/src/dbnode/namespace" "github.com/m3db/m3/src/dbnode/retention" @@ -43,6 +37,14 @@ import ( xclock "github.com/m3db/m3/src/x/clock" "github.com/m3db/m3/src/x/ident" xtime "github.com/m3db/m3/src/x/time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/uber-go/tally" + "go.uber.org/atomic" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" + "go.uber.org/zap/zaptest/observer" ) func TestIndexActiveBlockRotate(t *testing.T) { diff --git a/src/dbnode/integration/index_block_orphaned_entry_test.go b/src/dbnode/integration/index_block_orphaned_entry_test.go index c62133c3e7..bc07b576a4 100644 --- a/src/dbnode/integration/index_block_orphaned_entry_test.go +++ b/src/dbnode/integration/index_block_orphaned_entry_test.go @@ -1,4 +1,6 @@ +//go:build integration // +build integration + // // Copyright (c) 2021 Uber Technologies, Inc. // @@ -31,10 +33,6 @@ import ( "testing" "time" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.uber.org/zap" - "github.com/m3db/m3/src/dbnode/client" "github.com/m3db/m3/src/dbnode/namespace" "github.com/m3db/m3/src/dbnode/persist/fs" @@ -44,6 +42,10 @@ import ( "github.com/m3db/m3/src/x/ident" xsync "github.com/m3db/m3/src/x/sync" xtime "github.com/m3db/m3/src/x/time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.uber.org/zap" ) const ( diff --git a/src/dbnode/integration/index_helpers.go b/src/dbnode/integration/index_helpers.go index d3c8796a85..d6a3958076 100644 --- a/src/dbnode/integration/index_helpers.go +++ b/src/dbnode/integration/index_helpers.go @@ -29,9 +29,6 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "go.uber.org/zap" - "github.com/m3db/m3/src/dbnode/client" "github.com/m3db/m3/src/dbnode/encoding" "github.com/m3db/m3/src/dbnode/storage/index" @@ -39,6 +36,9 @@ import ( "github.com/m3db/m3/src/query/storage/m3/consolidators" "github.com/m3db/m3/src/x/ident" xtime "github.com/m3db/m3/src/x/time" + + "github.com/stretchr/testify/require" + "go.uber.org/zap" ) // TestIndexWrites holds index writes for testing. diff --git a/src/dbnode/integration/integration.go b/src/dbnode/integration/integration.go index 41f76ac022..4c3fdba091 100644 --- a/src/dbnode/integration/integration.go +++ b/src/dbnode/integration/integration.go @@ -26,15 +26,10 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "github.com/uber-go/tally" - "go.uber.org/zap" - "github.com/m3db/m3/src/cluster/shard" "github.com/m3db/m3/src/dbnode/client" "github.com/m3db/m3/src/dbnode/integration/generate" "github.com/m3db/m3/src/dbnode/namespace" - "github.com/m3db/m3/src/dbnode/persist/fs" persistfs "github.com/m3db/m3/src/dbnode/persist/fs" "github.com/m3db/m3/src/dbnode/runtime" "github.com/m3db/m3/src/dbnode/storage" @@ -58,6 +53,10 @@ import ( "github.com/m3db/m3/src/x/instrument" xretry "github.com/m3db/m3/src/x/retry" xtime "github.com/m3db/m3/src/x/time" + + "github.com/stretchr/testify/require" + "github.com/uber-go/tally" + "go.uber.org/zap" ) const ( @@ -518,7 +517,7 @@ func writeTestIndexDataToDisk( ) error { blockSize := md.Options().IndexOptions().BlockSize() fsOpts := storageOpts.CommitLogOptions().FilesystemOptions() - writer, err := fs.NewIndexWriter(fsOpts) + writer, err := persistfs.NewIndexWriter(fsOpts) if err != nil { return err } @@ -531,7 +530,7 @@ func writeTestIndexDataToDisk( for _, shard := range shards { shardsMap[shard] = struct{}{} } - volumeIndex, err := fs.NextIndexFileSetVolumeIndex( + volumeIndex, err := persistfs.NextIndexFileSetVolumeIndex( fsOpts.FilePathPrefix(), md.ID(), blockStart, @@ -539,8 +538,8 @@ func writeTestIndexDataToDisk( if err != nil { return err } - writerOpts := fs.IndexWriterOpenOptions{ - Identifier: fs.FileSetFileIdentifier{ + writerOpts := persistfs.IndexWriterOpenOptions{ + Identifier: persistfs.FileSetFileIdentifier{ Namespace: md.ID(), BlockStart: blockStart, VolumeIndex: volumeIndex, diff --git a/src/dbnode/integration/peers_bootstrap_none_available_test.go b/src/dbnode/integration/peers_bootstrap_none_available_test.go index 264d9060e3..afc0aec446 100644 --- a/src/dbnode/integration/peers_bootstrap_none_available_test.go +++ b/src/dbnode/integration/peers_bootstrap_none_available_test.go @@ -26,9 +26,6 @@ import ( "testing" "time" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/cluster/services" "github.com/m3db/m3/src/cluster/shard" "github.com/m3db/m3/src/dbnode/namespace" @@ -38,6 +35,9 @@ import ( "github.com/m3db/m3/src/dbnode/topology" "github.com/m3db/m3/src/dbnode/topology/testutil" xtest "github.com/m3db/m3/src/x/test" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) // TestPeersBootstrapNoneAvailable makes sure that a cluster with the peer bootstrapper enabled can still turn on diff --git a/src/dbnode/integration/peers_bootstrap_partial_data_test.go b/src/dbnode/integration/peers_bootstrap_partial_data_test.go index 56e2610e49..8394e7c540 100644 --- a/src/dbnode/integration/peers_bootstrap_partial_data_test.go +++ b/src/dbnode/integration/peers_bootstrap_partial_data_test.go @@ -1,3 +1,4 @@ +//go:build integration // +build integration // Copyright (c) 2016 Uber Technologies, Inc. @@ -26,13 +27,13 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/dbnode/integration/generate" "github.com/m3db/m3/src/dbnode/namespace" "github.com/m3db/m3/src/dbnode/retention" xtest "github.com/m3db/m3/src/x/test" xtime "github.com/m3db/m3/src/x/time" + + "github.com/stretchr/testify/require" ) // This test simulates a case where node fails / reboots while fetching data from peers. diff --git a/src/dbnode/integration/query_cancellation_client_test.go b/src/dbnode/integration/query_cancellation_client_test.go index a6b0c4a9d2..f3ed434453 100644 --- a/src/dbnode/integration/query_cancellation_client_test.go +++ b/src/dbnode/integration/query_cancellation_client_test.go @@ -30,10 +30,6 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "github.com/uber/tchannel-go/thrift" - "go.uber.org/zap" - "github.com/m3db/m3/src/dbnode/client" "github.com/m3db/m3/src/dbnode/namespace" "github.com/m3db/m3/src/dbnode/retention" @@ -41,6 +37,10 @@ import ( "github.com/m3db/m3/src/m3ninx/idx" "github.com/m3db/m3/src/x/ident" xtime "github.com/m3db/m3/src/x/time" + + "github.com/stretchr/testify/require" + "github.com/uber/tchannel-go/thrift" + "go.uber.org/zap" ) func TestQueryCancellationAndDeadlinesClient(t *testing.T) { diff --git a/src/dbnode/integration/repair_force_only_compare_test.go b/src/dbnode/integration/repair_force_only_compare_test.go index 835244044c..1b92a94b7d 100644 --- a/src/dbnode/integration/repair_force_only_compare_test.go +++ b/src/dbnode/integration/repair_force_only_compare_test.go @@ -1,3 +1,4 @@ +//go:build integration // +build integration // Copyright (c) 2021 Uber Technologies, Inc. @@ -26,15 +27,15 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "github.com/uber-go/tally" - "github.com/m3db/m3/src/dbnode/integration/generate" "github.com/m3db/m3/src/dbnode/namespace" "github.com/m3db/m3/src/dbnode/retention" "github.com/m3db/m3/src/dbnode/storage/repair" xtest "github.com/m3db/m3/src/x/test" xtime "github.com/m3db/m3/src/x/time" + + "github.com/stretchr/testify/require" + "github.com/uber-go/tally" ) func TestRepairForceAndOnlyCompare(t *testing.T) { diff --git a/src/dbnode/integration/series_wired_list_panic_test.go b/src/dbnode/integration/series_wired_list_panic_test.go index e9fd94014c..2bff50b1d1 100644 --- a/src/dbnode/integration/series_wired_list_panic_test.go +++ b/src/dbnode/integration/series_wired_list_panic_test.go @@ -1,3 +1,4 @@ +//go:build integration // +build integration // Copyright (c) 2021 Uber Technologies, Inc. @@ -27,8 +28,6 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/dbnode/generated/thrift/rpc" "github.com/m3db/m3/src/dbnode/integration/generate" "github.com/m3db/m3/src/dbnode/namespace" @@ -38,6 +37,8 @@ import ( "github.com/m3db/m3/src/dbnode/storage/block" "github.com/m3db/m3/src/x/ident" xtime "github.com/m3db/m3/src/x/time" + + "github.com/stretchr/testify/require" ) const ( diff --git a/src/dbnode/integration/setup.go b/src/dbnode/integration/setup.go index ee30253df7..9c3a3c1360 100644 --- a/src/dbnode/integration/setup.go +++ b/src/dbnode/integration/setup.go @@ -32,12 +32,6 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "github.com/uber-go/tally" - "github.com/uber/tchannel-go" - "go.uber.org/zap" - "go.uber.org/zap/zapcore" - "github.com/m3db/m3/src/cluster/services" "github.com/m3db/m3/src/cluster/shard" "github.com/m3db/m3/src/dbnode/client" @@ -69,6 +63,12 @@ import ( "github.com/m3db/m3/src/x/instrument" xsync "github.com/m3db/m3/src/x/sync" xtime "github.com/m3db/m3/src/x/time" + + "github.com/stretchr/testify/require" + "github.com/uber-go/tally" + "github.com/uber/tchannel-go" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" ) var ( diff --git a/src/dbnode/namespace/types.go b/src/dbnode/namespace/types.go index ecfc91528d..e9db4e21c7 100644 --- a/src/dbnode/namespace/types.go +++ b/src/dbnode/namespace/types.go @@ -23,13 +23,13 @@ package namespace import ( "time" - protobuftypes "github.com/gogo/protobuf/types" - "github.com/m3db/m3/src/cluster/client" "github.com/m3db/m3/src/dbnode/retention" "github.com/m3db/m3/src/x/ident" "github.com/m3db/m3/src/x/instrument" xresource "github.com/m3db/m3/src/x/resource" + + protobuftypes "github.com/gogo/protobuf/types" ) // Options controls namespace behavior. diff --git a/src/dbnode/network/server/tchannelthrift/cluster/service_test.go b/src/dbnode/network/server/tchannelthrift/cluster/service_test.go index b55de4d71c..a723285874 100644 --- a/src/dbnode/network/server/tchannelthrift/cluster/service_test.go +++ b/src/dbnode/network/server/tchannelthrift/cluster/service_test.go @@ -25,16 +25,16 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/require" - "github.com/uber/tchannel-go/thrift" - "github.com/m3db/m3/src/dbnode/client" "github.com/m3db/m3/src/dbnode/encoding" "github.com/m3db/m3/src/dbnode/generated/thrift/rpc" "github.com/m3db/m3/src/dbnode/storage/index" "github.com/m3db/m3/src/dbnode/topology" xtest "github.com/m3db/m3/src/x/test" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" + "github.com/uber/tchannel-go/thrift" ) func TestSessionOpts(t *testing.T) { diff --git a/src/dbnode/storage/bootstrap/process.go b/src/dbnode/storage/bootstrap/process.go index ca9cc2518e..fef1032fe3 100644 --- a/src/dbnode/storage/bootstrap/process.go +++ b/src/dbnode/storage/bootstrap/process.go @@ -26,10 +26,6 @@ import ( "sync" "time" - "github.com/opentracing/opentracing-go/log" - "go.uber.org/zap" - "go.uber.org/zap/zapcore" - "github.com/m3db/m3/src/cluster/shard" "github.com/m3db/m3/src/dbnode/namespace" "github.com/m3db/m3/src/dbnode/persist" @@ -40,6 +36,10 @@ import ( "github.com/m3db/m3/src/x/clock" "github.com/m3db/m3/src/x/context" xtime "github.com/m3db/m3/src/x/time" + + "github.com/opentracing/opentracing-go/log" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" ) var ( diff --git a/src/dbnode/storage/bootstrap/process_test.go b/src/dbnode/storage/bootstrap/process_test.go index 8fdc33faa5..330437079c 100644 --- a/src/dbnode/storage/bootstrap/process_test.go +++ b/src/dbnode/storage/bootstrap/process_test.go @@ -24,9 +24,6 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/cluster/shard" "github.com/m3db/m3/src/dbnode/namespace" "github.com/m3db/m3/src/dbnode/persist" @@ -39,6 +36,9 @@ import ( "github.com/m3db/m3/src/x/ident" "github.com/m3db/m3/src/x/instrument" xtime "github.com/m3db/m3/src/x/time" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" ) func TestBootstrapProcessRunActiveBlockAdvanced(t *testing.T) { diff --git a/src/dbnode/storage/bootstrap/result/shard_ranges_test.go b/src/dbnode/storage/bootstrap/result/shard_ranges_test.go index 19b027ec95..e12a6ff7c2 100644 --- a/src/dbnode/storage/bootstrap/result/shard_ranges_test.go +++ b/src/dbnode/storage/bootstrap/result/shard_ranges_test.go @@ -24,10 +24,10 @@ import ( "testing" "time" + xtime "github.com/m3db/m3/src/x/time" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - xtime "github.com/m3db/m3/src/x/time" ) func TestShardTimeRangesAdd(t *testing.T) { diff --git a/src/dbnode/storage/bootstrap_instrumentation_test.go b/src/dbnode/storage/bootstrap_instrumentation_test.go index 84ac56a302..ec8e556538 100644 --- a/src/dbnode/storage/bootstrap_instrumentation_test.go +++ b/src/dbnode/storage/bootstrap_instrumentation_test.go @@ -25,11 +25,11 @@ import ( "strings" "testing" - "github.com/stretchr/testify/assert" - "github.com/uber-go/tally" - "github.com/m3db/m3/src/dbnode/storage/bootstrap" xerrors "github.com/m3db/m3/src/x/errors" + + "github.com/stretchr/testify/assert" + "github.com/uber-go/tally" ) func TestBootstrapRetryMetricReason(t *testing.T) { diff --git a/src/dbnode/storage/database.go b/src/dbnode/storage/database.go index 89f0a83958..d07bb8657f 100644 --- a/src/dbnode/storage/database.go +++ b/src/dbnode/storage/database.go @@ -28,10 +28,6 @@ import ( "sync/atomic" "time" - opentracinglog "github.com/opentracing/opentracing-go/log" - "github.com/uber-go/tally" - "go.uber.org/zap" - "github.com/m3db/m3/src/cluster/shard" "github.com/m3db/m3/src/dbnode/client" "github.com/m3db/m3/src/dbnode/generated/proto/annotation" @@ -54,6 +50,10 @@ import ( "github.com/m3db/m3/src/x/instrument" xopentracing "github.com/m3db/m3/src/x/opentracing" xtime "github.com/m3db/m3/src/x/time" + + opentracinglog "github.com/opentracing/opentracing-go/log" + "github.com/uber-go/tally" + "go.uber.org/zap" ) const ( diff --git a/src/dbnode/storage/database_test.go b/src/dbnode/storage/database_test.go index d49454169f..1749e2dafa 100644 --- a/src/dbnode/storage/database_test.go +++ b/src/dbnode/storage/database_test.go @@ -29,14 +29,6 @@ import ( "testing" "time" - "github.com/fortytw2/leaktest" - "github.com/golang/mock/gomock" - "github.com/opentracing/opentracing-go" - "github.com/opentracing/opentracing-go/mocktracer" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/uber-go/tally" - "github.com/m3db/m3/src/cluster/shard" "github.com/m3db/m3/src/dbnode/client" "github.com/m3db/m3/src/dbnode/generated/proto/annotation" @@ -66,6 +58,14 @@ import ( xtest "github.com/m3db/m3/src/x/test" xtime "github.com/m3db/m3/src/x/time" xwatch "github.com/m3db/m3/src/x/watch" + + "github.com/fortytw2/leaktest" + "github.com/golang/mock/gomock" + "github.com/opentracing/opentracing-go" + "github.com/opentracing/opentracing-go/mocktracer" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/uber-go/tally" ) var ( diff --git a/src/dbnode/storage/entry.go b/src/dbnode/storage/entry.go index 5e0967ad6f..9aa54f2854 100644 --- a/src/dbnode/storage/entry.go +++ b/src/dbnode/storage/entry.go @@ -25,9 +25,6 @@ import ( "sync/atomic" "time" - "github.com/uber-go/tally" - xatomic "go.uber.org/atomic" - "github.com/m3db/m3/src/dbnode/storage/block" "github.com/m3db/m3/src/dbnode/storage/bootstrap" "github.com/m3db/m3/src/dbnode/storage/index" @@ -40,6 +37,9 @@ import ( "github.com/m3db/m3/src/x/ident" "github.com/m3db/m3/src/x/resource" xtime "github.com/m3db/m3/src/x/time" + + "github.com/uber-go/tally" + xatomic "go.uber.org/atomic" ) // IndexWriter accepts index inserts. diff --git a/src/dbnode/storage/entry_blackbox_test.go b/src/dbnode/storage/entry_blackbox_test.go index 595ef49ab5..5969718d9b 100644 --- a/src/dbnode/storage/entry_blackbox_test.go +++ b/src/dbnode/storage/entry_blackbox_test.go @@ -26,18 +26,18 @@ import ( "testing" "time" - "github.com/fortytw2/leaktest" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/uber-go/tally" - "github.com/m3db/m3/src/dbnode/storage/series" "github.com/m3db/m3/src/m3ninx/doc" "github.com/m3db/m3/src/x/ident" "github.com/m3db/m3/src/x/tallytest" xtest "github.com/m3db/m3/src/x/test" xtime "github.com/m3db/m3/src/x/time" + + "github.com/fortytw2/leaktest" + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/uber-go/tally" ) var ( diff --git a/src/dbnode/storage/index.go b/src/dbnode/storage/index.go index 57749d0835..b29fa3a2e9 100644 --- a/src/dbnode/storage/index.go +++ b/src/dbnode/storage/index.go @@ -1788,6 +1788,10 @@ func (i *nsIndex) queryWithSpan( break } + // must not reuse logField slice as the last field will be mutated by concurrent goroutines. + blockLogFields := make([]opentracinglog.Field, 0, len(logFields)+1) + blockLogFields = append(blockLogFields, logFields...) + wg.Add(1) // kick off a go routine to process the entire iterator. go func() { @@ -1802,7 +1806,7 @@ func (i *nsIndex) queryWithSpan( break } } - blockLogFields := append(logFields, xopentracing.Duration("permitWaitTime", waitTime)) + blockLogFields = append(blockLogFields, xopentracing.Duration("permitWaitTime", waitTime)) first = false startProcessing := time.Now() execBlockFn(ctx, blockIter.block, permit, blockIter.iter, opts, state, results, blockLogFields) diff --git a/src/dbnode/storage/index/block.go b/src/dbnode/storage/index/block.go index 6a66268ff6..2f1d3ee28c 100644 --- a/src/dbnode/storage/index/block.go +++ b/src/dbnode/storage/index/block.go @@ -30,10 +30,6 @@ import ( "sync" "time" - opentracinglog "github.com/opentracing/opentracing-go/log" - "github.com/uber-go/tally" - "go.uber.org/zap" - "github.com/m3db/m3/src/dbnode/namespace" "github.com/m3db/m3/src/dbnode/storage/bootstrap/result" "github.com/m3db/m3/src/dbnode/storage/limits" @@ -52,6 +48,10 @@ import ( xresource "github.com/m3db/m3/src/x/resource" xsync "github.com/m3db/m3/src/x/sync" xtime "github.com/m3db/m3/src/x/time" + + opentracinglog "github.com/opentracing/opentracing-go/log" + "github.com/uber-go/tally" + "go.uber.org/zap" ) var ( diff --git a/src/dbnode/storage/index/convert/tag_resolver_test.go b/src/dbnode/storage/index/convert/tag_resolver_test.go index 8d66b06f94..3a39cb1579 100644 --- a/src/dbnode/storage/index/convert/tag_resolver_test.go +++ b/src/dbnode/storage/index/convert/tag_resolver_test.go @@ -24,10 +24,10 @@ import ( "encoding/base64" "testing" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/m3ninx/doc" "github.com/m3db/m3/src/x/ident" + + "github.com/stretchr/testify/require" ) //nolint:lll diff --git a/src/dbnode/storage/index/mutable_segments.go b/src/dbnode/storage/index/mutable_segments.go index 7ba6e6e7cf..2338d3cd5b 100644 --- a/src/dbnode/storage/index/mutable_segments.go +++ b/src/dbnode/storage/index/mutable_segments.go @@ -29,11 +29,6 @@ import ( "sync" "time" - bitmap "github.com/m3dbx/pilosa/roaring" - "github.com/uber-go/tally" - "go.uber.org/zap" - "golang.org/x/sync/errgroup" - "github.com/m3db/m3/src/dbnode/namespace" "github.com/m3db/m3/src/dbnode/storage/index/compaction" "github.com/m3db/m3/src/dbnode/storage/index/segments" @@ -56,6 +51,11 @@ import ( xresource "github.com/m3db/m3/src/x/resource" xsync "github.com/m3db/m3/src/x/sync" xtime "github.com/m3db/m3/src/x/time" + + bitmap "github.com/m3dbx/pilosa/roaring" + "github.com/uber-go/tally" + "go.uber.org/zap" + "golang.org/x/sync/errgroup" ) var ( diff --git a/src/dbnode/storage/index/mutable_segments_test.go b/src/dbnode/storage/index/mutable_segments_test.go index 711c5f9561..c44e7f8505 100644 --- a/src/dbnode/storage/index/mutable_segments_test.go +++ b/src/dbnode/storage/index/mutable_segments_test.go @@ -25,10 +25,6 @@ import ( "testing" "time" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.uber.org/zap" - "github.com/m3db/m3/src/dbnode/namespace" "github.com/m3db/m3/src/m3ninx/doc" "github.com/m3db/m3/src/m3ninx/search" @@ -37,6 +33,10 @@ import ( xsync "github.com/m3db/m3/src/x/sync" xtest "github.com/m3db/m3/src/x/test" xtime "github.com/m3db/m3/src/x/time" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.uber.org/zap" ) type testMutableSegmentsResult struct { diff --git a/src/dbnode/storage/index_query_concurrent_test.go b/src/dbnode/storage/index_query_concurrent_test.go index 3ff9b2395c..d95a8ffc58 100644 --- a/src/dbnode/storage/index_query_concurrent_test.go +++ b/src/dbnode/storage/index_query_concurrent_test.go @@ -30,12 +30,6 @@ import ( "testing" "time" - "github.com/fortytw2/leaktest" - "github.com/golang/mock/gomock" - opentracinglog "github.com/opentracing/opentracing-go/log" - "github.com/stretchr/testify/require" - "go.uber.org/zap" - "github.com/m3db/m3/src/dbnode/storage/index" "github.com/m3db/m3/src/dbnode/storage/index/convert" "github.com/m3db/m3/src/dbnode/storage/limits/permits" @@ -48,6 +42,12 @@ import ( "github.com/m3db/m3/src/x/resource" xtest "github.com/m3db/m3/src/x/test" xtime "github.com/m3db/m3/src/x/time" + + "github.com/fortytw2/leaktest" + "github.com/golang/mock/gomock" + opentracinglog "github.com/opentracing/opentracing-go/log" + "github.com/stretchr/testify/require" + "go.uber.org/zap" ) func TestNamespaceIndexHighConcurrentQueriesWithoutTimeouts(t *testing.T) { diff --git a/src/dbnode/storage/lease_verifier_test.go b/src/dbnode/storage/lease_verifier_test.go index c8534c1273..d86486fe68 100644 --- a/src/dbnode/storage/lease_verifier_test.go +++ b/src/dbnode/storage/lease_verifier_test.go @@ -25,12 +25,12 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/dbnode/storage/block" "github.com/m3db/m3/src/x/ident" xtest "github.com/m3db/m3/src/x/test" xtime "github.com/m3db/m3/src/x/time" + + "github.com/stretchr/testify/require" ) var ( diff --git a/src/dbnode/storage/limits/permits/fixed_permits.go b/src/dbnode/storage/limits/permits/fixed_permits.go index ecd48732aa..5a97d0d9d9 100644 --- a/src/dbnode/storage/limits/permits/fixed_permits.go +++ b/src/dbnode/storage/limits/permits/fixed_permits.go @@ -21,10 +21,10 @@ package permits import ( - "go.uber.org/zap" - "github.com/m3db/m3/src/x/context" "github.com/m3db/m3/src/x/instrument" + + "go.uber.org/zap" ) type fixedPermits struct { diff --git a/src/dbnode/storage/limits/permits/fixed_permits_test.go b/src/dbnode/storage/limits/permits/fixed_permits_test.go index 2606d5d003..96b63290e1 100644 --- a/src/dbnode/storage/limits/permits/fixed_permits_test.go +++ b/src/dbnode/storage/limits/permits/fixed_permits_test.go @@ -24,10 +24,10 @@ import ( stdctx "context" "testing" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/x/context" "github.com/m3db/m3/src/x/instrument" + + "github.com/stretchr/testify/require" ) func TestFixedPermits(t *testing.T) { diff --git a/src/dbnode/storage/limits/permits/lookback_limit_permit_test.go b/src/dbnode/storage/limits/permits/lookback_limit_permit_test.go index 1a3536eb14..81fad75f31 100644 --- a/src/dbnode/storage/limits/permits/lookback_limit_permit_test.go +++ b/src/dbnode/storage/limits/permits/lookback_limit_permit_test.go @@ -23,11 +23,11 @@ package permits import ( "testing" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/dbnode/storage/limits" "github.com/m3db/m3/src/x/context" "github.com/m3db/m3/src/x/instrument" + + "github.com/stretchr/testify/require" ) func TestLookbackLimitPermit(t *testing.T) { diff --git a/src/dbnode/storage/limits/permits/permit.go b/src/dbnode/storage/limits/permits/permit.go index daa9e2b991..7d7c2e0218 100644 --- a/src/dbnode/storage/limits/permits/permit.go +++ b/src/dbnode/storage/limits/permits/permit.go @@ -21,10 +21,10 @@ package permits import ( + "github.com/m3db/m3/src/x/instrument" + "go.uber.org/atomic" "go.uber.org/zap" - - "github.com/m3db/m3/src/x/instrument" ) // permit tracks the quota used by a caller and provides basic sanity checks that a caller diff --git a/src/dbnode/storage/namespace.go b/src/dbnode/storage/namespace.go index 36be46ebda..67e46004c6 100644 --- a/src/dbnode/storage/namespace.go +++ b/src/dbnode/storage/namespace.go @@ -29,10 +29,6 @@ import ( "sync" "time" - opentracinglog "github.com/opentracing/opentracing-go/log" - "github.com/uber-go/tally" - "go.uber.org/zap" - "github.com/m3db/m3/src/dbnode/namespace" "github.com/m3db/m3/src/dbnode/persist" "github.com/m3db/m3/src/dbnode/persist/fs" @@ -58,6 +54,10 @@ import ( xresource "github.com/m3db/m3/src/x/resource" xsync "github.com/m3db/m3/src/x/sync" xtime "github.com/m3db/m3/src/x/time" + + opentracinglog "github.com/opentracing/opentracing-go/log" + "github.com/uber-go/tally" + "go.uber.org/zap" ) var ( diff --git a/src/dbnode/storage/series/series_parallel_test.go b/src/dbnode/storage/series/series_parallel_test.go index 29abe2f8ac..806116128d 100644 --- a/src/dbnode/storage/series/series_parallel_test.go +++ b/src/dbnode/storage/series/series_parallel_test.go @@ -27,9 +27,6 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/dbnode/namespace" "github.com/m3db/m3/src/dbnode/storage/block" "github.com/m3db/m3/src/dbnode/ts" @@ -37,6 +34,9 @@ import ( "github.com/m3db/m3/src/x/ident" xtest "github.com/m3db/m3/src/x/test" xtime "github.com/m3db/m3/src/x/time" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" ) // TestSeriesWriteReadParallel is a regression test that was added to capture diff --git a/src/dbnode/storage/series_resolver_test.go b/src/dbnode/storage/series_resolver_test.go index 66c2113d0b..55d2d87ea9 100644 --- a/src/dbnode/storage/series_resolver_test.go +++ b/src/dbnode/storage/series_resolver_test.go @@ -25,10 +25,10 @@ import ( "sync" "testing" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/x/ident" xtest "github.com/m3db/m3/src/x/test" + + "github.com/stretchr/testify/require" ) func TestResolveError(t *testing.T) { diff --git a/src/dbnode/storage/shard_test.go b/src/dbnode/storage/shard_test.go index e84cc8cdcf..2064527869 100644 --- a/src/dbnode/storage/shard_test.go +++ b/src/dbnode/storage/shard_test.go @@ -32,11 +32,6 @@ import ( "time" "unsafe" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/uber-go/tally" - "github.com/m3db/m3/src/dbnode/encoding" "github.com/m3db/m3/src/dbnode/namespace" "github.com/m3db/m3/src/dbnode/persist" @@ -57,6 +52,11 @@ import ( "github.com/m3db/m3/src/x/pool" xtest "github.com/m3db/m3/src/x/test" xtime "github.com/m3db/m3/src/x/time" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/uber-go/tally" ) type testIncreasingIndex struct { diff --git a/src/integration/aggregator/aggregator.go b/src/integration/aggregator/aggregator.go index 00737848d2..5e2dd0878f 100644 --- a/src/integration/aggregator/aggregator.go +++ b/src/integration/aggregator/aggregator.go @@ -27,12 +27,12 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/dbnode/generated/thrift/rpc" "github.com/m3db/m3/src/integration/resources" "github.com/m3db/m3/src/query/generated/proto/prompb" "github.com/m3db/m3/src/x/headers" + + "github.com/stretchr/testify/require" ) const ( diff --git a/src/integration/prometheus/prometheus.go b/src/integration/prometheus/prometheus.go index 78db91d9ca..f2f6c8c8de 100644 --- a/src/integration/prometheus/prometheus.go +++ b/src/integration/prometheus/prometheus.go @@ -33,10 +33,6 @@ import ( "testing" "time" - "github.com/prometheus/common/model" - "github.com/stretchr/testify/require" - "go.uber.org/zap" - "github.com/m3db/m3/src/cluster/generated/proto/kvpb" "github.com/m3db/m3/src/dbnode/generated/thrift/rpc" "github.com/m3db/m3/src/dbnode/kvconfig" @@ -51,6 +47,10 @@ import ( "github.com/m3db/m3/src/x/pool" "github.com/m3db/m3/src/x/serialize" xtime "github.com/m3db/m3/src/x/time" + + "github.com/prometheus/common/model" + "github.com/stretchr/testify/require" + "go.uber.org/zap" ) const ( diff --git a/src/integration/repair/repair_and_replication.go b/src/integration/repair/repair_and_replication.go index bc3f3854b1..ff502e5638 100644 --- a/src/integration/repair/repair_and_replication.go +++ b/src/integration/repair/repair_and_replication.go @@ -26,10 +26,10 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/dbnode/generated/thrift/rpc" "github.com/m3db/m3/src/integration/resources" + + "github.com/stretchr/testify/require" ) const ( diff --git a/src/integration/resources/coordinator_client.go b/src/integration/resources/coordinator_client.go index fa4b63390f..b930fbc52b 100644 --- a/src/integration/resources/coordinator_client.go +++ b/src/integration/resources/coordinator_client.go @@ -33,13 +33,6 @@ import ( "strings" "time" - "github.com/gogo/protobuf/jsonpb" - "github.com/gogo/protobuf/proto" - "github.com/golang/snappy" - "github.com/prometheus/common/model" - "go.uber.org/zap" - "go.uber.org/zap/zapcore" - "github.com/m3db/m3/src/cluster/generated/proto/placementpb" "github.com/m3db/m3/src/cluster/placementhandler" "github.com/m3db/m3/src/query/api/v1/handler/graphite" @@ -51,6 +44,13 @@ import ( "github.com/m3db/m3/src/query/generated/proto/prompb" "github.com/m3db/m3/src/x/headers" xhttp "github.com/m3db/m3/src/x/net/http" + + "github.com/gogo/protobuf/jsonpb" + "github.com/gogo/protobuf/proto" + "github.com/golang/snappy" + "github.com/prometheus/common/model" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" ) var errUnknownServiceType = errors.New("unknown service type") diff --git a/src/integration/resources/docker/coordinator.go b/src/integration/resources/docker/coordinator.go index ba024c7503..7a82408b39 100644 --- a/src/integration/resources/docker/coordinator.go +++ b/src/integration/resources/docker/coordinator.go @@ -26,13 +26,13 @@ import ( "net/http" "time" - "github.com/ory/dockertest/v3" - "github.com/prometheus/common/model" - "github.com/m3db/m3/src/integration/resources" "github.com/m3db/m3/src/query/api/v1/options" "github.com/m3db/m3/src/query/generated/proto/admin" "github.com/m3db/m3/src/query/generated/proto/prompb" + + "github.com/ory/dockertest/v3" + "github.com/prometheus/common/model" ) const ( diff --git a/src/integration/resources/docker/harness.go b/src/integration/resources/docker/harness.go index ac03fb010d..201946d699 100644 --- a/src/integration/resources/docker/harness.go +++ b/src/integration/resources/docker/harness.go @@ -24,12 +24,12 @@ package docker import ( "time" - "github.com/ory/dockertest/v3" - "go.uber.org/zap" - "github.com/m3db/m3/src/integration/resources" xerrors "github.com/m3db/m3/src/x/errors" "github.com/m3db/m3/src/x/instrument" + + "github.com/ory/dockertest/v3" + "go.uber.org/zap" ) const timeout = time.Second * 60 diff --git a/src/integration/resources/docker/prometheus.go b/src/integration/resources/docker/prometheus.go index 72971f04ea..ff6e6ced46 100644 --- a/src/integration/resources/docker/prometheus.go +++ b/src/integration/resources/docker/prometheus.go @@ -29,11 +29,11 @@ import ( "net/http" "time" - "github.com/ory/dockertest/v3" - "github.com/prometheus/common/model" - "github.com/m3db/m3/src/integration/resources" "github.com/m3db/m3/src/x/instrument" + + "github.com/ory/dockertest/v3" + "github.com/prometheus/common/model" ) // Prometheus is a docker-backed instantiation of Prometheus. diff --git a/src/integration/resources/inprocess/aggregator.go b/src/integration/resources/inprocess/aggregator.go index a332a45161..0192d7822f 100644 --- a/src/integration/resources/inprocess/aggregator.go +++ b/src/integration/resources/inprocess/aggregator.go @@ -30,10 +30,6 @@ import ( "strconv" "time" - "github.com/google/uuid" - "go.uber.org/zap" - "gopkg.in/yaml.v2" - m3agg "github.com/m3db/m3/src/aggregator/aggregator" "github.com/m3db/m3/src/aggregator/server" "github.com/m3db/m3/src/aggregator/tools/deploy" @@ -42,6 +38,10 @@ import ( nettest "github.com/m3db/m3/src/integration/resources/net" "github.com/m3db/m3/src/x/config/hostid" xos "github.com/m3db/m3/src/x/os" + + "github.com/google/uuid" + "go.uber.org/zap" + "gopkg.in/yaml.v2" ) var errAggregatorNotStarted = errors.New("aggregator instance has not started") diff --git a/src/integration/resources/inprocess/cluster.go b/src/integration/resources/inprocess/cluster.go index 92af8f8d4a..2b2dbc2303 100644 --- a/src/integration/resources/inprocess/cluster.go +++ b/src/integration/resources/inprocess/cluster.go @@ -26,10 +26,6 @@ import ( "net" "strconv" - "github.com/google/uuid" - "go.uber.org/zap" - "gopkg.in/yaml.v2" - aggcfg "github.com/m3db/m3/src/cmd/services/m3aggregator/config" dbcfg "github.com/m3db/m3/src/cmd/services/m3dbnode/config" coordinatorcfg "github.com/m3db/m3/src/cmd/services/m3query/config" @@ -43,6 +39,10 @@ import ( xconfig "github.com/m3db/m3/src/x/config" "github.com/m3db/m3/src/x/config/hostid" xerrors "github.com/m3db/m3/src/x/errors" + + "github.com/google/uuid" + "go.uber.org/zap" + "gopkg.in/yaml.v2" ) // ClusterConfigs contain the input config to use for components within diff --git a/src/integration/resources/inprocess/coordinator.go b/src/integration/resources/inprocess/coordinator.go index 8c53af26f5..a7daa585a3 100644 --- a/src/integration/resources/inprocess/coordinator.go +++ b/src/integration/resources/inprocess/coordinator.go @@ -32,10 +32,6 @@ import ( "strconv" "time" - "github.com/prometheus/common/model" - "go.uber.org/zap" - "gopkg.in/yaml.v2" - "github.com/m3db/m3/src/cmd/services/m3query/config" "github.com/m3db/m3/src/integration/resources" nettest "github.com/m3db/m3/src/integration/resources/net" @@ -46,6 +42,10 @@ import ( xconfig "github.com/m3db/m3/src/x/config" "github.com/m3db/m3/src/x/headers" xos "github.com/m3db/m3/src/x/os" + + "github.com/prometheus/common/model" + "go.uber.org/zap" + "gopkg.in/yaml.v2" ) const ( diff --git a/src/integration/resources/inprocess/dbnode.go b/src/integration/resources/inprocess/dbnode.go index ae4302d12d..f526faf1a4 100644 --- a/src/integration/resources/inprocess/dbnode.go +++ b/src/integration/resources/inprocess/dbnode.go @@ -31,10 +31,6 @@ import ( "strconv" "time" - "github.com/google/uuid" - "go.uber.org/zap" - "gopkg.in/yaml.v2" - "github.com/m3db/m3/src/cmd/services/m3dbnode/config" "github.com/m3db/m3/src/cmd/services/m3dbnode/server" "github.com/m3db/m3/src/dbnode/generated/thrift/rpc" @@ -45,6 +41,10 @@ import ( xconfig "github.com/m3db/m3/src/x/config" "github.com/m3db/m3/src/x/config/hostid" xos "github.com/m3db/m3/src/x/os" + + "github.com/google/uuid" + "go.uber.org/zap" + "gopkg.in/yaml.v2" ) // TODO(nate): make configurable diff --git a/src/integration/resources/resources.go b/src/integration/resources/resources.go index 5425a8b944..d40c5d0d19 100644 --- a/src/integration/resources/resources.go +++ b/src/integration/resources/resources.go @@ -27,15 +27,15 @@ import ( "strconv" "time" - protobuftypes "github.com/gogo/protobuf/types" - "go.uber.org/zap" - "github.com/m3db/m3/src/cluster/generated/proto/placementpb" "github.com/m3db/m3/src/cluster/placementhandler/handleroptions" "github.com/m3db/m3/src/dbnode/generated/proto/namespace" "github.com/m3db/m3/src/msg/generated/proto/topicpb" "github.com/m3db/m3/src/query/generated/proto/admin" "github.com/m3db/m3/src/x/instrument" + + protobuftypes "github.com/gogo/protobuf/types" + "go.uber.org/zap" ) const ( diff --git a/src/integration/resources/types.go b/src/integration/resources/types.go index 1a74c14ded..2becae9745 100644 --- a/src/integration/resources/types.go +++ b/src/integration/resources/types.go @@ -29,14 +29,14 @@ import ( "sync" "time" - "github.com/prometheus/common/model" - "github.com/m3db/m3/src/aggregator/aggregator" "github.com/m3db/m3/src/dbnode/generated/thrift/rpc" "github.com/m3db/m3/src/query/api/v1/options" "github.com/m3db/m3/src/query/generated/proto/admin" "github.com/m3db/m3/src/query/generated/proto/prompb" "github.com/m3db/m3/src/x/errors" + + "github.com/prometheus/common/model" ) // ResponseVerifier is a function that checks if the query response is valid. diff --git a/src/integration/simple/simple.go b/src/integration/simple/simple.go index 62a238f7c6..6a661acbcf 100644 --- a/src/integration/simple/simple.go +++ b/src/integration/simple/simple.go @@ -26,15 +26,15 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "go.uber.org/zap" - "github.com/m3db/m3/src/dbnode/generated/thrift/rpc" "github.com/m3db/m3/src/integration/resources" "github.com/m3db/m3/src/m3ninx/idx" "github.com/m3db/m3/src/x/ident" "github.com/m3db/m3/src/x/pool" "github.com/m3db/m3/src/x/serialize" + + "github.com/stretchr/testify/require" + "go.uber.org/zap" ) const ( diff --git a/src/m3ninx/postings/roaring/roaring.go b/src/m3ninx/postings/roaring/roaring.go index 47732a281f..de2f69976b 100644 --- a/src/m3ninx/postings/roaring/roaring.go +++ b/src/m3ninx/postings/roaring/roaring.go @@ -24,10 +24,10 @@ import ( "errors" "fmt" - "github.com/m3dbx/pilosa/roaring" - "github.com/m3db/m3/src/m3ninx/postings" "github.com/m3db/m3/src/m3ninx/x" + + "github.com/m3dbx/pilosa/roaring" ) var ( diff --git a/src/metrics/encoding/protobuf/reset_test.go b/src/metrics/encoding/protobuf/reset_test.go index ce565dbd44..e44227bb01 100644 --- a/src/metrics/encoding/protobuf/reset_test.go +++ b/src/metrics/encoding/protobuf/reset_test.go @@ -24,12 +24,12 @@ import ( "testing" "time" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/metrics/generated/proto/aggregationpb" "github.com/m3db/m3/src/metrics/generated/proto/metricpb" "github.com/m3db/m3/src/metrics/generated/proto/pipelinepb" "github.com/m3db/m3/src/metrics/generated/proto/policypb" + + "github.com/stretchr/testify/require" ) var ( diff --git a/src/metrics/filters/filter_benchmark_test.go b/src/metrics/filters/filter_benchmark_test.go index 400fd94066..aa2dc01271 100644 --- a/src/metrics/filters/filter_benchmark_test.go +++ b/src/metrics/filters/filter_benchmark_test.go @@ -25,9 +25,9 @@ import ( "fmt" "testing" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/metrics/metric/id" + + "github.com/stretchr/testify/require" ) var ( diff --git a/src/metrics/rules/rollup.go b/src/metrics/rules/rollup.go index d7d3184905..e765074825 100644 --- a/src/metrics/rules/rollup.go +++ b/src/metrics/rules/rollup.go @@ -24,14 +24,14 @@ import ( "errors" "fmt" - "github.com/pborman/uuid" - merrors "github.com/m3db/m3/src/metrics/errors" "github.com/m3db/m3/src/metrics/filters" "github.com/m3db/m3/src/metrics/generated/proto/metricpb" "github.com/m3db/m3/src/metrics/generated/proto/rulepb" "github.com/m3db/m3/src/metrics/rules/view" "github.com/m3db/m3/src/query/models" + + "github.com/pborman/uuid" ) var ( diff --git a/src/msg/consumer/consumer.go b/src/msg/consumer/consumer.go index dc0efcb0a3..0e141556ec 100644 --- a/src/msg/consumer/consumer.go +++ b/src/msg/consumer/consumer.go @@ -25,8 +25,6 @@ import ( "sync" "time" - "go.uber.org/zap" - "github.com/m3db/m3/src/msg/generated/proto/msgpb" "github.com/m3db/m3/src/msg/protocol/proto" "github.com/m3db/m3/src/x/clock" @@ -34,6 +32,7 @@ import ( xtime "github.com/m3db/m3/src/x/time" "github.com/uber-go/tally" + "go.uber.org/zap" ) type listener struct { diff --git a/src/msg/producer/config/writer.go b/src/msg/producer/config/writer.go index 774aaba2a9..782f1d45f1 100644 --- a/src/msg/producer/config/writer.go +++ b/src/msg/producer/config/writer.go @@ -24,8 +24,6 @@ import ( "errors" "time" - "github.com/uber-go/tally" - "github.com/m3db/m3/src/cluster/client" "github.com/m3db/m3/src/cluster/kv" "github.com/m3db/m3/src/cluster/placement" @@ -37,6 +35,8 @@ import ( xio "github.com/m3db/m3/src/x/io" "github.com/m3db/m3/src/x/pool" "github.com/m3db/m3/src/x/retry" + + "github.com/uber-go/tally" ) // ConnectionConfiguration configs the connection options. diff --git a/src/msg/producer/config/writer_test.go b/src/msg/producer/config/writer_test.go index 5d103f75c0..ce8d6940dc 100644 --- a/src/msg/producer/config/writer_test.go +++ b/src/msg/producer/config/writer_test.go @@ -24,15 +24,15 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/require" - yaml "gopkg.in/yaml.v2" - "github.com/m3db/m3/src/cluster/client" "github.com/m3db/m3/src/cluster/kv" "github.com/m3db/m3/src/cluster/services" "github.com/m3db/m3/src/x/instrument" xio "github.com/m3db/m3/src/x/io" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" + yaml "gopkg.in/yaml.v2" ) func TestConnectionConfiguration(t *testing.T) { diff --git a/src/msg/producer/writer/message_writer.go b/src/msg/producer/writer/message_writer.go index c0959eaa87..ceac0bfdd6 100644 --- a/src/msg/producer/writer/message_writer.go +++ b/src/msg/producer/writer/message_writer.go @@ -27,14 +27,14 @@ import ( "sync" "time" - "github.com/uber-go/tally" - "github.com/m3db/m3/src/msg/producer" "github.com/m3db/m3/src/msg/protocol/proto" "github.com/m3db/m3/src/x/clock" "github.com/m3db/m3/src/x/instrument" "github.com/m3db/m3/src/x/retry" "github.com/m3db/m3/src/x/unsafe" + + "github.com/uber-go/tally" ) // MessageRetryNanosFn returns the message backoff time for retry in nanoseconds. diff --git a/src/query/api/v1/handler/graphite/find_test.go b/src/query/api/v1/handler/graphite/find_test.go index 0c61bf45bc..e286755e64 100644 --- a/src/query/api/v1/handler/graphite/find_test.go +++ b/src/query/api/v1/handler/graphite/find_test.go @@ -31,10 +31,6 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/m3ninx/doc" "github.com/m3db/m3/src/query/api/v1/handler/prometheus/handleroptions" "github.com/m3db/m3/src/query/api/v1/options" @@ -46,6 +42,10 @@ import ( "github.com/m3db/m3/src/x/headers" xtest "github.com/m3db/m3/src/x/test" xtime "github.com/m3db/m3/src/x/time" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) // dates is a tuple of a date with a valid string representation diff --git a/src/query/api/v1/handler/graphite/render.go b/src/query/api/v1/handler/graphite/render.go index bddca5f3c0..d0a6485f00 100644 --- a/src/query/api/v1/handler/graphite/render.go +++ b/src/query/api/v1/handler/graphite/render.go @@ -26,9 +26,6 @@ import ( "sort" "sync" - "go.uber.org/zap" - "go.uber.org/zap/zapcore" - "github.com/m3db/m3/src/query/api/v1/handler/prometheus/handleroptions" "github.com/m3db/m3/src/query/api/v1/options" "github.com/m3db/m3/src/query/api/v1/route" @@ -43,6 +40,9 @@ import ( "github.com/m3db/m3/src/x/errors" "github.com/m3db/m3/src/x/instrument" xhttp "github.com/m3db/m3/src/x/net/http" + + "go.uber.org/zap" + "go.uber.org/zap/zapcore" ) const ( diff --git a/src/query/api/v1/handler/influxdb/write_test.go b/src/query/api/v1/handler/influxdb/write_test.go index 3b74b5b246..2c8817c29e 100644 --- a/src/query/api/v1/handler/influxdb/write_test.go +++ b/src/query/api/v1/handler/influxdb/write_test.go @@ -31,13 +31,14 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" - imodels "github.com/influxdata/influxdb/models" "github.com/m3db/m3/src/cmd/services/m3coordinator/ingest" "github.com/m3db/m3/src/query/api/v1/options" "github.com/m3db/m3/src/query/models" xtest "github.com/m3db/m3/src/x/test" xtime "github.com/m3db/m3/src/x/time" + + "github.com/golang/mock/gomock" + imodels "github.com/influxdata/influxdb/models" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/src/query/api/v1/handler/prom/prom.go b/src/query/api/v1/handler/prom/prom.go index aad5b8be01..d46bbc7054 100644 --- a/src/query/api/v1/handler/prom/prom.go +++ b/src/query/api/v1/handler/prom/prom.go @@ -24,12 +24,12 @@ import ( "errors" "net/http" - "github.com/prometheus/prometheus/promql/parser" - promstorage "github.com/prometheus/prometheus/storage" - "github.com/m3db/m3/src/query/api/v1/options" "github.com/m3db/m3/src/query/block" "github.com/m3db/m3/src/query/storage/prometheus" + + "github.com/prometheus/prometheus/promql/parser" + promstorage "github.com/prometheus/prometheus/storage" ) // opts defines options for PromQL handler. diff --git a/src/query/api/v1/handler/prom/read_test.go b/src/query/api/v1/handler/prom/read_test.go index 7ffb4e377a..504d765c22 100644 --- a/src/query/api/v1/handler/prom/read_test.go +++ b/src/query/api/v1/handler/prom/read_test.go @@ -30,12 +30,6 @@ import ( "testing" "time" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/promql" - promstorage "github.com/prometheus/prometheus/storage" - "github.com/stretchr/testify/require" - "go.uber.org/zap" - "github.com/m3db/m3/src/query/api/v1/handler/prometheus/handleroptions" "github.com/m3db/m3/src/query/api/v1/handler/prometheus/native" "github.com/m3db/m3/src/query/api/v1/options" @@ -44,6 +38,12 @@ import ( "github.com/m3db/m3/src/query/storage/prometheus" xerrors "github.com/m3db/m3/src/x/errors" "github.com/m3db/m3/src/x/instrument" + + "github.com/prometheus/prometheus/pkg/labels" + "github.com/prometheus/prometheus/promql" + promstorage "github.com/prometheus/prometheus/storage" + "github.com/stretchr/testify/require" + "go.uber.org/zap" ) const promQuery = `http_requests_total{job="prometheus",group="canary"}` diff --git a/src/query/api/v1/handler/prometheus/common.go b/src/query/api/v1/handler/prometheus/common.go index 293046d389..721f0f5193 100644 --- a/src/query/api/v1/handler/prometheus/common.go +++ b/src/query/api/v1/handler/prometheus/common.go @@ -28,8 +28,6 @@ import ( "net/http" "time" - "github.com/golang/snappy" - "github.com/m3db/m3/src/query/errors" "github.com/m3db/m3/src/query/models" xpromql "github.com/m3db/m3/src/query/parser/promql" @@ -40,6 +38,8 @@ import ( "github.com/m3db/m3/src/query/util/json" xerrors "github.com/m3db/m3/src/x/errors" xtime "github.com/m3db/m3/src/x/time" + + "github.com/golang/snappy" ) const ( diff --git a/src/query/api/v1/handler/prometheus/native/list_tags_test.go b/src/query/api/v1/handler/prometheus/native/list_tags_test.go index 6b6f036323..593a949382 100644 --- a/src/query/api/v1/handler/prometheus/native/list_tags_test.go +++ b/src/query/api/v1/handler/prometheus/native/list_tags_test.go @@ -29,10 +29,6 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/query/api/v1/handler/prometheus/handleroptions" "github.com/m3db/m3/src/query/api/v1/options" "github.com/m3db/m3/src/query/block" @@ -42,6 +38,10 @@ import ( "github.com/m3db/m3/src/x/headers" xtest "github.com/m3db/m3/src/x/test" xtime "github.com/m3db/m3/src/x/time" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) type listTagsMatcher struct { diff --git a/src/query/api/v1/handler/prometheus/native/middleware.go b/src/query/api/v1/handler/prometheus/native/middleware.go index 35789e9d09..c9c5fbd679 100644 --- a/src/query/api/v1/handler/prometheus/native/middleware.go +++ b/src/query/api/v1/handler/prometheus/native/middleware.go @@ -25,10 +25,10 @@ import ( "net/http" "time" - "go.uber.org/zap" - "github.com/m3db/m3/src/query/api/v1/handler/prometheus" "github.com/m3db/m3/src/query/api/v1/middleware" + + "go.uber.org/zap" ) // WithQueryParams adds the query request parameters to the middleware options. diff --git a/src/query/api/v1/handler/prometheus/native/middleware_test.go b/src/query/api/v1/handler/prometheus/native/middleware_test.go index 8ac86a6462..4f6c2b6e2f 100644 --- a/src/query/api/v1/handler/prometheus/native/middleware_test.go +++ b/src/query/api/v1/handler/prometheus/native/middleware_test.go @@ -30,17 +30,17 @@ import ( "testing" "time" + "github.com/m3db/m3/src/query/api/v1/middleware" + "github.com/m3db/m3/src/x/headers" + "github.com/m3db/m3/src/x/instrument" + xhttp "github.com/m3db/m3/src/x/net/http" + "github.com/gorilla/mux" "github.com/jonboulle/clockwork" "github.com/stretchr/testify/require" "go.uber.org/zap" "go.uber.org/zap/zapcore" "go.uber.org/zap/zaptest/observer" - - "github.com/m3db/m3/src/query/api/v1/middleware" - "github.com/m3db/m3/src/x/headers" - "github.com/m3db/m3/src/x/instrument" - xhttp "github.com/m3db/m3/src/x/net/http" ) func TestQueryResponse(t *testing.T) { diff --git a/src/query/api/v1/handler/prometheus/remote/write_test.go b/src/query/api/v1/handler/prometheus/remote/write_test.go index 25457aab7e..da497eb4bc 100644 --- a/src/query/api/v1/handler/prometheus/remote/write_test.go +++ b/src/query/api/v1/handler/prometheus/remote/write_test.go @@ -33,11 +33,6 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/uber-go/tally" - "github.com/m3db/m3/src/cmd/services/m3coordinator/ingest" "github.com/m3db/m3/src/cmd/services/m3query/config" "github.com/m3db/m3/src/dbnode/generated/proto/annotation" @@ -53,6 +48,11 @@ import ( "github.com/m3db/m3/src/x/headers" "github.com/m3db/m3/src/x/instrument" xtest "github.com/m3db/m3/src/x/test" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/uber-go/tally" ) func makeOptions(ds ingest.DownsamplerAndWriter) options.HandlerOptions { diff --git a/src/query/api/v1/httpd/graphite_router_test.go b/src/query/api/v1/httpd/graphite_router_test.go index 0554c0d5fa..bf21dd5948 100644 --- a/src/query/api/v1/httpd/graphite_router_test.go +++ b/src/query/api/v1/httpd/graphite_router_test.go @@ -26,10 +26,10 @@ import ( "net/http/httptest" "testing" + "github.com/m3db/m3/src/query/api/v1/options" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - "github.com/m3db/m3/src/query/api/v1/options" ) func TestGraphiteRenderHandler(t *testing.T) { diff --git a/src/query/api/v1/httpd/handler.go b/src/query/api/v1/httpd/handler.go index 126fe5c78b..1bb8cb5cc3 100644 --- a/src/query/api/v1/httpd/handler.go +++ b/src/query/api/v1/httpd/handler.go @@ -28,10 +28,6 @@ import ( _ "net/http/pprof" "time" - "github.com/gorilla/mux" - "github.com/jonboulle/clockwork" - "go.uber.org/zap" - "github.com/m3db/m3/src/cluster/placementhandler" "github.com/m3db/m3/src/cluster/placementhandler/handleroptions" "github.com/m3db/m3/src/cmd/services/m3query/config" @@ -53,6 +49,10 @@ import ( "github.com/m3db/m3/src/query/util/queryhttp" xdebug "github.com/m3db/m3/src/x/debug" xhttp "github.com/m3db/m3/src/x/net/http" + + "github.com/gorilla/mux" + "github.com/jonboulle/clockwork" + "go.uber.org/zap" ) const ( diff --git a/src/query/api/v1/httpd/handler_test.go b/src/query/api/v1/httpd/handler_test.go index 5e6970ab39..532ed0b748 100644 --- a/src/query/api/v1/httpd/handler_test.go +++ b/src/query/api/v1/httpd/handler_test.go @@ -28,11 +28,6 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" - "github.com/prometheus/prometheus/promql" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - handleroptions3 "github.com/m3db/m3/src/cluster/placementhandler/handleroptions" "github.com/m3db/m3/src/cmd/services/m3coordinator/ingest" "github.com/m3db/m3/src/cmd/services/m3query/config" @@ -53,6 +48,11 @@ import ( "github.com/m3db/m3/src/query/test/m3" "github.com/m3db/m3/src/x/instrument" xsync "github.com/m3db/m3/src/x/sync" + + "github.com/golang/mock/gomock" + "github.com/prometheus/prometheus/promql" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) var ( diff --git a/src/query/api/v1/middleware/logging.go b/src/query/api/v1/middleware/logging.go index 3c956e3309..f612e7707c 100644 --- a/src/query/api/v1/middleware/logging.go +++ b/src/query/api/v1/middleware/logging.go @@ -25,15 +25,15 @@ import ( "strings" "time" - "github.com/gorilla/mux" - "github.com/opentracing/opentracing-go" - "go.uber.org/zap" - "github.com/m3db/m3/src/cmd/services/m3query/config" "github.com/m3db/m3/src/query/util/logging" "github.com/m3db/m3/src/x/headers" xhttp "github.com/m3db/m3/src/x/http" "github.com/m3db/m3/src/x/instrument" + + "github.com/gorilla/mux" + "github.com/opentracing/opentracing-go" + "go.uber.org/zap" ) // RequestID populates the request scoped logger with a unique request ID. diff --git a/src/query/api/v1/middleware/logging_test.go b/src/query/api/v1/middleware/logging_test.go index 7baff19606..0b2715b495 100644 --- a/src/query/api/v1/middleware/logging_test.go +++ b/src/query/api/v1/middleware/logging_test.go @@ -29,14 +29,14 @@ import ( "testing" "time" + "github.com/m3db/m3/src/query/util/logging" + "github.com/m3db/m3/src/x/instrument" + "github.com/jonboulle/clockwork" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.uber.org/zap" "go.uber.org/zap/zapcore" - - "github.com/m3db/m3/src/query/util/logging" - "github.com/m3db/m3/src/x/instrument" ) type httpWriter struct { diff --git a/src/query/api/v1/middleware/metrics.go b/src/query/api/v1/middleware/metrics.go index ba4d4c361a..55ddefd02d 100644 --- a/src/query/api/v1/middleware/metrics.go +++ b/src/query/api/v1/middleware/metrics.go @@ -26,14 +26,14 @@ import ( "sync" "time" - "github.com/gorilla/mux" - "github.com/uber-go/tally" - "github.com/m3db/m3/src/cmd/services/m3query/config" "github.com/m3db/m3/src/query/parser/promql" "github.com/m3db/m3/src/x/headers" xhttp "github.com/m3db/m3/src/x/http" "github.com/m3db/m3/src/x/instrument" + + "github.com/gorilla/mux" + "github.com/uber-go/tally" ) const ( diff --git a/src/query/api/v1/middleware/metrics_test.go b/src/query/api/v1/middleware/metrics_test.go index 3d210cb658..521aac803b 100644 --- a/src/query/api/v1/middleware/metrics_test.go +++ b/src/query/api/v1/middleware/metrics_test.go @@ -27,16 +27,16 @@ import ( "testing" "time" - "github.com/gorilla/mux" - "github.com/stretchr/testify/require" - "github.com/uber-go/tally" - "github.com/m3db/m3/src/cmd/services/m3query/config" "github.com/m3db/m3/src/query/api/v1/route" "github.com/m3db/m3/src/query/parser/promql" "github.com/m3db/m3/src/x/headers" "github.com/m3db/m3/src/x/instrument" "github.com/m3db/m3/src/x/tallytest" + + "github.com/gorilla/mux" + "github.com/stretchr/testify/require" + "github.com/uber-go/tally" ) func TestResponseMetrics(t *testing.T) { diff --git a/src/query/api/v1/middleware/middleware.go b/src/query/api/v1/middleware/middleware.go index b62364b40a..aed1bac1e5 100644 --- a/src/query/api/v1/middleware/middleware.go +++ b/src/query/api/v1/middleware/middleware.go @@ -24,13 +24,13 @@ package middleware import ( "net/http" + "github.com/m3db/m3/src/x/instrument" + "github.com/m3db/m3/src/x/net/http/cors" + "github.com/gorilla/mux" "github.com/jonboulle/clockwork" "github.com/opentracing/opentracing-go" "github.com/prometheus/prometheus/util/httputil" - - "github.com/m3db/m3/src/x/instrument" - "github.com/m3db/m3/src/x/net/http/cors" ) // Register is a func to build the set of middleware functions. diff --git a/src/query/api/v1/middleware/middleware_test.go b/src/query/api/v1/middleware/middleware_test.go index 6bdc23ba5a..22bb4c723f 100644 --- a/src/query/api/v1/middleware/middleware_test.go +++ b/src/query/api/v1/middleware/middleware_test.go @@ -28,6 +28,9 @@ import ( "net/http/httptest" "testing" + "github.com/m3db/m3/src/query/util/logging" + "github.com/m3db/m3/src/x/instrument" + "github.com/gorilla/mux" "github.com/opentracing/opentracing-go/mocktracer" "github.com/stretchr/testify/assert" @@ -35,9 +38,6 @@ import ( "go.uber.org/zap" "go.uber.org/zap/zapcore" "go.uber.org/zap/zaptest/observer" - - "github.com/m3db/m3/src/query/util/logging" - "github.com/m3db/m3/src/x/instrument" ) func TestTracing(t *testing.T) { diff --git a/src/query/api/v1/middleware/panic.go b/src/query/api/v1/middleware/panic.go index 6e9a59d7c1..d99d9bcfcc 100644 --- a/src/query/api/v1/middleware/panic.go +++ b/src/query/api/v1/middleware/panic.go @@ -25,13 +25,13 @@ import ( "net/http" "sync" - "github.com/gorilla/mux" - "go.uber.org/zap" - "go.uber.org/zap/zapcore" - "github.com/m3db/m3/src/query/util/logging" "github.com/m3db/m3/src/x/instrument" xhttp "github.com/m3db/m3/src/x/net/http" + + "github.com/gorilla/mux" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" ) var highPriority = zap.LevelEnablerFunc(func(lvl zapcore.Level) bool { diff --git a/src/query/api/v1/middleware/request_classification.go b/src/query/api/v1/middleware/request_classification.go index 2f6167e007..e3966cbf45 100644 --- a/src/query/api/v1/middleware/request_classification.go +++ b/src/query/api/v1/middleware/request_classification.go @@ -26,14 +26,14 @@ import ( "strings" "time" - "github.com/prometheus/prometheus/promql/parser" - "github.com/uber-go/tally" - "go.uber.org/zap" - "github.com/m3db/m3/src/cmd/services/m3query/config" "github.com/m3db/m3/src/query/api/v1/handler/prometheus" "github.com/m3db/m3/src/query/api/v1/route" "github.com/m3db/m3/src/x/headers" + + "github.com/prometheus/prometheus/promql/parser" + "github.com/uber-go/tally" + "go.uber.org/zap" ) const ( diff --git a/src/query/api/v1/middleware/rewrite.go b/src/query/api/v1/middleware/rewrite.go index a55ca812f7..b5d67a6e0f 100644 --- a/src/query/api/v1/middleware/rewrite.go +++ b/src/query/api/v1/middleware/rewrite.go @@ -29,17 +29,17 @@ import ( "net/url" "time" - "github.com/gorilla/mux" - "github.com/prometheus/prometheus/promql" - "github.com/prometheus/prometheus/promql/parser" - promstorage "github.com/prometheus/prometheus/storage" - "go.uber.org/zap" - "github.com/m3db/m3/src/query/api/v1/handler/prometheus" "github.com/m3db/m3/src/query/api/v1/handler/prometheus/handleroptions" "github.com/m3db/m3/src/query/storage" xhttp "github.com/m3db/m3/src/x/net/http" xtime "github.com/m3db/m3/src/x/time" + + "github.com/gorilla/mux" + "github.com/prometheus/prometheus/promql" + "github.com/prometheus/prometheus/promql/parser" + promstorage "github.com/prometheus/prometheus/storage" + "go.uber.org/zap" ) var errIgnorableQuerierError = errors.New("ignorable error") diff --git a/src/query/api/v1/middleware/rewrite_test.go b/src/query/api/v1/middleware/rewrite_test.go index 0c79615682..7ff7e29c7f 100644 --- a/src/query/api/v1/middleware/rewrite_test.go +++ b/src/query/api/v1/middleware/rewrite_test.go @@ -29,17 +29,17 @@ import ( "testing" "time" + "github.com/m3db/m3/src/query/api/v1/handler/prometheus/handleroptions" + "github.com/m3db/m3/src/query/storage/m3/storagemetadata" + "github.com/m3db/m3/src/query/storage/mock" + "github.com/m3db/m3/src/x/instrument" + "github.com/go-kit/kit/log" kitlogzap "github.com/go-kit/kit/log/zap" "github.com/gorilla/mux" "github.com/prometheus/prometheus/promql" "github.com/stretchr/testify/require" "go.uber.org/zap/zapcore" - - "github.com/m3db/m3/src/query/api/v1/handler/prometheus/handleroptions" - "github.com/m3db/m3/src/query/storage/m3/storagemetadata" - "github.com/m3db/m3/src/query/storage/mock" - "github.com/m3db/m3/src/x/instrument" ) func TestPrometheusRangeRewrite(t *testing.T) { diff --git a/src/query/api/v1/middleware/source.go b/src/query/api/v1/middleware/source.go index 86664e1d26..153eb7f3ed 100644 --- a/src/query/api/v1/middleware/source.go +++ b/src/query/api/v1/middleware/source.go @@ -24,13 +24,13 @@ import ( "fmt" "net/http" - "github.com/gorilla/mux" - "go.uber.org/zap" - "github.com/m3db/m3/src/query/source" "github.com/m3db/m3/src/query/util/logging" "github.com/m3db/m3/src/x/headers" xhttp "github.com/m3db/m3/src/x/net/http" + + "github.com/gorilla/mux" + "go.uber.org/zap" ) var errInvalidSourceHeader = xhttp.NewError( diff --git a/src/query/api/v1/middleware/source_test.go b/src/query/api/v1/middleware/source_test.go index 00159e2e1d..7532999349 100644 --- a/src/query/api/v1/middleware/source_test.go +++ b/src/query/api/v1/middleware/source_test.go @@ -27,16 +27,16 @@ import ( "net/http/httptest" "testing" + "github.com/m3db/m3/src/query/source" + "github.com/m3db/m3/src/query/util/logging" + "github.com/m3db/m3/src/x/headers" + "github.com/m3db/m3/src/x/instrument" + "github.com/gorilla/mux" "github.com/stretchr/testify/require" "go.uber.org/zap" "go.uber.org/zap/zapcore" "go.uber.org/zap/zaptest/observer" - - "github.com/m3db/m3/src/query/source" - "github.com/m3db/m3/src/query/util/logging" - "github.com/m3db/m3/src/x/headers" - "github.com/m3db/m3/src/x/instrument" ) type testSource struct { diff --git a/src/query/api/v1/middleware/tracing.go b/src/query/api/v1/middleware/tracing.go index 2d41c82afa..f84df53f7a 100644 --- a/src/query/api/v1/middleware/tracing.go +++ b/src/query/api/v1/middleware/tracing.go @@ -25,15 +25,15 @@ import ( "net/http" "strconv" + "github.com/m3db/m3/src/query/util/logging" + "github.com/m3db/m3/src/x/instrument" + "github.com/gorilla/mux" "github.com/opentracing-contrib/go-stdlib/nethttp" "github.com/opentracing/opentracing-go" "github.com/opentracing/opentracing-go/mocktracer" "github.com/uber/jaeger-client-go" "go.uber.org/zap" - - "github.com/m3db/m3/src/query/util/logging" - "github.com/m3db/m3/src/x/instrument" ) // Tracing applies OpenTracing compatible middleware, which will start a span diff --git a/src/query/api/v1/options/handler.go b/src/query/api/v1/options/handler.go index 8e06f6be66..0c15698cc3 100644 --- a/src/query/api/v1/options/handler.go +++ b/src/query/api/v1/options/handler.go @@ -27,9 +27,6 @@ import ( "strings" "time" - "github.com/prometheus/prometheus/promql" - "google.golang.org/protobuf/runtime/protoiface" - clusterclient "github.com/m3db/m3/src/cluster/client" placementhandleroptions "github.com/m3db/m3/src/cluster/placementhandler/handleroptions" "github.com/m3db/m3/src/cmd/services/m3coordinator/ingest" @@ -48,6 +45,9 @@ import ( "github.com/m3db/m3/src/query/ts" "github.com/m3db/m3/src/x/clock" "github.com/m3db/m3/src/x/instrument" + + "github.com/prometheus/prometheus/promql" + "google.golang.org/protobuf/runtime/protoiface" ) // QueryEngine is a type of query engine. diff --git a/src/query/functions/scalar/time.go b/src/query/functions/scalar/time.go index 9268b87b9d..22d84ebdb6 100644 --- a/src/query/functions/scalar/time.go +++ b/src/query/functions/scalar/time.go @@ -21,13 +21,13 @@ package scalar import ( - "go.uber.org/zap" - "github.com/m3db/m3/src/query/block" "github.com/m3db/m3/src/query/executor/transform" "github.com/m3db/m3/src/query/models" "github.com/m3db/m3/src/query/parser" "github.com/m3db/m3/src/query/util/logging" + + "go.uber.org/zap" ) type timeOp struct { diff --git a/src/query/graphite/native/alias_functions_test.go b/src/query/graphite/native/alias_functions_test.go index 4b87f8046f..dfe68036d1 100644 --- a/src/query/graphite/native/alias_functions_test.go +++ b/src/query/graphite/native/alias_functions_test.go @@ -24,14 +24,14 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/query/graphite/common" "github.com/m3db/m3/src/query/graphite/storage" "github.com/m3db/m3/src/query/graphite/ts" xgomock "github.com/m3db/m3/src/x/test" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestAlias(t *testing.T) { diff --git a/src/query/graphite/native/compiler_test.go b/src/query/graphite/native/compiler_test.go index 3bb09168a3..58c39cb5dd 100644 --- a/src/query/graphite/native/compiler_test.go +++ b/src/query/graphite/native/compiler_test.go @@ -25,16 +25,16 @@ import ( "math" "testing" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/query/graphite/common" "github.com/m3db/m3/src/query/graphite/lexer" "github.com/m3db/m3/src/query/graphite/storage" graphitetest "github.com/m3db/m3/src/query/graphite/testing" "github.com/m3db/m3/src/query/graphite/ts" xtest "github.com/m3db/m3/src/x/test" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) type testCompile struct { diff --git a/src/query/graphite/storage/m3_wrapper.go b/src/query/graphite/storage/m3_wrapper.go index 4449fecb3a..fc21e42707 100644 --- a/src/query/graphite/storage/m3_wrapper.go +++ b/src/query/graphite/storage/m3_wrapper.go @@ -29,8 +29,6 @@ import ( "sync" "time" - "go.uber.org/zap" - "github.com/m3db/m3/src/m3ninx/doc" "github.com/m3db/m3/src/query/block" xctx "github.com/m3db/m3/src/query/graphite/context" @@ -44,6 +42,8 @@ import ( "github.com/m3db/m3/src/query/util/logging" "github.com/m3db/m3/src/x/instrument" xtime "github.com/m3db/m3/src/x/time" + + "go.uber.org/zap" ) var errSeriesNoResolution = errors.New("series has no resolution set") diff --git a/src/query/graphite/storage/m3_wrapper_test.go b/src/query/graphite/storage/m3_wrapper_test.go index 1359791081..92603ce441 100644 --- a/src/query/graphite/storage/m3_wrapper_test.go +++ b/src/query/graphite/storage/m3_wrapper_test.go @@ -26,10 +26,6 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/dbnode/encoding" "github.com/m3db/m3/src/m3ninx/doc" "github.com/m3db/m3/src/query/block" @@ -43,6 +39,10 @@ import ( "github.com/m3db/m3/src/x/instrument" xtest "github.com/m3db/m3/src/x/test" xtime "github.com/m3db/m3/src/x/time" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) var ( diff --git a/src/query/parser/promql/parse.go b/src/query/parser/promql/parse.go index 2e44632498..2d8eb57847 100644 --- a/src/query/parser/promql/parse.go +++ b/src/query/parser/promql/parse.go @@ -24,8 +24,6 @@ import ( "fmt" "time" - pql "github.com/prometheus/prometheus/promql/parser" - "github.com/m3db/m3/src/query/block" "github.com/m3db/m3/src/query/functions/binary" "github.com/m3db/m3/src/query/functions/lazy" @@ -33,6 +31,8 @@ import ( "github.com/m3db/m3/src/query/models" "github.com/m3db/m3/src/query/parser" xtime "github.com/m3db/m3/src/x/time" + + pql "github.com/prometheus/prometheus/promql/parser" ) type promParser struct { diff --git a/src/query/pools/query_pools.go b/src/query/pools/query_pools.go index 6386593da4..120ad2c634 100644 --- a/src/query/pools/query_pools.go +++ b/src/query/pools/query_pools.go @@ -21,8 +21,6 @@ package pools import ( - "github.com/uber-go/tally" - "github.com/m3db/m3/src/dbnode/encoding" "github.com/m3db/m3/src/dbnode/encoding/m3tsz" "github.com/m3db/m3/src/dbnode/namespace" @@ -34,6 +32,8 @@ import ( "github.com/m3db/m3/src/x/pool" "github.com/m3db/m3/src/x/serialize" xsync "github.com/m3db/m3/src/x/sync" + + "github.com/uber-go/tally" ) const ( diff --git a/src/query/server/query.go b/src/query/server/query.go index 63c5c1e285..bb4487b31f 100644 --- a/src/query/server/query.go +++ b/src/query/server/query.go @@ -30,19 +30,6 @@ import ( "strings" "time" - "github.com/go-kit/kit/log" - kitlogzap "github.com/go-kit/kit/log/zap" - "github.com/opentracing/opentracing-go" - "github.com/pkg/errors" - extprom "github.com/prometheus/client_golang/prometheus" - prometheuspromql "github.com/prometheus/prometheus/promql" - "go.uber.org/zap" - "go.uber.org/zap/zapcore" - "golang.org/x/net/http2" - "golang.org/x/net/http2/h2c" - "google.golang.org/grpc" - "google.golang.org/grpc/reflection" - "github.com/m3db/m3/src/aggregator/server" clusterclient "github.com/m3db/m3/src/cluster/client" etcdclient "github.com/m3db/m3/src/cluster/client/etcd" @@ -86,6 +73,19 @@ import ( "github.com/m3db/m3/src/x/serialize" xserver "github.com/m3db/m3/src/x/server" xsync "github.com/m3db/m3/src/x/sync" + + "github.com/go-kit/kit/log" + kitlogzap "github.com/go-kit/kit/log/zap" + "github.com/opentracing/opentracing-go" + "github.com/pkg/errors" + extprom "github.com/prometheus/client_golang/prometheus" + prometheuspromql "github.com/prometheus/prometheus/promql" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" + "golang.org/x/net/http2" + "golang.org/x/net/http2/h2c" + "google.golang.org/grpc" + "google.golang.org/grpc/reflection" ) const ( diff --git a/src/query/server/query_test.go b/src/query/server/query_test.go index cf493685b8..c3b64cafa8 100644 --- a/src/query/server/query_test.go +++ b/src/query/server/query_test.go @@ -31,14 +31,6 @@ import ( "testing" "time" - "github.com/gogo/protobuf/proto" - "github.com/golang/mock/gomock" - "github.com/prometheus/prometheus/promql" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "go.uber.org/atomic" - "google.golang.org/grpc" - clusterclient "github.com/m3db/m3/src/cluster/client" "github.com/m3db/m3/src/cluster/kv/mem" "github.com/m3db/m3/src/cmd/services/m3query/config" @@ -58,6 +50,14 @@ import ( "github.com/m3db/m3/src/x/instrument" "github.com/m3db/m3/src/x/serialize" xtest "github.com/m3db/m3/src/x/test" + + "github.com/gogo/protobuf/proto" + "github.com/golang/mock/gomock" + "github.com/prometheus/prometheus/promql" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "go.uber.org/atomic" + "google.golang.org/grpc" ) var configYAML = ` diff --git a/src/query/storage/fanout/storage.go b/src/query/storage/fanout/storage.go index 10eca4d58d..3de9afd346 100644 --- a/src/query/storage/fanout/storage.go +++ b/src/query/storage/fanout/storage.go @@ -27,8 +27,6 @@ import ( "sync" "time" - "go.uber.org/zap" - "github.com/m3db/m3/src/query/block" "github.com/m3db/m3/src/query/errors" "github.com/m3db/m3/src/query/models" @@ -40,6 +38,8 @@ import ( "github.com/m3db/m3/src/query/util/execution" xerrors "github.com/m3db/m3/src/x/errors" "github.com/m3db/m3/src/x/instrument" + + "go.uber.org/zap" ) const ( diff --git a/src/query/storage/fetch.go b/src/query/storage/fetch.go index 6ba63820ef..01956c598b 100644 --- a/src/query/storage/fetch.go +++ b/src/query/storage/fetch.go @@ -23,10 +23,10 @@ package storage import ( "time" - "github.com/uber-go/tally" - "github.com/m3db/m3/src/query/models" "github.com/m3db/m3/src/query/storage/m3/storagemetadata" + + "github.com/uber-go/tally" ) const ( diff --git a/src/query/storage/m3/cluster_resolver_test.go b/src/query/storage/m3/cluster_resolver_test.go index 4b2c78b40d..e1a67f69b5 100644 --- a/src/query/storage/m3/cluster_resolver_test.go +++ b/src/query/storage/m3/cluster_resolver_test.go @@ -26,10 +26,6 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/dbnode/client" "github.com/m3db/m3/src/metrics/policy" "github.com/m3db/m3/src/query/storage" @@ -38,6 +34,10 @@ import ( xerrors "github.com/m3db/m3/src/x/errors" "github.com/m3db/m3/src/x/ident" xtime "github.com/m3db/m3/src/x/time" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestFanoutAggregatedOptimizationDisabledGivesAllClustersAsPartial(t *testing.T) { diff --git a/src/query/storage/m3/consolidators/id_dedupe_map_test.go b/src/query/storage/m3/consolidators/id_dedupe_map_test.go index 92ca3e655b..8a08f63848 100644 --- a/src/query/storage/m3/consolidators/id_dedupe_map_test.go +++ b/src/query/storage/m3/consolidators/id_dedupe_map_test.go @@ -24,10 +24,6 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/dbnode/encoding" "github.com/m3db/m3/src/dbnode/ts" "github.com/m3db/m3/src/query/models" @@ -35,6 +31,10 @@ import ( "github.com/m3db/m3/src/x/ident" xtest "github.com/m3db/m3/src/x/test" xtime "github.com/m3db/m3/src/x/time" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func verifyIDDedupeMap( diff --git a/src/query/storage/m3/storage.go b/src/query/storage/m3/storage.go index c61c75f36b..f8612d50a5 100644 --- a/src/query/storage/m3/storage.go +++ b/src/query/storage/m3/storage.go @@ -28,11 +28,6 @@ import ( "sync" "time" - "github.com/opentracing/opentracing-go/log" - "github.com/prometheus/common/model" - "go.uber.org/zap" - "go.uber.org/zap/zapcore" - coordmodel "github.com/m3db/m3/src/cmd/services/m3coordinator/model" "github.com/m3db/m3/src/dbnode/client" "github.com/m3db/m3/src/dbnode/storage/index" @@ -50,6 +45,11 @@ import ( "github.com/m3db/m3/src/x/ident" "github.com/m3db/m3/src/x/instrument" xtime "github.com/m3db/m3/src/x/time" + + "github.com/opentracing/opentracing-go/log" + "github.com/prometheus/common/model" + "go.uber.org/zap" + "go.uber.org/zap/zapcore" ) const ( diff --git a/src/query/storage/promremote/options.go b/src/query/storage/promremote/options.go index 6197e7cfc2..921058e640 100644 --- a/src/query/storage/promremote/options.go +++ b/src/query/storage/promremote/options.go @@ -25,13 +25,13 @@ import ( "fmt" "strings" - "github.com/uber-go/tally" - "go.uber.org/zap" - "github.com/m3db/m3/src/cmd/services/m3query/config" "github.com/m3db/m3/src/query/storage/m3" "github.com/m3db/m3/src/query/storage/m3/storagemetadata" xhttp "github.com/m3db/m3/src/x/net/http" + + "github.com/uber-go/tally" + "go.uber.org/zap" ) // NewOptions constructs Options based on the given config. diff --git a/src/query/storage/promremote/options_test.go b/src/query/storage/promremote/options_test.go index 3f40b8f417..8c9b05e510 100644 --- a/src/query/storage/promremote/options_test.go +++ b/src/query/storage/promremote/options_test.go @@ -24,14 +24,14 @@ import ( "testing" "time" + "github.com/m3db/m3/src/cmd/services/m3query/config" + "github.com/m3db/m3/src/query/storage/m3" + "github.com/m3db/m3/src/query/storage/m3/storagemetadata" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/uber-go/tally" "go.uber.org/zap" - - "github.com/m3db/m3/src/cmd/services/m3query/config" - "github.com/m3db/m3/src/query/storage/m3" - "github.com/m3db/m3/src/query/storage/m3/storagemetadata" ) func TestNewFromConfiguration(t *testing.T) { diff --git a/src/query/storage/promremote/query_converter_test.go b/src/query/storage/promremote/query_converter_test.go index 5d3c613d8c..b60a33c772 100644 --- a/src/query/storage/promremote/query_converter_test.go +++ b/src/query/storage/promremote/query_converter_test.go @@ -24,14 +24,14 @@ import ( "testing" "time" - "github.com/prometheus/prometheus/prompb" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/query/models" "github.com/m3db/m3/src/query/storage" "github.com/m3db/m3/src/query/ts" xtime "github.com/m3db/m3/src/x/time" + + "github.com/prometheus/prometheus/prompb" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestWriteQueryConverter(t *testing.T) { diff --git a/src/query/storage/promremote/query_coverter.go b/src/query/storage/promremote/query_coverter.go index 31e5470cbe..ef4a42005d 100644 --- a/src/query/storage/promremote/query_coverter.go +++ b/src/query/storage/promremote/query_coverter.go @@ -23,11 +23,11 @@ package promremote import ( "time" + "github.com/m3db/m3/src/query/storage" + "github.com/golang/snappy" "github.com/pkg/errors" "github.com/prometheus/prometheus/prompb" - - "github.com/m3db/m3/src/query/storage" ) var errNilQuery = errors.New("received nil query") diff --git a/src/query/storage/promremote/storage.go b/src/query/storage/promremote/storage.go index 442ee34eea..1ed5484b1c 100644 --- a/src/query/storage/promremote/storage.go +++ b/src/query/storage/promremote/storage.go @@ -30,10 +30,6 @@ import ( "sync" "time" - "github.com/pkg/errors" - "github.com/uber-go/tally" - "go.uber.org/zap" - "github.com/m3db/m3/src/query/block" "github.com/m3db/m3/src/query/storage" "github.com/m3db/m3/src/query/storage/m3/consolidators" @@ -41,6 +37,10 @@ import ( xerrors "github.com/m3db/m3/src/x/errors" "github.com/m3db/m3/src/x/instrument" xhttp "github.com/m3db/m3/src/x/net/http" + + "github.com/pkg/errors" + "github.com/uber-go/tally" + "go.uber.org/zap" ) const metricsScope = "prom_remote_storage" diff --git a/src/query/storage/promremote/storage_test.go b/src/query/storage/promremote/storage_test.go index 2e6a71e4b6..a5a2e337cf 100644 --- a/src/query/storage/promremote/storage_test.go +++ b/src/query/storage/promremote/storage_test.go @@ -28,12 +28,6 @@ import ( "testing" "time" - "github.com/prometheus/prometheus/prompb" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/uber-go/tally" - "go.uber.org/zap" - "github.com/m3db/m3/src/query/models" "github.com/m3db/m3/src/query/storage" "github.com/m3db/m3/src/query/storage/m3/storagemetadata" @@ -42,6 +36,12 @@ import ( xerrors "github.com/m3db/m3/src/x/errors" "github.com/m3db/m3/src/x/tallytest" xtime "github.com/m3db/m3/src/x/time" + + "github.com/prometheus/prometheus/prompb" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/uber-go/tally" + "go.uber.org/zap" ) var ( diff --git a/src/query/storage/promremote/types.go b/src/query/storage/promremote/types.go index 23e0151bf4..f544263213 100644 --- a/src/query/storage/promremote/types.go +++ b/src/query/storage/promremote/types.go @@ -22,14 +22,14 @@ package promremote import ( - "github.com/uber-go/tally" - "go.uber.org/zap" - "github.com/m3db/m3/src/dbnode/client" "github.com/m3db/m3/src/query/storage/m3" "github.com/m3db/m3/src/query/storage/m3/storagemetadata" "github.com/m3db/m3/src/x/ident" xhttp "github.com/m3db/m3/src/x/net/http" + + "github.com/uber-go/tally" + "go.uber.org/zap" ) // Options for storage. diff --git a/src/query/storage/promremote/types_test.go b/src/query/storage/promremote/types_test.go index 719ab93f5e..27f6f57bab 100644 --- a/src/query/storage/promremote/types_test.go +++ b/src/query/storage/promremote/types_test.go @@ -23,12 +23,12 @@ import ( "testing" "time" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/query/storage/m3" "github.com/m3db/m3/src/query/storage/m3/storagemetadata" "github.com/m3db/m3/src/x/ident" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" ) func TestNamespaces(t *testing.T) { diff --git a/src/query/storage/types.go b/src/query/storage/types.go index 033fb9bbcb..636fd08b99 100644 --- a/src/query/storage/types.go +++ b/src/query/storage/types.go @@ -26,8 +26,6 @@ import ( "fmt" "time" - "github.com/uber-go/tally" - "github.com/m3db/m3/src/dbnode/encoding" "github.com/m3db/m3/src/dbnode/topology" "github.com/m3db/m3/src/metrics/policy" @@ -38,6 +36,8 @@ import ( "github.com/m3db/m3/src/query/storage/m3/storagemetadata" "github.com/m3db/m3/src/query/ts" xtime "github.com/m3db/m3/src/x/time" + + "github.com/uber-go/tally" ) var errWriteQueryNoDatapoints = errors.New("write query with no datapoints") diff --git a/src/query/test/builder.go b/src/query/test/builder.go index b22de4ce21..7ddbad025a 100644 --- a/src/query/test/builder.go +++ b/src/query/test/builder.go @@ -24,13 +24,13 @@ import ( "fmt" "time" - "github.com/prometheus/common/model" - "github.com/m3db/m3/src/query/block" "github.com/m3db/m3/src/query/models" "github.com/m3db/m3/src/query/storage" "github.com/m3db/m3/src/query/ts" xtime "github.com/m3db/m3/src/x/time" + + "github.com/prometheus/common/model" ) // ValueMod can be used to modify provided values for testing. diff --git a/src/query/test/m3/test_storage.go b/src/query/test/m3/test_storage.go index 73b7ad51d9..8379dc8efa 100644 --- a/src/query/test/m3/test_storage.go +++ b/src/query/test/m3/test_storage.go @@ -24,9 +24,6 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/dbnode/client" "github.com/m3db/m3/src/dbnode/encoding" "github.com/m3db/m3/src/query/models" @@ -35,6 +32,9 @@ import ( "github.com/m3db/m3/src/x/ident" "github.com/m3db/m3/src/x/instrument" "github.com/m3db/m3/src/x/sync" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" ) const ( diff --git a/src/query/util/json/writer.go b/src/query/util/json/writer.go index 4f8fb0e875..aa4f062e9a 100644 --- a/src/query/util/json/writer.go +++ b/src/query/util/json/writer.go @@ -114,7 +114,7 @@ func (w *writer) BeginObject() { } w.containers = append(w.containers, object) - _, w.err = w.w.WriteRune('{') + w.err = w.w.WriteByte('{') w.state = writeBeforeFirstField } @@ -143,7 +143,7 @@ func (w *writer) beginObjectFieldStart() error { } if w.state == writeBeforeNthField { - if _, err := w.w.WriteRune(','); err != nil { + if err := w.w.WriteByte(','); err != nil { return err } } @@ -152,7 +152,7 @@ func (w *writer) beginObjectFieldStart() error { } func (w *writer) beginObjectFieldEnd() error { - if _, err := w.w.WriteRune(':'); err != nil { + if err := w.w.WriteByte(':'); err != nil { return err } w.state = writeBeforeFieldValue @@ -179,7 +179,7 @@ func (w *writer) EndObject() { return } - _, w.err = w.w.WriteRune('}') + w.err = w.w.WriteByte('}') } // BeginArray begins a new array value @@ -189,7 +189,7 @@ func (w *writer) BeginArray() { } w.containers = append(w.containers, array) - _, w.err = w.w.WriteRune('[') + w.err = w.w.WriteByte('[') w.state = writeBeforeFirstArrayElement } @@ -199,7 +199,7 @@ func (w *writer) EndArray() { return } - _, w.err = w.w.WriteRune(']') + w.err = w.w.WriteByte(']') } // endContainer finishes a container of the given type @@ -290,7 +290,7 @@ func (w *writer) WriteString(s string) { } func (w *writer) writeString(s string) { - if _, w.err = w.w.WriteRune('"'); w.err != nil { + if w.err = w.w.WriteByte('"'); w.err != nil { return } @@ -301,7 +301,7 @@ func (w *writer) writeString(s string) { } } - _, w.err = w.w.WriteRune('"') + w.err = w.w.WriteByte('"') } func (w *writer) WriteBytesString(s []byte) { @@ -315,7 +315,7 @@ func (w *writer) WriteBytesString(s []byte) { } func (w *writer) writeBytesString(s []byte) { - if _, w.err = w.w.WriteRune('"'); w.err != nil { + if w.err = w.w.WriteByte('"'); w.err != nil { return } @@ -334,35 +334,39 @@ func (w *writer) writeBytesString(s []byte) { w.writeRune(c) } - _, w.err = w.w.WriteRune('"') + w.err = w.w.WriteByte('"') } func (w *writer) writeRune(r rune) { if r <= 31 || r == '"' || r == '\\' { - if _, w.err = w.w.WriteRune('\\'); w.err != nil { + if w.err = w.w.WriteByte('\\'); w.err != nil { return } switch r { - case '"', '\\': - if _, w.err = w.w.WriteRune(r); w.err != nil { + case '"': + if w.err = w.w.WriteByte('"'); w.err != nil { + return + } + case '\\': + if w.err = w.w.WriteByte('\\'); w.err != nil { return } case '\n': - if _, w.err = w.w.WriteRune('n'); w.err != nil { + if w.err = w.w.WriteByte('n'); w.err != nil { return } case '\r': - if _, w.err = w.w.WriteRune('r'); w.err != nil { + if w.err = w.w.WriteByte('r'); w.err != nil { return } case '\t': - if _, w.err = w.w.WriteRune('t'); w.err != nil { + if w.err = w.w.WriteByte('t'); w.err != nil { return } default: codePoint := fmt.Sprintf("%U", r) - if _, w.err = w.w.WriteRune('u'); w.err != nil { + if w.err = w.w.WriteByte('u'); w.err != nil { return } if _, w.err = w.w.WriteString(codePoint[2:]); w.err != nil { @@ -391,7 +395,7 @@ func (w *writer) beginValue() bool { } if w.state == writeBeforeNthArrayElement { - if _, w.err = w.w.WriteRune(','); w.err != nil { + if w.err = w.w.WriteByte(','); w.err != nil { return false } } diff --git a/src/x/debug/ext/ext_test.go b/src/x/debug/ext/ext_test.go index 9b5c7eda7e..8a5c69672c 100644 --- a/src/x/debug/ext/ext_test.go +++ b/src/x/debug/ext/ext_test.go @@ -28,12 +28,12 @@ import ( "testing" "time" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/cluster/placementhandler/handleroptions" debugtest "github.com/m3db/m3/src/x/debug/test" "github.com/m3db/m3/src/x/instrument" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" ) func TestDefaultSources(t *testing.T) { diff --git a/src/x/debug/ext/placement_test.go b/src/x/debug/ext/placement_test.go index db261a1e3c..b8ab699230 100644 --- a/src/x/debug/ext/placement_test.go +++ b/src/x/debug/ext/placement_test.go @@ -25,11 +25,11 @@ import ( "net/http" "testing" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/require" - "github.com/m3db/m3/src/cluster/placementhandler/handleroptions" debugtest "github.com/m3db/m3/src/x/debug/test" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" ) func TestPlacementSource(t *testing.T) { diff --git a/src/x/debug/test/test.go b/src/x/debug/test/test.go index 9f4c9b36bc..ac29bf9645 100644 --- a/src/x/debug/test/test.go +++ b/src/x/debug/test/test.go @@ -24,9 +24,6 @@ package debugtest import ( "testing" - "github.com/golang/mock/gomock" - "github.com/stretchr/testify/require" - clusterclient "github.com/m3db/m3/src/cluster/client" "github.com/m3db/m3/src/cluster/generated/proto/placementpb" "github.com/m3db/m3/src/cluster/kv" @@ -35,6 +32,9 @@ import ( "github.com/m3db/m3/src/cluster/services" "github.com/m3db/m3/src/query/api/v1/handler/namespace" "github.com/m3db/m3/src/x/instrument" + + "github.com/golang/mock/gomock" + "github.com/stretchr/testify/require" ) // NewTestHandlerOptsAndClient returns a new test handler. diff --git a/src/x/generated/mock.go b/src/x/generated/mock.go index 8aee06a9dc..1f1ca1529a 100644 --- a/src/x/generated/mock.go +++ b/src/x/generated/mock.go @@ -22,7 +22,6 @@ package generated import ( - // https://github.com/golang/mock/issues/494 _ "github.com/golang/mock/mockgen/model" ) diff --git a/src/x/net/http/errors.go b/src/x/net/http/errors.go index e4840bf716..042233fb90 100644 --- a/src/x/net/http/errors.go +++ b/src/x/net/http/errors.go @@ -27,10 +27,10 @@ import ( "net/http" "sync" - "github.com/prometheus/prometheus/promql" - "github.com/m3db/m3/src/dbnode/client" xerrors "github.com/m3db/m3/src/x/errors" + + "github.com/prometheus/prometheus/promql" ) // ErrorRewriteFn is a function for rewriting response error. diff --git a/src/x/net/http/errors_test.go b/src/x/net/http/errors_test.go index 2e77f49cdc..b228a0b7c1 100644 --- a/src/x/net/http/errors_test.go +++ b/src/x/net/http/errors_test.go @@ -27,13 +27,13 @@ import ( "net/http/httptest" "testing" + terrors "github.com/m3db/m3/src/dbnode/network/server/tchannelthrift/errors" + xerrors "github.com/m3db/m3/src/x/errors" + "github.com/prometheus/prometheus/promql" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/uber/tchannel-go" - - terrors "github.com/m3db/m3/src/dbnode/network/server/tchannelthrift/errors" - xerrors "github.com/m3db/m3/src/x/errors" ) func TestErrorStatus(t *testing.T) { diff --git a/src/x/sync/num_cores_darwin.go b/src/x/sync/num_cores_darwin.go index 22dedc064e..344e71565c 100644 --- a/src/x/sync/num_cores_darwin.go +++ b/src/x/sync/num_cores_darwin.go @@ -1,4 +1,6 @@ +//go:build darwin // +build darwin + // // Copyright (c) 2021 Uber Technologies, Inc. // diff --git a/src/x/sync/num_cores_linux.go b/src/x/sync/num_cores_linux.go index f5f7293d7f..54d4083ff1 100644 --- a/src/x/sync/num_cores_linux.go +++ b/src/x/sync/num_cores_linux.go @@ -1,4 +1,6 @@ +//go:build linux // +build linux + // // Copyright (c) 2021 Uber Technologies, Inc. //