diff --git a/pkg/loki/config_wrapper.go b/pkg/loki/config_wrapper.go index c6def028f7935..1d359454df8c6 100644 --- a/pkg/loki/config_wrapper.go +++ b/pkg/loki/config_wrapper.go @@ -8,7 +8,6 @@ import ( "time" cortexcache "github.com/cortexproject/cortex/pkg/chunk/cache" - "github.com/cortexproject/cortex/pkg/ruler/rulestore/local" "github.com/grafana/dskit/flagext" "github.com/pkg/errors" @@ -17,6 +16,7 @@ import ( "github.com/grafana/loki/pkg/util" "github.com/grafana/loki/pkg/util/cfg" + "github.com/grafana/loki/pkg/ruler/base/rulestore/local" loki_storage "github.com/grafana/loki/pkg/storage" chunk_storage "github.com/grafana/loki/pkg/storage/chunk/storage" loki_net "github.com/grafana/loki/pkg/util/net" diff --git a/pkg/loki/loki.go b/pkg/loki/loki.go index cbc74935e4ae5..986ef8666e345 100644 --- a/pkg/loki/loki.go +++ b/pkg/loki/loki.go @@ -10,7 +10,6 @@ import ( rt "runtime" cortex_tripper "github.com/cortexproject/cortex/pkg/querier/queryrange" - cortex_ruler "github.com/cortexproject/cortex/pkg/ruler" "github.com/cortexproject/cortex/pkg/util" util_log "github.com/cortexproject/cortex/pkg/util/log" "github.com/fatih/color" @@ -39,6 +38,7 @@ import ( "github.com/grafana/loki/pkg/querier/queryrange" "github.com/grafana/loki/pkg/querier/worker" "github.com/grafana/loki/pkg/ruler" + cortex_ruler "github.com/grafana/loki/pkg/ruler/base" "github.com/grafana/loki/pkg/ruler/rulestore" "github.com/grafana/loki/pkg/runtime" "github.com/grafana/loki/pkg/scheduler" diff --git a/pkg/loki/modules.go b/pkg/loki/modules.go index bc62810f6cffd..aa398389c0895 100644 --- a/pkg/loki/modules.go +++ b/pkg/loki/modules.go @@ -11,7 +11,6 @@ import ( "time" "github.com/NYTimes/gziphandler" - cortex_ruler "github.com/cortexproject/cortex/pkg/ruler" util_log "github.com/cortexproject/cortex/pkg/util/log" "github.com/go-kit/log/level" "github.com/grafana/dskit/kv/codec" @@ -37,6 +36,7 @@ import ( "github.com/grafana/loki/pkg/querier" "github.com/grafana/loki/pkg/querier/queryrange" "github.com/grafana/loki/pkg/ruler" + cortex_ruler "github.com/grafana/loki/pkg/ruler/base" "github.com/grafana/loki/pkg/runtime" "github.com/grafana/loki/pkg/scheduler" "github.com/grafana/loki/pkg/scheduler/schedulerpb" diff --git a/pkg/ruler/compat.go b/pkg/ruler/compat.go index b79b5bb27cb3a..1a828764b2293 100644 --- a/pkg/ruler/compat.go +++ b/pkg/ruler/compat.go @@ -8,8 +8,6 @@ import ( "strings" "time" - "github.com/cortexproject/cortex/pkg/ruler" - "github.com/cortexproject/cortex/pkg/ruler/rulespb" "github.com/go-kit/log" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" @@ -27,6 +25,8 @@ import ( "github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/pkg/logql" + ruler "github.com/grafana/loki/pkg/ruler/base" + "github.com/grafana/loki/pkg/ruler/base/rulespb" "github.com/grafana/loki/pkg/ruler/util" ) diff --git a/pkg/ruler/compat_test.go b/pkg/ruler/compat_test.go index 28313925847fb..611ca198d5928 100644 --- a/pkg/ruler/compat_test.go +++ b/pkg/ruler/compat_test.go @@ -9,12 +9,12 @@ import ( "testing" "time" - "github.com/cortexproject/cortex/pkg/ruler" "github.com/prometheus/prometheus/config" "github.com/stretchr/testify/require" "github.com/grafana/loki/pkg/iter" "github.com/grafana/loki/pkg/logql" + ruler "github.com/grafana/loki/pkg/ruler/base" "github.com/grafana/loki/pkg/validation" ) diff --git a/pkg/ruler/config.go b/pkg/ruler/config.go index 9d7e53d7eb250..29e9456972c64 100644 --- a/pkg/ruler/config.go +++ b/pkg/ruler/config.go @@ -5,11 +5,11 @@ import ( "fmt" "time" - "github.com/cortexproject/cortex/pkg/ruler" "github.com/pkg/errors" "github.com/prometheus/prometheus/config" "gopkg.in/yaml.v2" + ruler "github.com/grafana/loki/pkg/ruler/base" "github.com/grafana/loki/pkg/ruler/storage/cleaner" "github.com/grafana/loki/pkg/ruler/storage/instance" ) diff --git a/pkg/ruler/ruler.go b/pkg/ruler/ruler.go index 0e4f06b0a5836..bee2ab50ce998 100644 --- a/pkg/ruler/ruler.go +++ b/pkg/ruler/ruler.go @@ -1,8 +1,8 @@ package ruler import ( - "github.com/cortexproject/cortex/pkg/ruler" "github.com/go-kit/log" + ruler "github.com/grafana/loki/pkg/ruler/base" "github.com/prometheus/client_golang/prometheus" "github.com/grafana/loki/pkg/logql" diff --git a/pkg/ruler/rulestore/local/local.go b/pkg/ruler/rulestore/local/local.go index 080e2941476b4..7e925314389fc 100644 --- a/pkg/ruler/rulestore/local/local.go +++ b/pkg/ruler/rulestore/local/local.go @@ -10,7 +10,7 @@ import ( "github.com/pkg/errors" promRules "github.com/prometheus/prometheus/rules" - "github.com/cortexproject/cortex/pkg/ruler/rulespb" + "github.com/grafana/loki/pkg/ruler/base/rulespb" ) const ( diff --git a/pkg/ruler/rulestore/store.go b/pkg/ruler/rulestore/store.go index d8b97ed05a779..05b11e5098866 100644 --- a/pkg/ruler/rulestore/store.go +++ b/pkg/ruler/rulestore/store.go @@ -4,7 +4,7 @@ import ( "context" "errors" - "github.com/cortexproject/cortex/pkg/ruler/rulespb" + "github.com/grafana/loki/pkg/ruler/base/rulespb" ) var ( diff --git a/pkg/storage/chunk/local/fs_object_client.go b/pkg/storage/chunk/local/fs_object_client.go index 51c5fb3e931f8..c60797d3f1837 100644 --- a/pkg/storage/chunk/local/fs_object_client.go +++ b/pkg/storage/chunk/local/fs_object_client.go @@ -13,9 +13,9 @@ import ( "github.com/pkg/errors" "github.com/thanos-io/thanos/pkg/runutil" - cortex_local "github.com/cortexproject/cortex/pkg/ruler/rulestore/local" util_log "github.com/cortexproject/cortex/pkg/util/log" + "github.com/grafana/loki/pkg/ruler/rulestore/local" "github.com/grafana/loki/pkg/storage/chunk" "github.com/grafana/loki/pkg/storage/chunk/util" ) @@ -35,8 +35,8 @@ func (cfg *FSConfig) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet) { f.StringVar(&cfg.Directory, prefix+"local.chunk-directory", "", "Directory to store chunks in.") } -func (cfg *FSConfig) ToCortexLocalConfig() cortex_local.Config { - return cortex_local.Config{ +func (cfg *FSConfig) ToCortexLocalConfig() local.Config { + return local.Config{ Directory: cfg.Directory, } }