Skip to content

Commit

Permalink
Update Cortex and remove usage of Prometheus fork. (#4898)
Browse files Browse the repository at this point in the history
* Update Cortex and remove usage of Prometheus fork.

Signed-off-by: Peter Štibraný <pstibrany@gmail.com>

* Fix tests.

Signed-off-by: Peter Štibraný <pstibrany@gmail.com>

* Fix tests.

Signed-off-by: Peter Štibraný <pstibrany@gmail.com>

* Replace github.com/go-kit/kit/log -> github.com/go-kit/log to make linter happy.

Signed-off-by: Peter Štibraný <pstibrany@gmail.com>

* Use github.com/go-kit/log

Signed-off-by: Peter Štibraný <pstibrany@gmail.com>
  • Loading branch information
pstibrany committed Nov 25, 2021
1 parent 7cda7cc commit 19dcc79
Show file tree
Hide file tree
Showing 180 changed files with 415 additions and 385 deletions.
2 changes: 1 addition & 1 deletion .errcheck_excludes.txt
@@ -1,3 +1,3 @@
(github.com/go-kit/kit/log.Logger).Log
(github.com/go-kit/log.Logger).Log
fmt.Fprintln
fmt.Fprint
4 changes: 2 additions & 2 deletions cmd/thanos/compact.go
Expand Up @@ -15,8 +15,8 @@ import (

"github.com/alecthomas/units"
extflag "github.com/efficientgo/tools/extkingpin"
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/oklog/run"
"github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
Expand Down
4 changes: 2 additions & 2 deletions cmd/thanos/downsample.go
Expand Up @@ -11,8 +11,8 @@ import (
"time"

extflag "github.com/efficientgo/tools/extkingpin"
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/oklog/run"
"github.com/oklog/ulid"
"github.com/pkg/errors"
Expand Down
9 changes: 5 additions & 4 deletions cmd/thanos/main.go
Expand Up @@ -14,19 +14,20 @@ import (
"runtime/debug"
"syscall"

"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/oklog/run"
"github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/collectors"
"github.com/prometheus/common/version"
"go.uber.org/automaxprocs/maxprocs"
"gopkg.in/alecthomas/kingpin.v2"

"github.com/thanos-io/thanos/pkg/extkingpin"
"github.com/thanos-io/thanos/pkg/logging"
"github.com/thanos-io/thanos/pkg/tracing/client"
"go.uber.org/automaxprocs/maxprocs"
"gopkg.in/alecthomas/kingpin.v2"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/thanos/main_test.go
Expand Up @@ -11,7 +11,7 @@ import (
"testing"
"time"

"github.com/go-kit/kit/log"
"github.com/go-kit/log"
"github.com/oklog/ulid"
"github.com/prometheus/client_golang/prometheus"
promtest "github.com/prometheus/client_golang/prometheus/testutil"
Expand Down
4 changes: 2 additions & 2 deletions cmd/thanos/query.go
Expand Up @@ -12,8 +12,8 @@ import (
"strings"
"time"

"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
grpc_logging "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags"
"github.com/oklog/run"
Expand Down
5 changes: 3 additions & 2 deletions cmd/thanos/query_frontend.go
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/cortexproject/cortex/pkg/frontend/transport"
"github.com/cortexproject/cortex/pkg/querier/queryrange"
cortexvalidation "github.com/cortexproject/cortex/pkg/util/validation"
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/oklog/run"
"github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
Expand All @@ -22,6 +22,7 @@ import (
"gopkg.in/yaml.v2"

extflag "github.com/efficientgo/tools/extkingpin"

"github.com/thanos-io/thanos/pkg/api"
"github.com/thanos-io/thanos/pkg/component"
"github.com/thanos-io/thanos/pkg/exthttp"
Expand Down
4 changes: 2 additions & 2 deletions cmd/thanos/receive.go
Expand Up @@ -11,8 +11,8 @@ import (
"time"

extflag "github.com/efficientgo/tools/extkingpin"
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
grpc_logging "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags"
"github.com/oklog/run"
Expand Down
4 changes: 2 additions & 2 deletions cmd/thanos/rule.go
Expand Up @@ -16,8 +16,8 @@ import (
"time"

extflag "github.com/efficientgo/tools/extkingpin"
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
grpc_logging "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags"
"github.com/oklog/run"
Expand Down
4 changes: 2 additions & 2 deletions cmd/thanos/sidecar.go
Expand Up @@ -11,8 +11,8 @@ import (
"time"

extflag "github.com/efficientgo/tools/extkingpin"
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
grpc_logging "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags"
"github.com/oklog/run"
Expand Down
5 changes: 3 additions & 2 deletions cmd/thanos/store.go
Expand Up @@ -9,8 +9,8 @@ import (
"time"

"github.com/alecthomas/units"
"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
grpclogging "github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/logging"
"github.com/grpc-ecosystem/go-grpc-middleware/v2/interceptors/tags"
"github.com/oklog/run"
Expand All @@ -22,6 +22,7 @@ import (
commonmodel "github.com/prometheus/common/model"

extflag "github.com/efficientgo/tools/extkingpin"

blocksAPI "github.com/thanos-io/thanos/pkg/api/blocks"
"github.com/thanos-io/thanos/pkg/block"
"github.com/thanos-io/thanos/pkg/block/metadata"
Expand Down
5 changes: 3 additions & 2 deletions cmd/thanos/tools.go
Expand Up @@ -7,12 +7,13 @@ import (
"os"
"path/filepath"

"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/oklog/run"
"github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"

"github.com/thanos-io/thanos/pkg/errutil"
"github.com/thanos-io/thanos/pkg/extkingpin"
"github.com/thanos-io/thanos/pkg/rules"
Expand Down
4 changes: 2 additions & 2 deletions cmd/thanos/tools_bucket.go
Expand Up @@ -20,8 +20,8 @@ import (
"text/template"
"time"

"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/oklog/run"
"github.com/oklog/ulid"
"github.com/olekukonko/tablewriter"
Expand Down
3 changes: 2 additions & 1 deletion cmd/thanos/tools_test.go
Expand Up @@ -6,7 +6,8 @@ package main
import (
"testing"

"github.com/go-kit/kit/log"
"github.com/go-kit/log"

"github.com/thanos-io/thanos/pkg/testutil"
)

Expand Down
10 changes: 4 additions & 6 deletions go.mod
Expand Up @@ -17,7 +17,7 @@ require (
github.com/cespare/xxhash/v2 v2.1.2
github.com/chromedp/cdproto v0.0.0-20200424080200-0de008e41fa0
github.com/chromedp/chromedp v0.5.3
github.com/cortexproject/cortex v1.10.1-0.20211006150606-fb15b432e267
github.com/cortexproject/cortex v1.10.1-0.20211124141505-4e9fc3a2b5ab
github.com/davecgh/go-spew v1.1.1
github.com/efficientgo/e2e v0.11.2-0.20211027134903-67d538984a47
github.com/efficientgo/tools/core v0.0.0-20210829154005-c7bad8450208
Expand All @@ -27,7 +27,7 @@ require (
github.com/felixge/fgprof v0.9.1
github.com/fortytw2/leaktest v1.3.0
github.com/fsnotify/fsnotify v1.5.1
github.com/go-kit/kit v0.11.0
github.com/go-kit/log v0.2.0
github.com/go-openapi/strfmt v0.21.0
github.com/gogo/protobuf v1.3.2
github.com/gogo/status v1.1.0
Expand Down Expand Up @@ -63,7 +63,7 @@ require (
github.com/tencentyun/cos-go-sdk-v5 v0.7.31
github.com/uber/jaeger-client-go v2.29.1+incompatible
github.com/uber/jaeger-lib v2.4.1+incompatible
github.com/weaveworks/common v0.0.0-20210901124008-1fa3f9fa874c
github.com/weaveworks/common v0.0.0-20210913144402-035033b78a78
go.elastic.co/apm v1.11.0
go.elastic.co/apm/module/apmot v1.11.0
go.uber.org/atomic v1.9.0
Expand Down Expand Up @@ -95,9 +95,7 @@ replace (
// TODO: Remove this: https://github.com/thanos-io/thanos/issues/3967.
github.com/minio/minio-go/v7 => github.com/bwplotka/minio-go/v7 v7.0.11-0.20210324165441-f9927e5255a6
// Make sure Prometheus version is pinned as Prometheus semver does not include Go APIs.
// github.com/prometheus/prometheus => github.com/prometheus/prometheus v1.8.2-0.20211119115433-692a54649ed7
// Custom fork with missing packages required to update to pass. (From https://github.com/prometheus/prometheus/pull/9824)
github.com/prometheus/prometheus => github.com/pstibrany/prometheus v1.8.2-0.20211119145100-0bfb0c12cbb5
github.com/prometheus/prometheus => github.com/prometheus/prometheus v1.8.2-0.20211119115433-692a54649ed7
github.com/sercand/kuberesolver => github.com/sercand/kuberesolver v2.4.0+incompatible
google.golang.org/grpc => google.golang.org/grpc v1.40.0

Expand Down

0 comments on commit 19dcc79

Please sign in to comment.