Skip to content

Commit

Permalink
Use forked cortex ruler instead of vendored.
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanGuedes committed Jan 10, 2022
1 parent 02d72df commit b08e618
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion pkg/loki/config_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion pkg/loki/loki.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion pkg/loki/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions pkg/ruler/compat.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/ruler/compat_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/ruler/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/ruler/ruler.go
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion pkg/ruler/rulestore/local/local.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion pkg/ruler/rulestore/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"errors"

"github.com/cortexproject/cortex/pkg/ruler/rulespb"
"github.com/grafana/loki/pkg/ruler/base/rulespb"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions pkg/storage/chunk/local/fs_object_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand All @@ -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,
}
}
Expand Down

0 comments on commit b08e618

Please sign in to comment.