Upgrade Cortex, Prometheus and Thanos (#4830)

* Upgrade Cortex, Prometheus and Thanos

Signed-off-by: Marco Pracucci <marco@pracucci.com>

* Fixed imported ordering

Signed-off-by: Marco Pracucci <marco@pracucci.com>

* Fixed data type used for series ref when recovering from checkpoint/WAL

Signed-off-by: Marco Pracucci <marco@pracucci.com>

* Upgraded Thanos to fix arm build

Signed-off-by: Marco Pracucci <marco@pracucci.com>

* Run go mod tidy

Signed-off-by: Marco Pracucci <marco@pracucci.com>
pull/4842/head
Marco Pracucci 4 years ago committed by GitHub
parent 1b63331e3d
commit c53457feb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      clients/cmd/docker-driver/config.go
  2. 2
      clients/pkg/logentry/logql/ast.go
  3. 2
      clients/pkg/logentry/logql/expr.y
  4. 2
      clients/pkg/logentry/logql/expr.y.go
  5. 2
      clients/pkg/logentry/logql/parser.go
  6. 2
      clients/pkg/logentry/logql/parser_test.go
  7. 2
      clients/pkg/logentry/stages/match.go
  8. 4
      clients/pkg/promtail/promtail_test.go
  9. 2
      clients/pkg/promtail/scrapeconfig/scrapeconfig.go
  10. 2
      clients/pkg/promtail/server/ui/assets_generate.go
  11. 2
      clients/pkg/promtail/server/ui/doc.go
  12. 4
      clients/pkg/promtail/targets/file/filetargetmanager.go
  13. 4
      clients/pkg/promtail/targets/gcplog/formatter.go
  14. 2
      clients/pkg/promtail/targets/gcplog/formatter_test.go
  15. 2
      clients/pkg/promtail/targets/gcplog/target.go
  16. 4
      clients/pkg/promtail/targets/gelf/gelftarget.go
  17. 2
      clients/pkg/promtail/targets/gelf/gelftarget_test.go
  18. 4
      clients/pkg/promtail/targets/journal/journaltarget.go
  19. 2
      clients/pkg/promtail/targets/journal/journaltarget_test.go
  20. 4
      clients/pkg/promtail/targets/kafka/formatter.go
  21. 4
      clients/pkg/promtail/targets/kafka/target.go
  22. 2
      clients/pkg/promtail/targets/kafka/target_syncer.go
  23. 2
      clients/pkg/promtail/targets/kafka/target_syncer_test.go
  24. 2
      clients/pkg/promtail/targets/kafka/target_test.go
  25. 4
      clients/pkg/promtail/targets/lokipush/pushtarget.go
  26. 2
      clients/pkg/promtail/targets/lokipush/pushtarget_test.go
  27. 4
      clients/pkg/promtail/targets/syslog/syslogtarget.go
  28. 2
      clients/pkg/promtail/targets/syslog/syslogtarget_test.go
  29. 4
      clients/pkg/promtail/targets/windows/target.go
  30. 2
      cmd/migrate/main.go
  31. 72
      go.mod
  32. 651
      go.sum
  33. 2
      pkg/chunkenc/memchunk.go
  34. 2
      pkg/chunkenc/memchunk_test.go
  35. 2
      pkg/chunkenc/pool.go
  36. 2
      pkg/chunkenc/unordered.go
  37. 2
      pkg/distributor/validator.go
  38. 2
      pkg/distributor/validator_test.go
  39. 2
      pkg/ingester/checkpoint.go
  40. 2
      pkg/ingester/checkpoint_test.go
  41. 2
      pkg/ingester/chunk_test.go
  42. 9
      pkg/ingester/encoding.go
  43. 2
      pkg/ingester/encoding_test.go
  44. 2
      pkg/ingester/flush.go
  45. 2
      pkg/ingester/flush_test.go
  46. 2
      pkg/ingester/index/index.go
  47. 2
      pkg/ingester/index/index_test.go
  48. 2
      pkg/ingester/ingester.go
  49. 2
      pkg/ingester/ingester_test.go
  50. 5
      pkg/ingester/instance.go
  51. 2
      pkg/ingester/instance_test.go
  52. 2
      pkg/ingester/mapper.go
  53. 2
      pkg/ingester/mapper_test.go
  54. 5
      pkg/ingester/recovery.go
  55. 13
      pkg/ingester/recovery_test.go
  56. 2
      pkg/ingester/stream.go
  57. 2
      pkg/ingester/stream_test.go
  58. 2
      pkg/ingester/tailer.go
  59. 2
      pkg/ingester/tailer_test.go
  60. 2
      pkg/ingester/transfer.go
  61. 2
      pkg/logcli/client/file.go
  62. 2
      pkg/loghttp/push/push.go
  63. 2
      pkg/logproto/extensions.go
  64. 2
      pkg/logql/ast.go
  65. 2
      pkg/logql/ast_test.go
  66. 2
      pkg/logql/engine.go
  67. 2
      pkg/logql/engine_test.go
  68. 2
      pkg/logql/evaluator.go
  69. 2
      pkg/logql/expr.y
  70. 2
      pkg/logql/expr.y.go
  71. 2
      pkg/logql/log/filter.go
  72. 2
      pkg/logql/log/fmt_test.go
  73. 2
      pkg/logql/log/ip.go
  74. 2
      pkg/logql/log/ip_test.go
  75. 2
      pkg/logql/log/label_filter.go
  76. 2
      pkg/logql/log/label_filter_test.go
  77. 2
      pkg/logql/log/labels.go
  78. 2
      pkg/logql/log/labels_test.go
  79. 2
      pkg/logql/log/metrics_extraction.go
  80. 2
      pkg/logql/log/metrics_extraction_test.go
  81. 2
      pkg/logql/log/parser_hints_test.go
  82. 2
      pkg/logql/log/parser_test.go
  83. 2
      pkg/logql/log/pipeline.go
  84. 2
      pkg/logql/log/pipeline_test.go
  85. 2
      pkg/logql/matrix_test.go
  86. 2
      pkg/logql/parser.go
  87. 2
      pkg/logql/parser_test.go
  88. 2
      pkg/logql/range_vector.go
  89. 2
      pkg/logql/shardmapper_test.go
  90. 2
      pkg/logql/test_utils.go
  91. 2
      pkg/logql/walk_test.go
  92. 2
      pkg/logqlmodel/error.go
  93. 2
      pkg/loki/runtime_config_test.go
  94. 2
      pkg/querier/http.go
  95. 2
      pkg/querier/ingester_querier.go
  96. 2
      pkg/querier/ingester_querier_test.go
  97. 2
      pkg/querier/querier_mock_test.go
  98. 4
      pkg/querier/queryrange/codec.go
  99. 8
      pkg/querier/queryrange/codec_test.go
  100. 2
      pkg/querier/queryrange/downstreamer.go
  101. Some files were not shown because too many files have changed in this diff Show More

@ -16,8 +16,8 @@ import (
"github.com/grafana/dskit/flagext"
"github.com/pkg/errors"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/pkg/relabel"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/model/relabel"
"gopkg.in/yaml.v2"
"github.com/grafana/loki/clients/pkg/logentry/stages"

@ -5,7 +5,7 @@ import (
"fmt"
"regexp"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
)
// Filter is a line filter sent to a querier to filter out log line.

@ -2,7 +2,7 @@
package logql
import (
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
)
%}

@ -5,7 +5,7 @@ package logql
import __yyfmt__ "fmt"
import (
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
)
type exprSymType struct {

@ -7,7 +7,7 @@ import (
"strings"
"text/scanner"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
)
func init() {

@ -5,7 +5,7 @@ import (
"testing"
"text/scanner"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/stretchr/testify/require"
)

@ -1,7 +1,7 @@
package stages
import (
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/go-kit/log"
"github.com/mitchellh/mapstructure"

@ -25,8 +25,8 @@ import (
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/discovery"
"github.com/prometheus/prometheus/discovery/targetgroup"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/pkg/textparse"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/model/textparse"
"github.com/prometheus/prometheus/promql/parser"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

@ -24,7 +24,7 @@ import (
"github.com/prometheus/prometheus/discovery/openstack"
"github.com/prometheus/prometheus/discovery/triton"
"github.com/prometheus/prometheus/discovery/zookeeper"
"github.com/prometheus/prometheus/pkg/relabel"
"github.com/prometheus/prometheus/model/relabel"
"github.com/weaveworks/common/server"
"github.com/grafana/loki/clients/pkg/logentry/stages"

@ -7,7 +7,7 @@ import (
"log"
"time"
"github.com/prometheus/prometheus/pkg/modtimevfs"
"github.com/prometheus/prometheus/util/modtimevfs"
"github.com/shurcooL/vfsgen"
"github.com/grafana/loki/clients/pkg/promtail/server/ui"

@ -3,7 +3,7 @@ package ui
import (
// The blank import is to make Go modules happy.
_ "github.com/prometheus/prometheus/pkg/modtimevfs"
_ "github.com/prometheus/prometheus/util/modtimevfs"
_ "github.com/shurcooL/vfsgen"
)

@ -17,8 +17,8 @@ import (
"github.com/prometheus/prometheus/discovery"
"github.com/prometheus/prometheus/discovery/kubernetes"
"github.com/prometheus/prometheus/discovery/targetgroup"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/pkg/relabel"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/model/relabel"
"github.com/grafana/loki/clients/pkg/logentry/stages"
"github.com/grafana/loki/clients/pkg/promtail/api"

@ -8,8 +8,8 @@ import (
"cloud.google.com/go/pubsub"
json "github.com/json-iterator/go"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/pkg/relabel"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/model/relabel"
"github.com/grafana/loki/clients/pkg/promtail/api"

@ -6,7 +6,7 @@ import (
"cloud.google.com/go/pubsub"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/relabel"
"github.com/prometheus/prometheus/model/relabel"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

@ -8,7 +8,7 @@ import (
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/relabel"
"github.com/prometheus/prometheus/model/relabel"
"github.com/grafana/loki/clients/pkg/promtail/api"
"github.com/grafana/loki/clients/pkg/promtail/scrapeconfig"

@ -10,8 +10,8 @@ import (
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/pkg/relabel"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/model/relabel"
"gopkg.in/Graylog2/go-gelf.v2/gelf"
"github.com/grafana/loki/clients/pkg/promtail/api"

@ -8,7 +8,7 @@ import (
"github.com/grafana/loki/clients/pkg/promtail/client/fake"
"github.com/grafana/loki/clients/pkg/promtail/scrapeconfig"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/relabel"
"github.com/prometheus/prometheus/model/relabel"
"github.com/stretchr/testify/require"
"gopkg.in/Graylog2/go-gelf.v2/gelf"
)

@ -17,8 +17,8 @@ import (
jsoniter "github.com/json-iterator/go"
"github.com/pkg/errors"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/pkg/relabel"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/model/relabel"
"github.com/grafana/loki/clients/pkg/promtail/api"
"github.com/grafana/loki/clients/pkg/promtail/positions"

@ -11,7 +11,7 @@ import (
"github.com/coreos/go-systemd/sdjournal"
"github.com/go-kit/log"
"github.com/prometheus/prometheus/pkg/relabel"
"github.com/prometheus/prometheus/model/relabel"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gopkg.in/yaml.v2"

@ -4,8 +4,8 @@ import (
"strings"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/pkg/relabel"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/model/relabel"
"github.com/grafana/loki/pkg/util"
)

@ -4,8 +4,8 @@ import (
"fmt"
"time"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/pkg/relabel"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/model/relabel"
"github.com/Shopify/sarama"
"github.com/prometheus/common/model"

@ -16,7 +16,7 @@ import (
"github.com/grafana/loki/clients/pkg/promtail/targets/target"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/grafana/loki/pkg/util"
)

@ -15,7 +15,7 @@ import (
"github.com/grafana/loki/clients/pkg/promtail/scrapeconfig"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/relabel"
"github.com/prometheus/prometheus/model/relabel"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

@ -10,7 +10,7 @@ import (
"github.com/Shopify/sarama"
"github.com/grafana/loki/clients/pkg/promtail/client/fake"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/relabel"
"github.com/prometheus/prometheus/model/relabel"
"github.com/stretchr/testify/require"
"go.uber.org/atomic"
)

@ -15,8 +15,8 @@ import (
"github.com/go-kit/log/level"
"github.com/imdario/mergo"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/pkg/relabel"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/model/relabel"
promql_parser "github.com/prometheus/prometheus/promql/parser"
"github.com/weaveworks/common/server"

@ -15,7 +15,7 @@ import (
"github.com/grafana/dskit/flagext"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/relabel"
"github.com/prometheus/prometheus/model/relabel"
"github.com/stretchr/testify/require"
"github.com/weaveworks/common/server"

@ -19,8 +19,8 @@ import (
"github.com/influxdata/go-syslog/v3/rfc5424"
"github.com/mwitkow/go-conntrack"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/pkg/relabel"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/model/relabel"
"github.com/grafana/loki/clients/pkg/promtail/api"
"github.com/grafana/loki/clients/pkg/promtail/scrapeconfig"

@ -15,7 +15,7 @@ import (
"github.com/go-kit/log"
promconfig "github.com/prometheus/common/config"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/relabel"
"github.com/prometheus/prometheus/model/relabel"
"github.com/stretchr/testify/require"
"gopkg.in/yaml.v2"

@ -13,11 +13,11 @@ import (
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/relabel"
"github.com/prometheus/prometheus/model/relabel"
"github.com/spf13/afero"
"golang.org/x/sys/windows"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/grafana/loki/clients/pkg/promtail/api"
"github.com/grafana/loki/clients/pkg/promtail/scrapeconfig"

@ -17,7 +17,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/weaveworks/common/user"
"github.com/grafana/loki/pkg/logql"

@ -13,7 +13,7 @@ require (
github.com/Shopify/sarama v1.30.0
github.com/Workiva/go-datastructures v1.0.53
github.com/alicebob/miniredis/v2 v2.14.3
github.com/aws/aws-sdk-go v1.40.45
github.com/aws/aws-sdk-go v1.42.10
github.com/bmatcuk/doublestar v1.2.2
github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b
github.com/buger/jsonparser v1.1.1
@ -21,9 +21,9 @@ require (
github.com/cespare/xxhash v1.1.0
github.com/cespare/xxhash/v2 v2.1.2
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf
github.com/cortexproject/cortex v1.10.1-0.20211104100946-3f329a21cad4
github.com/cortexproject/cortex v1.10.1-0.20211124141505-4e9fc3a2b5ab
github.com/davecgh/go-spew v1.1.1
github.com/docker/docker v20.10.8+incompatible
github.com/docker/docker v20.10.11+incompatible
github.com/docker/go-plugins-helpers v0.0.0-20181025120712-1e6269c305b8
github.com/drone/envsubst v1.0.2
github.com/dustin/go-humanize v1.0.0
@ -46,10 +46,10 @@ require (
github.com/grafana/dskit v0.0.0-20211021180445-3bd016e9d7f1
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645
github.com/hashicorp/consul/api v1.10.1
github.com/hashicorp/consul/api v1.11.0
github.com/hashicorp/golang-lru v0.5.4
github.com/hpcloud/tail v1.0.0
github.com/imdario/mergo v0.3.11
github.com/imdario/mergo v0.3.12
github.com/influxdata/go-syslog/v3 v3.0.1-0.20201128200927-a1889d947b48
github.com/influxdata/telegraf v1.16.3
github.com/jmespath/go-jmespath v0.4.0
@ -72,13 +72,13 @@ require (
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.11.0
github.com/prometheus/client_model v0.2.0
github.com/prometheus/common v0.31.1
github.com/prometheus/prometheus v1.8.2-0.20211011171444-354d8d2ecfac
github.com/prometheus/common v0.32.1
github.com/prometheus/prometheus v1.8.2-0.20211125113755-2a3d62ac8456
github.com/segmentio/fasthash v1.0.2
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546
github.com/sony/gobreaker v0.4.1
github.com/spf13/afero v1.3.4
github.com/spf13/afero v1.6.0
github.com/stretchr/testify v1.7.0
github.com/thanos-io/thanos v0.22.0
github.com/tonistiigi/fifo v0.0.0-20190226154929-a9fb20d87448
@ -86,13 +86,13 @@ require (
github.com/weaveworks/common v0.0.0-20211015155308-ebe5bdc2c89e
go.etcd.io/bbolt v1.3.6
go.uber.org/atomic v1.9.0
go.uber.org/goleak v1.1.11-0.20210813005559-691160354723
go.uber.org/goleak v1.1.12
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519
golang.org/x/net v0.0.0-20211101193420-4a448f8816b3
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
golang.org/x/sys v0.0.0-20210917161153-d61c044b1678
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac
google.golang.org/api v0.57.0
google.golang.org/api v0.60.0
google.golang.org/grpc v1.40.0
gopkg.in/alecthomas/kingpin.v2 v2.2.6
gopkg.in/fsnotify.v1 v1.4.7
@ -108,13 +108,13 @@ require (
)
require (
cloud.google.com/go v0.94.1 // indirect
cloud.google.com/go v0.97.0 // indirect
cloud.google.com/go/kms v1.0.0 // indirect
github.com/Azure/azure-sdk-for-go v57.1.0+incompatible // indirect
github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 // indirect
github.com/Azure/azure-sdk-for-go v58.3.0+incompatible // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.20 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.15 // indirect
github.com/Azure/go-autorest/autorest v0.11.22 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.17 // indirect
github.com/Azure/go-autorest/autorest/azure/auth v0.5.8 // indirect
github.com/Azure/go-autorest/autorest/azure/cli v0.4.2 // indirect
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
@ -128,13 +128,16 @@ require (
github.com/PuerkitoBio/purell v1.1.1 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20210912230133-d1bdfacee922 // indirect
github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a // indirect
github.com/alicebob/gopher-json v0.0.0-20200520072559-a9ecdc9d1d3a // indirect
github.com/armon/go-metrics v0.3.9 // indirect
github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/containerd/containerd v1.5.4 // indirect
github.com/census-instrumentation/opencensus-proto v0.2.1 // indirect
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403 // indirect
github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe // indirect
github.com/containerd/containerd v1.5.7 // indirect
github.com/containerd/fifo v1.0.0 // indirect
github.com/coreos/etcd v3.3.25+incompatible // indirect
github.com/coreos/go-semver v0.3.0 // indirect
@ -142,7 +145,7 @@ require (
github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f // indirect
github.com/dennwc/varint v1.0.0 // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
github.com/digitalocean/godo v1.65.0 // indirect
github.com/digitalocean/godo v1.71.0 // indirect
github.com/dimchansky/utfbom v1.1.1 // indirect
github.com/docker/distribution v2.7.1+incompatible // indirect
github.com/docker/go-connections v0.4.0 // indirect
@ -152,9 +155,11 @@ require (
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect
github.com/eapache/queue v1.1.0 // indirect
github.com/edsrzf/mmap-go v1.0.0 // indirect
github.com/envoyproxy/go-control-plane v0.10.1 // indirect
github.com/envoyproxy/protoc-gen-validate v0.6.2 // indirect
github.com/felixge/httpsnoop v1.0.1 // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/go-logr/logr v0.4.0 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/go-logr/logr v1.0.0 // indirect
github.com/go-openapi/analysis v0.20.0 // indirect
github.com/go-openapi/errors v0.20.0 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
@ -162,7 +167,7 @@ require (
github.com/go-openapi/loads v0.20.2 // indirect
github.com/go-openapi/runtime v0.19.29 // indirect
github.com/go-openapi/spec v0.20.3 // indirect
github.com/go-openapi/strfmt v0.20.2 // indirect
github.com/go-openapi/strfmt v0.21.0 // indirect
github.com/go-openapi/swag v0.19.15 // indirect
github.com/go-openapi/validate v0.20.2 // indirect
github.com/go-stack/stack v1.8.0 // indirect
@ -175,11 +180,11 @@ require (
github.com/google/btree v1.0.1 // indirect
github.com/google/go-querystring v1.0.0 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/pprof v0.0.0-20210827144239-02619b876842 // indirect
github.com/google/pprof v0.0.0-20211008130755-947d60d73cc0 // indirect
github.com/google/uuid v1.2.0 // indirect
github.com/googleapis/gax-go/v2 v2.1.0 // indirect
github.com/googleapis/gax-go/v2 v2.1.1 // indirect
github.com/googleapis/gnostic v0.4.1 // indirect
github.com/gophercloud/gophercloud v0.20.0 // indirect
github.com/gophercloud/gophercloud v0.23.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2.0.20201207153454-9f6bf00c00a7 // indirect
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
@ -215,7 +220,7 @@ require (
github.com/mitchellh/copystructure v1.0.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/reflectwalk v1.0.1 // indirect
github.com/moby/term v0.0.0-20201216013528-df9cb8a40635 // indirect
github.com/moby/term v0.0.0-20210619224110-3f7ff695adc6 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
@ -245,26 +250,27 @@ require (
go.etcd.io/etcd/api/v3 v3.5.0 // indirect
go.etcd.io/etcd/client/pkg/v3 v3.5.0 // indirect
go.etcd.io/etcd/client/v3 v3.5.0 // indirect
go.mongodb.org/mongo-driver v1.5.1 // indirect
go.mongodb.org/mongo-driver v1.7.3 // indirect
go.opencensus.io v0.23.0 // indirect
go.uber.org/multierr v1.7.0 // indirect
go.uber.org/zap v1.19.1 // indirect
go4.org/intern v0.0.0-20210108033219-3eb7198706b2 // indirect
go4.org/unsafe/assume-no-moving-gc v0.0.0-20201222180813-1025295fd063 // indirect
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f // indirect
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1 // indirect
golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/genproto v0.0.0-20210921142501-181ce0d877f6 // indirect
google.golang.org/genproto v0.0.0-20211021150943-2b146023228c // indirect
google.golang.org/protobuf v1.27.1 // indirect
gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.57.0 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
k8s.io/api v0.22.1 // indirect
k8s.io/apimachinery v0.22.1 // indirect
k8s.io/api v0.22.4 // indirect
k8s.io/apimachinery v0.22.4 // indirect
k8s.io/client-go v12.0.0+incompatible // indirect
k8s.io/klog/v2 v2.10.0 // indirect
k8s.io/klog/v2 v2.20.0 // indirect
k8s.io/utils v0.0.0-20201110183641-67b214c5f920 // indirect
rsc.io/binaryregexp v0.2.0 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.1.0 // indirect
@ -297,7 +303,7 @@ replace github.com/bradfitz/gomemcache => github.com/themihai/gomemcache v0.0.0-
// currently fails because Thanos isn't merging release branches to main branch, and Go modules system is then
// confused about which version is the latest one. v0.22.0 was released in July, but latest tag reachable from main
// is v0.19.1. We pin version from late september here. Feel free to remove when updating to later version.
replace github.com/thanos-io/thanos v0.22.0 => github.com/thanos-io/thanos v0.19.1-0.20210923155558-c15594a03c45
replace github.com/thanos-io/thanos v0.22.0 => github.com/thanos-io/thanos v0.19.1-0.20211126105533-c5505f5eaa7d
// We use a fork of Graylog to avoid leaking goroutine when closing the Promtail target.
replace gopkg.in/Graylog2/go-gelf.v2 => github.com/grafana/go-gelf v0.0.0-20211112153804-126646b86de8

651
go.sum

File diff suppressed because it is too large Load Diff

@ -17,7 +17,7 @@ import (
util_log "github.com/cortexproject/cortex/pkg/util/log"
"github.com/go-kit/log/level"
"github.com/pkg/errors"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/grafana/loki/pkg/storage/chunk/encoding"

@ -14,7 +14,7 @@ import (
"time"
"github.com/dustin/go-humanize"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

@ -12,7 +12,7 @@ import (
"github.com/klauspost/compress/gzip"
"github.com/klauspost/compress/zstd"
"github.com/pierrec/lz4/v4"
"github.com/prometheus/prometheus/pkg/pool"
"github.com/prometheus/prometheus/util/pool"
"github.com/grafana/loki/pkg/logproto"
)

@ -12,7 +12,7 @@ import (
"github.com/Workiva/go-datastructures/rangetree"
"github.com/cespare/xxhash/v2"
"github.com/pkg/errors"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/grafana/loki/pkg/iter"
"github.com/grafana/loki/pkg/logproto"

@ -6,7 +6,7 @@ import (
"strings"
"time"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/weaveworks/common/httpgrpc"
"github.com/grafana/loki/pkg/logproto"

@ -7,7 +7,7 @@ import (
"github.com/grafana/dskit/flagext"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/stretchr/testify/assert"
"github.com/weaveworks/common/httpgrpc"

@ -18,10 +18,10 @@ import (
"github.com/go-kit/log/level"
"github.com/gogo/protobuf/proto"
"github.com/pkg/errors"
prompool "github.com/prometheus/prometheus/pkg/pool"
tsdb_errors "github.com/prometheus/prometheus/tsdb/errors"
"github.com/prometheus/prometheus/tsdb/fileutil"
"github.com/prometheus/prometheus/tsdb/wal"
prompool "github.com/prometheus/prometheus/util/pool"
"github.com/grafana/loki/pkg/chunkenc"
"github.com/grafana/loki/pkg/util/pool"

@ -11,7 +11,7 @@ import (
"github.com/cortexproject/cortex/pkg/cortexpb"
"github.com/grafana/dskit/services"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/weaveworks/common/user"

@ -7,7 +7,7 @@ import (
"testing"
"time"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/stretchr/testify/require"
"github.com/grafana/loki/pkg/chunkenc"

@ -4,6 +4,7 @@ import (
"time"
"github.com/pkg/errors"
"github.com/prometheus/prometheus/tsdb/chunks"
"github.com/prometheus/prometheus/tsdb/encoding"
"github.com/prometheus/prometheus/tsdb/record"
@ -69,14 +70,14 @@ func (r *WALRecord) AddEntries(fp uint64, counter int64, entries ...logproto.Ent
r.entryIndexMap[fp] = len(r.RefEntries)
r.RefEntries = append(r.RefEntries, RefEntries{
Counter: counter,
Ref: fp,
Ref: chunks.HeadSeriesRef(fp),
Entries: entries,
})
}
type RefEntries struct {
Counter int64
Ref uint64
Ref chunks.HeadSeriesRef
Entries []logproto.Entry
}
@ -118,7 +119,7 @@ outer:
if len(ref.Entries) < 1 {
continue
}
buf.PutBE64(ref.Ref) // write fingerprint
buf.PutBE64(uint64(ref.Ref)) // write fingerprint
if version >= WALRecordEntriesV2 {
buf.PutBE64int64(ref.Counter) // write highest counter value
@ -145,7 +146,7 @@ func decodeEntries(b []byte, version RecordType, rec *WALRecord) error {
for len(dec.B) > 0 && dec.Err() == nil {
refEntries := RefEntries{
Ref: dec.Be64(),
Ref: chunks.HeadSeriesRef(dec.Be64()),
}
if version >= WALRecordEntriesV2 {

@ -6,7 +6,7 @@ import (
"time"
"github.com/cortexproject/cortex/pkg/cortexpb"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/tsdb/record"
"github.com/stretchr/testify/require"

@ -13,7 +13,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/weaveworks/common/user"
"github.com/cortexproject/cortex/pkg/util"

@ -17,7 +17,7 @@ import (
"github.com/grafana/dskit/ring"
"github.com/grafana/dskit/services"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/stretchr/testify/require"
"github.com/weaveworks/common/user"
"golang.org/x/net/context"

@ -15,7 +15,7 @@ import (
"unsafe"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/cortexproject/cortex/pkg/cortexpb"
"github.com/cortexproject/cortex/pkg/querier/astmapper"

@ -9,7 +9,7 @@ import (
"github.com/cortexproject/cortex/pkg/querier/astmapper"
"github.com/cortexproject/cortex/pkg/util"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/stretchr/testify/require"
)

@ -20,7 +20,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"google.golang.org/grpc/health/grpc_health_v1"
"github.com/grafana/loki/pkg/chunkenc"

@ -11,7 +11,7 @@ import (
"github.com/grafana/dskit/flagext"
"github.com/grafana/dskit/services"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/stretchr/testify/require"
"github.com/weaveworks/common/httpgrpc"
"github.com/weaveworks/common/user"

@ -14,7 +14,8 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/tsdb/chunks"
tsdb_record "github.com/prometheus/prometheus/tsdb/record"
"github.com/weaveworks/common/httpgrpc"
"go.uber.org/atomic"
@ -250,7 +251,7 @@ func (i *instance) getOrCreateStream(pushReqStream logproto.Stream, lock bool, r
// record will be nil when replaying the wal (we don't want to rewrite wal entries as we replay them).
if record != nil {
record.Series = append(record.Series, tsdb_record.RefSeries{
Ref: uint64(fp),
Ref: chunks.HeadSeriesRef(fp),
Labels: sortedLabels,
})
} else {

@ -13,7 +13,7 @@ import (
"github.com/cortexproject/cortex/pkg/querier/astmapper"
"github.com/pkg/errors"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/stretchr/testify/require"
"github.com/grafana/loki/pkg/iter"

@ -6,7 +6,7 @@ import (
"strings"
"sync"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
util_log "github.com/cortexproject/cortex/pkg/util/log"
"github.com/go-kit/log/level"

@ -5,7 +5,7 @@ import (
"testing"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
)
var (

@ -9,6 +9,7 @@ import (
util_log "github.com/cortexproject/cortex/pkg/util/log"
"github.com/go-kit/log/level"
"github.com/pkg/errors"
"github.com/prometheus/prometheus/tsdb/chunks"
"github.com/prometheus/prometheus/tsdb/record"
"github.com/prometheus/prometheus/tsdb/wal"
"golang.org/x/net/context"
@ -142,7 +143,7 @@ func (r *ingesterRecoverer) Series(series *Series) error {
// will use this original reference.
got, _ := r.users.LoadOrStore(series.UserID, &sync.Map{})
streamsMap := got.(*sync.Map)
streamsMap.Store(series.Fingerprint, stream)
streamsMap.Store(chunks.HeadSeriesRef(series.Fingerprint), stream)
return nil
})
@ -272,7 +273,7 @@ func RecoverWAL(reader WALReader, recoverer Recoverer) error {
}
for _, entries := range rec.RefEntries {
worker := int(entries.Ref % uint64(len(inputs)))
worker := int(uint64(entries.Ref) % uint64(len(inputs)))
inputs[worker] <- recoveryInput{
userID: rec.UserID,
data: entries,

@ -9,7 +9,8 @@ import (
"time"
"github.com/pkg/errors"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/tsdb/chunks"
"github.com/prometheus/prometheus/tsdb/record"
"github.com/stretchr/testify/require"
"github.com/weaveworks/common/user"
@ -55,7 +56,7 @@ func buildMemoryReader(users, totalStreams, entriesPerStream int) (*MemoryWALRea
UserID: user,
Series: []record.RefSeries{
{
Ref: uint64(i),
Ref: chunks.HeadSeriesRef(i),
Labels: labels.FromMap(
map[string]string{
"stream": fmt.Sprint(i),
@ -77,7 +78,7 @@ func buildMemoryReader(users, totalStreams, entriesPerStream int) (*MemoryWALRea
UserID: user,
RefEntries: []RefEntries{
{
Ref: uint64(i),
Ref: chunks.HeadSeriesRef(i),
Entries: entries,
},
},
@ -98,7 +99,7 @@ func buildMemoryReader(users, totalStreams, entriesPerStream int) (*MemoryWALRea
}
type MemRecoverer struct {
users map[string]map[uint64][]logproto.Entry
users map[string]map[chunks.HeadSeriesRef][]logproto.Entry
done chan struct{}
sync.Mutex
@ -107,7 +108,7 @@ type MemRecoverer struct {
func NewMemRecoverer() *MemRecoverer {
return &MemRecoverer{
users: make(map[string]map[uint64][]logproto.Entry),
users: make(map[string]map[chunks.HeadSeriesRef][]logproto.Entry),
done: make(chan struct{}),
}
}
@ -121,7 +122,7 @@ func (r *MemRecoverer) SetStream(userID string, series record.RefSeries) error {
defer r.Unlock()
user, ok := r.users[userID]
if !ok {
user = make(map[uint64][]logproto.Entry)
user = make(map[chunks.HeadSeriesRef][]logproto.Entry)
r.users[userID] = user
r.usersCt++
}

@ -13,7 +13,7 @@ import (
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/weaveworks/common/httpgrpc"
"github.com/grafana/loki/pkg/chunkenc"

@ -10,7 +10,7 @@ import (
"time"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/stretchr/testify/require"
"github.com/weaveworks/common/httpgrpc"

@ -8,7 +8,7 @@ import (
util_log "github.com/cortexproject/cortex/pkg/util/log"
"github.com/go-kit/log/level"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"golang.org/x/net/context"
"github.com/grafana/loki/pkg/logproto"

@ -7,7 +7,7 @@ import (
"testing"
"time"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

@ -13,7 +13,7 @@ import (
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/weaveworks/common/user"
"golang.org/x/net/context"

@ -19,7 +19,7 @@ import (
logqllog "github.com/grafana/loki/pkg/logql/log"
"github.com/grafana/loki/pkg/util/marshal"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/weaveworks/common/user"
)

@ -15,7 +15,7 @@ import (
"github.com/go-kit/log/level"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/grafana/loki/pkg/loghttp"
"github.com/grafana/loki/pkg/logproto"

@ -1,6 +1,6 @@
package logproto
import "github.com/prometheus/prometheus/pkg/labels"
import "github.com/prometheus/prometheus/model/labels"
// Note, this is not very efficient and use should be minimized as it requires label construction on each comparison
type SeriesIdentifiers []SeriesIdentifier

@ -9,7 +9,7 @@ import (
"time"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql"
"github.com/grafana/loki/pkg/iter"

@ -3,7 +3,7 @@ package logql
import (
"testing"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

@ -13,7 +13,7 @@ import (
"github.com/go-kit/log/level"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql"
promql_parser "github.com/prometheus/prometheus/promql/parser"

@ -10,7 +10,7 @@ import (
"time"
json "github.com/json-iterator/go"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql"
promql_parser "github.com/prometheus/prometheus/promql/parser"
"github.com/stretchr/testify/assert"

@ -9,7 +9,7 @@ import (
"time"
"github.com/pkg/errors"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql"
"github.com/grafana/loki/pkg/iter"

@ -3,7 +3,7 @@ package logql
import (
"time"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/grafana/loki/pkg/logql/log"
)

@ -7,7 +7,7 @@ import __yyfmt__ "fmt"
import (
"github.com/grafana/loki/pkg/logql/log"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"time"
)

@ -8,7 +8,7 @@ import (
"unicode"
"unicode/utf8"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
)
// Filterer is a interface to filter log lines.

@ -5,7 +5,7 @@ import (
"sort"
"testing"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/stretchr/testify/require"
"github.com/grafana/loki/pkg/logqlmodel"

@ -5,7 +5,7 @@ import (
"fmt"
"unicode"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"inet.af/netaddr"
)

@ -3,7 +3,7 @@ package log
import (
"testing"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

@ -8,7 +8,7 @@ import (
"unicode"
"github.com/dustin/go-humanize"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/grafana/loki/pkg/logqlmodel"
)

@ -6,7 +6,7 @@ import (
"testing"
"time"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/stretchr/testify/require"
"github.com/grafana/loki/pkg/logqlmodel"

@ -3,7 +3,7 @@ package log
import (
"sort"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/grafana/loki/pkg/logqlmodel"
)

@ -4,7 +4,7 @@ import (
"sort"
"testing"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/stretchr/testify/require"
"github.com/grafana/loki/pkg/logqlmodel"

@ -6,7 +6,7 @@ import (
"time"
"github.com/pkg/errors"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/dustin/go-humanize"
)

@ -5,7 +5,7 @@ import (
"testing"
"time"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/stretchr/testify/require"
)

@ -4,7 +4,7 @@ package log_test
import (
"testing"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/stretchr/testify/require"
"github.com/grafana/loki/pkg/logql"

@ -5,7 +5,7 @@ import (
"sort"
"testing"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/stretchr/testify/require"
"github.com/grafana/loki/pkg/logqlmodel"

@ -4,7 +4,7 @@ import (
"reflect"
"unsafe"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
)
// NoopStage is a stage that doesn't process a log line.

@ -4,7 +4,7 @@ import (
"testing"
"time"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/stretchr/testify/require"
"github.com/grafana/loki/pkg/logqlmodel"

@ -4,7 +4,7 @@ import (
"testing"
"time"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql"
"github.com/stretchr/testify/require"
)

@ -11,7 +11,7 @@ import (
"github.com/cortexproject/cortex/pkg/util"
errors2 "github.com/pkg/errors"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
promql_parser "github.com/prometheus/prometheus/promql/parser"
"github.com/grafana/loki/pkg/loghttp"

@ -6,7 +6,7 @@ import (
"testing"
"time"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/stretchr/testify/require"
"github.com/grafana/loki/pkg/logql/log"

@ -3,7 +3,7 @@ package logql
import (
"sync"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql"
promql_parser "github.com/prometheus/prometheus/promql/parser"

@ -6,7 +6,7 @@ import (
"time"
"github.com/cortexproject/cortex/pkg/querier/astmapper"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/stretchr/testify/require"
)

@ -9,7 +9,7 @@ import (
"github.com/cespare/xxhash/v2"
"github.com/cortexproject/cortex/pkg/querier/astmapper"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
promql_parser "github.com/prometheus/prometheus/promql/parser"
"github.com/grafana/loki/pkg/iter"

@ -3,7 +3,7 @@ package logql
import (
"testing"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/stretchr/testify/require"
)

@ -4,7 +4,7 @@ import (
"errors"
"fmt"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
)
// Those errors are useful for comparing error returned by the engine.

@ -13,7 +13,7 @@ import (
"github.com/grafana/dskit/runtimeconfig"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/stretchr/testify/require"
"github.com/grafana/loki/pkg/validation"

@ -9,7 +9,7 @@ import (
util_log "github.com/cortexproject/cortex/pkg/util/log"
"github.com/go-kit/log/level"
"github.com/gorilla/websocket"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql/parser"
"github.com/weaveworks/common/httpgrpc"

@ -13,7 +13,7 @@ import (
"github.com/grafana/dskit/services"
"github.com/pkg/errors"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/weaveworks/common/httpgrpc"
"github.com/grafana/loki/pkg/ingester/client"

@ -6,7 +6,7 @@ import (
"time"
"github.com/grafana/dskit/ring"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require"

@ -12,7 +12,7 @@ import (
ring_client "github.com/grafana/dskit/ring/client"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"google.golang.org/grpc"
"google.golang.org/grpc/health/grpc_health_v1"
grpc_metadata "google.golang.org/grpc/metadata"

@ -18,7 +18,7 @@ import (
json "github.com/json-iterator/go"
"github.com/opentracing/opentracing-go"
otlog "github.com/opentracing/opentracing-go/log"
"github.com/prometheus/prometheus/pkg/timestamp"
"github.com/prometheus/prometheus/model/timestamp"
"github.com/weaveworks/common/httpgrpc"
"github.com/grafana/loki/pkg/loghttp"
@ -194,7 +194,7 @@ func (r *LokiLabelNamesRequest) LogToSpan(sp opentracing.Span) {
func (*LokiLabelNamesRequest) GetCachingOptions() (res queryrange.CachingOptions) { return }
func (Codec) DecodeRequest(_ context.Context, r *http.Request) (queryrange.Request, error) {
func (Codec) DecodeRequest(_ context.Context, r *http.Request, forwardHeaders []string) (queryrange.Request, error) {
if err := r.ParseForm(); err != nil {
return nil, httpgrpc.Errorf(http.StatusBadRequest, err.Error())
}

@ -86,7 +86,7 @@ func Test_codec_DecodeRequest(t *testing.T) {
if err != nil {
t.Fatal(err)
}
got, err := LokiCodec.DecodeRequest(context.TODO(), req)
got, err := LokiCodec.DecodeRequest(context.TODO(), req, nil)
if (err != nil) != tt.wantErr {
t.Errorf("codec.DecodeRequest() error = %v, wantErr %v", err, tt.wantErr)
return
@ -241,7 +241,7 @@ func Test_codec_EncodeRequest(t *testing.T) {
require.Equal(t, "86400.000000", got.URL.Query().Get("step"))
// testing a full roundtrip
req, err := LokiCodec.DecodeRequest(context.TODO(), got)
req, err := LokiCodec.DecodeRequest(context.TODO(), got, nil)
require.NoError(t, err)
require.Equal(t, toEncode.Query, req.(*LokiRequest).Query)
require.Equal(t, toEncode.Step, req.(*LokiRequest).Step)
@ -273,7 +273,7 @@ func Test_codec_series_EncodeRequest(t *testing.T) {
require.Equal(t, `{foo="bar"}`, got.URL.Query().Get("match[]"))
// testing a full roundtrip
req, err := LokiCodec.DecodeRequest(context.TODO(), got)
req, err := LokiCodec.DecodeRequest(context.TODO(), got, nil)
require.NoError(t, err)
require.Equal(t, toEncode.Match, req.(*LokiSeriesRequest).Match)
require.Equal(t, toEncode.StartTs, req.(*LokiSeriesRequest).StartTs)
@ -296,7 +296,7 @@ func Test_codec_labels_EncodeRequest(t *testing.T) {
require.Equal(t, fmt.Sprintf("%d", end.UnixNano()), got.URL.Query().Get("end"))
// testing a full roundtrip
req, err := LokiCodec.DecodeRequest(context.TODO(), got)
req, err := LokiCodec.DecodeRequest(context.TODO(), got, nil)
require.NoError(t, err)
require.Equal(t, toEncode.StartTs, req.(*LokiLabelNamesRequest).StartTs)
require.Equal(t, toEncode.EndTs, req.(*LokiLabelNamesRequest).EndTs)

@ -8,7 +8,7 @@ import (
"github.com/cortexproject/cortex/pkg/querier/queryrange"
"github.com/cortexproject/cortex/pkg/util/spanlogger"
"github.com/go-kit/log/level"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/promql"
"github.com/prometheus/prometheus/promql/parser"

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save