diff --git a/cmd/promtool/backfill.go b/cmd/promtool/backfill.go index b626743dea..6cd8fd1f3a 100644 --- a/cmd/promtool/backfill.go +++ b/cmd/promtool/backfill.go @@ -21,6 +21,7 @@ import ( "github.com/go-kit/log" "github.com/pkg/errors" + "github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/pkg/textparse" "github.com/prometheus/prometheus/tsdb" diff --git a/cmd/promtool/backfill_test.go b/cmd/promtool/backfill_test.go index 4bbb5602c9..932d00cca0 100644 --- a/cmd/promtool/backfill_test.go +++ b/cmd/promtool/backfill_test.go @@ -22,10 +22,11 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb" - "github.com/stretchr/testify/require" ) type backfillSample struct { diff --git a/cmd/promtool/main_test.go b/cmd/promtool/main_test.go index 138548fc75..0c2eb26d72 100644 --- a/cmd/promtool/main_test.go +++ b/cmd/promtool/main_test.go @@ -21,9 +21,10 @@ import ( "testing" "time" + "github.com/stretchr/testify/require" + "github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/pkg/rulefmt" - "github.com/stretchr/testify/require" ) func TestQueryRange(t *testing.T) { diff --git a/cmd/promtool/rules.go b/cmd/promtool/rules.go index ff98e80d8a..e05f5ca7ab 100644 --- a/cmd/promtool/rules.go +++ b/cmd/promtool/rules.go @@ -23,6 +23,7 @@ import ( "github.com/pkg/errors" v1 "github.com/prometheus/client_golang/api/prometheus/v1" "github.com/prometheus/common/model" + "github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/pkg/timestamp" "github.com/prometheus/prometheus/rules" diff --git a/cmd/promtool/rules_test.go b/cmd/promtool/rules_test.go index 868dff984f..6e51785edd 100644 --- a/cmd/promtool/rules_test.go +++ b/cmd/promtool/rules_test.go @@ -25,9 +25,10 @@ import ( "github.com/go-kit/log" v1 "github.com/prometheus/client_golang/api/prometheus/v1" "github.com/prometheus/common/model" + "github.com/stretchr/testify/require" + "github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/tsdb" - "github.com/stretchr/testify/require" ) type mockQueryRangeAPI struct { diff --git a/cmd/promtool/sd_test.go b/cmd/promtool/sd_test.go index d9d9744812..793b8ebb38 100644 --- a/cmd/promtool/sd_test.go +++ b/cmd/promtool/sd_test.go @@ -17,6 +17,7 @@ import ( "testing" "github.com/prometheus/common/model" + "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery/targetgroup" "github.com/prometheus/prometheus/pkg/labels" diff --git a/cmd/promtool/tsdb.go b/cmd/promtool/tsdb.go index 5e77802a98..6318336ce5 100644 --- a/cmd/promtool/tsdb.go +++ b/cmd/promtool/tsdb.go @@ -31,8 +31,6 @@ import ( "text/tabwriter" "time" - "github.com/prometheus/prometheus/tsdb/index" - "github.com/alecthomas/units" "github.com/go-kit/log" "github.com/pkg/errors" @@ -42,6 +40,7 @@ import ( "github.com/prometheus/prometheus/tsdb/chunks" tsdb_errors "github.com/prometheus/prometheus/tsdb/errors" "github.com/prometheus/prometheus/tsdb/fileutil" + "github.com/prometheus/prometheus/tsdb/index" ) const timeDelta = 30000 diff --git a/discovery/http/http_test.go b/discovery/http/http_test.go index b7a0369e70..896eec1beb 100644 --- a/discovery/http/http_test.go +++ b/discovery/http/http_test.go @@ -24,8 +24,9 @@ import ( "github.com/go-kit/log" "github.com/prometheus/common/config" "github.com/prometheus/common/model" - "github.com/prometheus/prometheus/discovery/targetgroup" "github.com/stretchr/testify/require" + + "github.com/prometheus/prometheus/discovery/targetgroup" ) func TestHTTPValidRefresh(t *testing.T) { diff --git a/discovery/kubernetes/endpoints.go b/discovery/kubernetes/endpoints.go index 49e515a14e..510b33f448 100644 --- a/discovery/kubernetes/endpoints.go +++ b/discovery/kubernetes/endpoints.go @@ -18,8 +18,6 @@ import ( "net" "strconv" - "github.com/prometheus/prometheus/util/strutil" - "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/pkg/errors" @@ -29,6 +27,7 @@ import ( "k8s.io/client-go/util/workqueue" "github.com/prometheus/prometheus/discovery/targetgroup" + "github.com/prometheus/prometheus/util/strutil" ) var ( diff --git a/discovery/moby/docker.go b/discovery/moby/docker.go index deabcdd1e2..162833ece4 100644 --- a/discovery/moby/docker.go +++ b/discovery/moby/docker.go @@ -28,6 +28,7 @@ import ( "github.com/go-kit/log" "github.com/prometheus/common/config" "github.com/prometheus/common/model" + "github.com/prometheus/prometheus/discovery" "github.com/prometheus/prometheus/discovery/refresh" "github.com/prometheus/prometheus/discovery/targetgroup" diff --git a/discovery/moby/network.go b/discovery/moby/network.go index 3982e57776..0e0d0041de 100644 --- a/discovery/moby/network.go +++ b/discovery/moby/network.go @@ -19,6 +19,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/client" + "github.com/prometheus/prometheus/util/strutil" ) diff --git a/discovery/puppetdb/puppetdb_test.go b/discovery/puppetdb/puppetdb_test.go index 3fcfab549c..25340bea77 100644 --- a/discovery/puppetdb/puppetdb_test.go +++ b/discovery/puppetdb/puppetdb_test.go @@ -25,8 +25,9 @@ import ( "github.com/go-kit/log" "github.com/prometheus/common/config" "github.com/prometheus/common/model" - "github.com/prometheus/prometheus/discovery/targetgroup" "github.com/stretchr/testify/require" + + "github.com/prometheus/prometheus/discovery/targetgroup" ) func mockServer(t *testing.T) *httptest.Server { diff --git a/discovery/puppetdb/resources.go b/discovery/puppetdb/resources.go index 64b3a781e6..27792b6460 100644 --- a/discovery/puppetdb/resources.go +++ b/discovery/puppetdb/resources.go @@ -18,6 +18,7 @@ import ( "strings" "github.com/prometheus/common/model" + "github.com/prometheus/prometheus/util/strutil" ) diff --git a/discovery/scaleway/baremetal.go b/discovery/scaleway/baremetal.go index 9e002b9878..c313e6695d 100644 --- a/discovery/scaleway/baremetal.go +++ b/discovery/scaleway/baremetal.go @@ -25,10 +25,11 @@ import ( "github.com/prometheus/common/config" "github.com/prometheus/common/model" "github.com/prometheus/common/version" - "github.com/prometheus/prometheus/discovery/refresh" - "github.com/prometheus/prometheus/discovery/targetgroup" "github.com/scaleway/scaleway-sdk-go/api/baremetal/v1" "github.com/scaleway/scaleway-sdk-go/scw" + + "github.com/prometheus/prometheus/discovery/refresh" + "github.com/prometheus/prometheus/discovery/targetgroup" ) type baremetalDiscovery struct { diff --git a/discovery/scaleway/instance.go b/discovery/scaleway/instance.go index a78c5e93ca..67311216d0 100644 --- a/discovery/scaleway/instance.go +++ b/discovery/scaleway/instance.go @@ -25,10 +25,11 @@ import ( "github.com/prometheus/common/config" "github.com/prometheus/common/model" "github.com/prometheus/common/version" - "github.com/prometheus/prometheus/discovery/refresh" - "github.com/prometheus/prometheus/discovery/targetgroup" "github.com/scaleway/scaleway-sdk-go/api/instance/v1" "github.com/scaleway/scaleway-sdk-go/scw" + + "github.com/prometheus/prometheus/discovery/refresh" + "github.com/prometheus/prometheus/discovery/targetgroup" ) const ( diff --git a/discovery/scaleway/scaleway.go b/discovery/scaleway/scaleway.go index 920f087a1c..ed3d7f3917 100644 --- a/discovery/scaleway/scaleway.go +++ b/discovery/scaleway/scaleway.go @@ -24,10 +24,11 @@ import ( "github.com/pkg/errors" "github.com/prometheus/common/config" "github.com/prometheus/common/model" + "github.com/scaleway/scaleway-sdk-go/scw" + "github.com/prometheus/prometheus/discovery" "github.com/prometheus/prometheus/discovery/refresh" "github.com/prometheus/prometheus/discovery/targetgroup" - "github.com/scaleway/scaleway-sdk-go/scw" ) // metaLabelPrefix is the meta prefix used for all meta labels. diff --git a/promql/parser/printer_test.go b/promql/parser/printer_test.go index e687820c92..2a7e438a22 100644 --- a/promql/parser/printer_test.go +++ b/promql/parser/printer_test.go @@ -16,9 +16,9 @@ package parser import ( "testing" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/stretchr/testify/require" + + "github.com/prometheus/prometheus/pkg/labels" ) func TestExprString(t *testing.T) { diff --git a/storage/remote/metadata_watcher.go b/storage/remote/metadata_watcher.go index 1096e406ad..eee36463b1 100644 --- a/storage/remote/metadata_watcher.go +++ b/storage/remote/metadata_watcher.go @@ -21,6 +21,7 @@ import ( "github.com/go-kit/log/level" "github.com/pkg/errors" "github.com/prometheus/common/model" + "github.com/prometheus/prometheus/scrape" ) diff --git a/storage/remote/metadata_watcher_test.go b/storage/remote/metadata_watcher_test.go index c8114fbd65..d51011a8cb 100644 --- a/storage/remote/metadata_watcher_test.go +++ b/storage/remote/metadata_watcher_test.go @@ -20,9 +20,10 @@ import ( "github.com/pkg/errors" "github.com/prometheus/common/model" + "github.com/stretchr/testify/require" + "github.com/prometheus/prometheus/pkg/textparse" "github.com/prometheus/prometheus/scrape" - "github.com/stretchr/testify/require" ) var ( diff --git a/storage/remote/queue_manager.go b/storage/remote/queue_manager.go index 8664555a5d..d76b634051 100644 --- a/storage/remote/queue_manager.go +++ b/storage/remote/queue_manager.go @@ -26,10 +26,10 @@ import ( "github.com/golang/snappy" "github.com/opentracing/opentracing-go" "github.com/opentracing/opentracing-go/ext" - "go.uber.org/atomic" - "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" + "go.uber.org/atomic" + "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/pkg/relabel" diff --git a/storage/remote/read_handler.go b/storage/remote/read_handler.go index ceea4579af..581b54a521 100644 --- a/storage/remote/read_handler.go +++ b/storage/remote/read_handler.go @@ -20,8 +20,8 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/pkg/gate" "github.com/prometheus/prometheus/pkg/labels" diff --git a/tsdb/agent/db.go b/tsdb/agent/db.go index 30d7793559..36e843e838 100644 --- a/tsdb/agent/db.go +++ b/tsdb/agent/db.go @@ -25,6 +25,8 @@ import ( "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" + "go.uber.org/atomic" + "github.com/prometheus/prometheus/pkg/exemplar" "github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/pkg/timestamp" @@ -33,7 +35,6 @@ import ( "github.com/prometheus/prometheus/tsdb" "github.com/prometheus/prometheus/tsdb/record" "github.com/prometheus/prometheus/tsdb/wal" - "go.uber.org/atomic" ) var ErrUnsupported = errors.New("unsupported operation with WAL-only storage") diff --git a/tsdb/agent/db_test.go b/tsdb/agent/db_test.go index 8f6cdc68ab..464caa75d3 100644 --- a/tsdb/agent/db_test.go +++ b/tsdb/agent/db_test.go @@ -29,12 +29,13 @@ import ( "github.com/prometheus/client_golang/prometheus" dto "github.com/prometheus/client_model/go" + "github.com/stretchr/testify/require" + "github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/storage/remote" "github.com/prometheus/prometheus/tsdb/record" "github.com/prometheus/prometheus/tsdb/tsdbutil" "github.com/prometheus/prometheus/tsdb/wal" - "github.com/stretchr/testify/require" ) func TestUnsupported(t *testing.T) { diff --git a/tsdb/exemplar.go b/tsdb/exemplar.go index 63ac512c91..53cb5c9d9e 100644 --- a/tsdb/exemplar.go +++ b/tsdb/exemplar.go @@ -20,6 +20,7 @@ import ( "unicode/utf8" "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/pkg/exemplar" "github.com/prometheus/prometheus/pkg/labels" diff --git a/tsdb/exemplar_test.go b/tsdb/exemplar_test.go index db47780fdd..7876d95634 100644 --- a/tsdb/exemplar_test.go +++ b/tsdb/exemplar_test.go @@ -22,9 +22,9 @@ import ( "strings" "testing" + "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/require" - "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/pkg/exemplar" "github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/storage" diff --git a/tsdb/head_wal.go b/tsdb/head_wal.go index 3f6416e171..4fa030a49d 100644 --- a/tsdb/head_wal.go +++ b/tsdb/head_wal.go @@ -25,18 +25,17 @@ import ( "sync" "time" - "github.com/prometheus/prometheus/pkg/labels" - "github.com/prometheus/prometheus/tsdb/chunkenc" - "github.com/prometheus/prometheus/tsdb/encoding" - tsdb_errors "github.com/prometheus/prometheus/tsdb/errors" - "github.com/prometheus/prometheus/tsdb/fileutil" - "github.com/go-kit/log/level" "github.com/pkg/errors" "go.uber.org/atomic" "github.com/prometheus/prometheus/pkg/exemplar" + "github.com/prometheus/prometheus/pkg/labels" "github.com/prometheus/prometheus/storage" + "github.com/prometheus/prometheus/tsdb/chunkenc" + "github.com/prometheus/prometheus/tsdb/encoding" + tsdb_errors "github.com/prometheus/prometheus/tsdb/errors" + "github.com/prometheus/prometheus/tsdb/fileutil" "github.com/prometheus/prometheus/tsdb/record" "github.com/prometheus/prometheus/tsdb/tombstones" "github.com/prometheus/prometheus/tsdb/wal"