From 6dce98870d8c5c7054b3444d2fe4e66dad262a53 Mon Sep 17 00:00:00 2001 From: Michel Hollands <42814411+MichelHollands@users.noreply.github.com> Date: Thu, 18 Apr 2024 15:31:26 +0100 Subject: [PATCH] fix: Fix the lokitool imports (#12673) Signed-off-by: Michel Hollands --- cmd/lokitool/main.go | 2 +- pkg/tool/client/rules.go | 2 +- pkg/tool/commands/rules.go | 8 ++++---- pkg/tool/commands/rules_test.go | 2 +- pkg/tool/printer/printer.go | 4 ++-- pkg/tool/printer/printer_test.go | 2 +- pkg/tool/rules/compare.go | 2 +- pkg/tool/rules/compare_test.go | 2 +- pkg/tool/rules/parser.go | 2 +- pkg/tool/rules/parser_test.go | 2 +- pkg/tool/rules/rules.go | 4 ++-- pkg/tool/rules/rules_test.go | 2 +- 12 files changed, 17 insertions(+), 17 deletions(-) diff --git a/cmd/lokitool/main.go b/cmd/lokitool/main.go index 155705b07afa..6b52fb0a3d65 100644 --- a/cmd/lokitool/main.go +++ b/cmd/lokitool/main.go @@ -8,7 +8,7 @@ import ( "github.com/prometheus/common/version" - "github.com/grafana/loki/pkg/tool/commands" + "github.com/grafana/loki/v3/pkg/tool/commands" ) var ( diff --git a/pkg/tool/client/rules.go b/pkg/tool/client/rules.go index 40dd0e1a292b..d662794d8125 100644 --- a/pkg/tool/client/rules.go +++ b/pkg/tool/client/rules.go @@ -10,7 +10,7 @@ import ( log "github.com/sirupsen/logrus" "gopkg.in/yaml.v3" - "github.com/grafana/loki/pkg/tool/rules/rwrulefmt" + "github.com/grafana/loki/v3/pkg/tool/rules/rwrulefmt" ) // CreateRuleGroup creates a new rule group diff --git a/pkg/tool/commands/rules.go b/pkg/tool/commands/rules.go index d1e16c026b2a..4abc14162edd 100644 --- a/pkg/tool/commands/rules.go +++ b/pkg/tool/commands/rules.go @@ -15,10 +15,10 @@ import ( "gopkg.in/alecthomas/kingpin.v2" yamlv3 "gopkg.in/yaml.v3" - "github.com/grafana/loki/pkg/tool/client" - "github.com/grafana/loki/pkg/tool/printer" - "github.com/grafana/loki/pkg/tool/rules" - "github.com/grafana/loki/pkg/tool/rules/rwrulefmt" + "github.com/grafana/loki/v3/pkg/tool/client" + "github.com/grafana/loki/v3/pkg/tool/printer" + "github.com/grafana/loki/v3/pkg/tool/rules" + "github.com/grafana/loki/v3/pkg/tool/rules/rwrulefmt" ) const ( diff --git a/pkg/tool/commands/rules_test.go b/pkg/tool/commands/rules_test.go index d1878f856cf5..fe27da35f9d3 100644 --- a/pkg/tool/commands/rules_test.go +++ b/pkg/tool/commands/rules_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "gopkg.in/yaml.v3" - "github.com/grafana/loki/pkg/tool/rules/rwrulefmt" + "github.com/grafana/loki/v3/pkg/tool/rules/rwrulefmt" ) func TestCheckDuplicates(t *testing.T) { diff --git a/pkg/tool/printer/printer.go b/pkg/tool/printer/printer.go index f85bd835a85d..084d483a07a4 100644 --- a/pkg/tool/printer/printer.go +++ b/pkg/tool/printer/printer.go @@ -13,8 +13,8 @@ import ( "github.com/mitchellh/colorstring" "gopkg.in/yaml.v3" - "github.com/grafana/loki/pkg/tool/rules" - "github.com/grafana/loki/pkg/tool/rules/rwrulefmt" + "github.com/grafana/loki/v3/pkg/tool/rules" + "github.com/grafana/loki/v3/pkg/tool/rules/rwrulefmt" ) // Printer is used for printing formatted output from the cortextool diff --git a/pkg/tool/printer/printer_test.go b/pkg/tool/printer/printer_test.go index 5c9a84899cd3..c8650d9bd610 100644 --- a/pkg/tool/printer/printer_test.go +++ b/pkg/tool/printer/printer_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/tool/rules/rwrulefmt" + "github.com/grafana/loki/v3/pkg/tool/rules/rwrulefmt" ) func TestPrintRuleSet(t *testing.T) { diff --git a/pkg/tool/rules/compare.go b/pkg/tool/rules/compare.go index 728726037acb..2d64c534e88d 100644 --- a/pkg/tool/rules/compare.go +++ b/pkg/tool/rules/compare.go @@ -10,7 +10,7 @@ import ( "github.com/prometheus/prometheus/model/rulefmt" yaml "gopkg.in/yaml.v3" - "github.com/grafana/loki/pkg/tool/rules/rwrulefmt" + "github.com/grafana/loki/v3/pkg/tool/rules/rwrulefmt" ) var ( diff --git a/pkg/tool/rules/compare_test.go b/pkg/tool/rules/compare_test.go index 0dfda624489b..4df1aa2ee67a 100644 --- a/pkg/tool/rules/compare_test.go +++ b/pkg/tool/rules/compare_test.go @@ -6,7 +6,7 @@ import ( "github.com/prometheus/prometheus/model/rulefmt" yaml "gopkg.in/yaml.v3" - "github.com/grafana/loki/pkg/tool/rules/rwrulefmt" + "github.com/grafana/loki/v3/pkg/tool/rules/rwrulefmt" ) func Test_rulesEqual(t *testing.T) { diff --git a/pkg/tool/rules/parser.go b/pkg/tool/rules/parser.go index f4017c049f6e..aa8f83363009 100644 --- a/pkg/tool/rules/parser.go +++ b/pkg/tool/rules/parser.go @@ -12,7 +12,7 @@ import ( log "github.com/sirupsen/logrus" yaml "gopkg.in/yaml.v3" - "github.com/grafana/loki/pkg/ruler" + "github.com/grafana/loki/v3/pkg/ruler" ) const ( diff --git a/pkg/tool/rules/parser_test.go b/pkg/tool/rules/parser_test.go index 68f9ff6d70f8..35db097486a8 100644 --- a/pkg/tool/rules/parser_test.go +++ b/pkg/tool/rules/parser_test.go @@ -6,7 +6,7 @@ import ( "github.com/prometheus/prometheus/model/rulefmt" - "github.com/grafana/loki/pkg/tool/rules/rwrulefmt" + "github.com/grafana/loki/v3/pkg/tool/rules/rwrulefmt" ) func TestParseFiles(t *testing.T) { diff --git a/pkg/tool/rules/rules.go b/pkg/tool/rules/rules.go index e2c216317c54..eccfbdabe45a 100644 --- a/pkg/tool/rules/rules.go +++ b/pkg/tool/rules/rules.go @@ -8,9 +8,9 @@ import ( "github.com/prometheus/prometheus/promql/parser" log "github.com/sirupsen/logrus" - logql "github.com/grafana/loki/pkg/logql/syntax" + logql "github.com/grafana/loki/v3/pkg/logql/syntax" - "github.com/grafana/loki/pkg/tool/rules/rwrulefmt" + "github.com/grafana/loki/v3/pkg/tool/rules/rwrulefmt" ) // RuleNamespace is used to parse a slightly modified prometheus diff --git a/pkg/tool/rules/rules_test.go b/pkg/tool/rules/rules_test.go index 690316db2d18..fba13040d49b 100644 --- a/pkg/tool/rules/rules_test.go +++ b/pkg/tool/rules/rules_test.go @@ -8,7 +8,7 @@ import ( "gopkg.in/yaml.v3" "gotest.tools/assert" - "github.com/grafana/loki/pkg/tool/rules/rwrulefmt" + "github.com/grafana/loki/v3/pkg/tool/rules/rwrulefmt" ) func TestAggregateBy(t *testing.T) {