From 0e4556cd5b75a39ee8bfb8e485d45298b36c3a56 Mon Sep 17 00:00:00 2001 From: Sebastian Rabenhorst Date: Fri, 11 Nov 2022 19:45:39 +0100 Subject: [PATCH] Updated prometheus to v0.40.1 Signed-off-by: Sebastian Rabenhorst Fixed pkg Signed-off-by: Sebastian Rabenhorst Fixed internal Signed-off-by: Sebastian Rabenhorst Updated weaveworks/common Signed-off-by: Sebastian Rabenhorst Fixed tests Signed-off-by: Sebastian Rabenhorst Fixed some querier tests and commented out log spam Signed-off-by: Sebastian Rabenhorst Fixed querier test Signed-off-by: Sebastian Rabenhorst Reverted tls integration test Signed-off-by: Sebastian Rabenhorst Fixed TestChunkQueryable Signed-off-by: Sebastian Rabenhorst Implemented pushdownSeriesIterator AtT fn Signed-off-by: Sebastian Rabenhorst Fixed cloudtrace import Signed-off-by: Sebastian Rabenhorst Ran go mod tidy Signed-off-by: Sebastian Rabenhorst trigger tests Signed-off-by: Sebastian Rabenhorst --- go.mod | 88 ++++---- go.sum | 189 ++++++++++-------- internal/cortex/chunk/encoding/bigchunk.go | 8 +- .../cortex/chunk/encoding/prometheus_chunk.go | 6 +- internal/cortex/querier/batch/batch.go | 36 +++- internal/cortex/querier/batch/batch_test.go | 7 +- internal/cortex/querier/batch/chunk_test.go | 8 +- internal/cortex/querier/block.go | 40 ++-- internal/cortex/querier/block_test.go | 6 +- .../querier/blocks_store_queryable_test.go | 2 +- .../querier/distributor_queryable_test.go | 5 +- .../querier/iterators/chunk_merge_iterator.go | 69 +++++-- .../iterators/chunk_merge_iterator_test.go | 11 +- .../cortex/querier/queryrange/promql_test.go | 3 +- .../cortex/querier/queryrange/series_test.go | 3 +- .../querier/queryrange/test_utils_test.go | 3 +- internal/cortex/querier/remote_read.go | 3 +- internal/cortex/querier/series/series_set.go | 105 ++++++++-- .../cortex/querier/series/series_set_test.go | 35 ++-- .../cortex/querier/timeseries_series_set.go | 34 +++- .../querier/timeseries_series_set_test.go | 19 +- internal/cortex/storage/tsdb/config.go | 4 +- internal/cortex/storegateway/gateway_test.go | 2 +- pkg/api/query/v1_test.go | 15 ++ pkg/compact/downsample/downsample.go | 66 ++++-- pkg/compact/downsample/downsample_test.go | 62 ++++-- pkg/compactv2/chunk_series_set.go | 16 +- pkg/compactv2/compactor_test.go | 2 +- pkg/compactv2/modifiers.go | 46 +++-- pkg/dedup/chunk_iter.go | 2 +- pkg/dedup/iter.go | 101 +++++++--- pkg/dedup/iter_test.go | 47 ++++- pkg/dedup/pushdown_iter.go | 53 +++-- pkg/query/iter.go | 45 +++-- pkg/query/querier_test.go | 84 +++++--- pkg/query/query_bench_test.go | 5 +- pkg/receive/handler_test.go | 6 + pkg/rules/manager_test.go | 6 + pkg/server/http/http.go | 13 +- pkg/store/prometheus_test.go | 2 +- pkg/store/proxy.go | 2 +- pkg/store/proxy_test.go | 2 +- pkg/store/storepb/custom_test.go | 2 +- pkg/store/storepb/testutil/series.go | 6 +- pkg/tracing/stackdriver/tracer.go | 2 +- 45 files changed, 865 insertions(+), 406 deletions(-) diff --git a/go.mod b/go.mod index 5758744cb39..5039b12bccf 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.18 require ( cloud.google.com/go/storage v1.27.0 // indirect - cloud.google.com/go/trace v1.2.0 + cloud.google.com/go/trace v1.3.0 github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/trace v1.8.3 github.com/NYTimes/gziphandler v1.1.1 github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 @@ -24,7 +24,7 @@ require ( github.com/fatih/structtag v1.2.0 github.com/felixge/fgprof v0.9.2 github.com/fortytw2/leaktest v1.3.0 - github.com/fsnotify/fsnotify v1.5.4 + github.com/fsnotify/fsnotify v1.6.0 github.com/go-kit/log v0.2.1 github.com/go-openapi/strfmt v0.21.3 github.com/go-redis/redis/v8 v8.11.5 @@ -35,12 +35,12 @@ require ( github.com/golang/snappy v0.0.4 github.com/googleapis/gax-go v2.0.2+incompatible github.com/gorilla/mux v1.8.0 - github.com/grafana/regexp v0.0.0-20220304095617-2e8d9baf4ac2 + github.com/grafana/regexp v0.0.0-20221005093135-b4c2bcb0a4b6 github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 github.com/grpc-ecosystem/go-grpc-middleware/providers/kit/v2 v2.0.0-20201002093600-73cf2ae9d891 github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2.0.20201207153454-9f6bf00c00a7 github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 - github.com/hashicorp/consul/api v1.15.2 + github.com/hashicorp/consul/api v1.15.3 github.com/hashicorp/go-cleanhttp v0.5.2 github.com/hashicorp/go-sockaddr v1.0.2 github.com/hashicorp/golang-lru v0.5.4 @@ -64,15 +64,15 @@ require ( github.com/pkg/errors v0.9.1 github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 github.com/prometheus/alertmanager v0.24.0 - github.com/prometheus/client_golang v1.13.0 - github.com/prometheus/client_model v0.2.0 + github.com/prometheus/client_golang v1.13.1 + github.com/prometheus/client_model v0.3.0 github.com/prometheus/common v0.37.0 - github.com/prometheus/exporter-toolkit v0.7.1 + github.com/prometheus/exporter-toolkit v0.8.1 // Prometheus maps version 2.x.y to tags v0.x.y. - github.com/prometheus/prometheus v0.39.1 + github.com/prometheus/prometheus v0.40.1 github.com/sony/gobreaker v0.5.0 - github.com/stretchr/testify v1.8.0 - github.com/thanos-community/promql-engine v0.0.0-20221101075408-6d5b22b2cd4d + github.com/stretchr/testify v1.8.1 + github.com/thanos-community/promql-engine v0.0.0-20221113073407-ac31e29297ca github.com/thanos-io/objstore v0.0.0-20221006135717-79dcec7fe604 github.com/uber/jaeger-client-go v2.30.0+incompatible github.com/uber/jaeger-lib v2.4.1+incompatible // indirect @@ -84,21 +84,21 @@ require ( go.etcd.io/etcd/client/pkg/v3 v3.5.4 go.etcd.io/etcd/client/v3 v3.5.4 go.opentelemetry.io/contrib/propagators/ot v1.9.0 // indirect - go.opentelemetry.io/otel v1.10.0 + go.opentelemetry.io/otel v1.11.1 go.opentelemetry.io/otel/bridge/opentracing v1.10.0 - go.opentelemetry.io/otel/sdk v1.10.0 - go.opentelemetry.io/otel/trace v1.10.0 + go.opentelemetry.io/otel/sdk v1.11.1 + go.opentelemetry.io/otel/trace v1.11.1 go.uber.org/atomic v1.10.0 go.uber.org/automaxprocs v1.5.1 go.uber.org/goleak v1.2.0 - golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa - golang.org/x/net v0.0.0-20220920203100-d0c6ba3f52d9 - golang.org/x/sync v0.0.0-20220907140024-f12130a52804 - golang.org/x/text v0.3.7 - golang.org/x/time v0.0.0-20220920022843-2ce7c2934d45 - google.golang.org/api v0.97.0 // indirect - google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006 - google.golang.org/grpc v1.49.0 + golang.org/x/crypto v0.1.0 + golang.org/x/net v0.1.0 + golang.org/x/sync v0.1.0 + golang.org/x/text v0.4.0 + golang.org/x/time v0.1.0 + google.golang.org/api v0.102.0 // indirect + google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c // indirect + google.golang.org/grpc v1.50.1 google.golang.org/grpc/examples v0.0.0-20211119005141-f45e61797429 gopkg.in/alecthomas/kingpin.v2 v2.2.6 gopkg.in/fsnotify.v1 v1.4.7 @@ -113,9 +113,9 @@ require ( ) require ( - cloud.google.com/go v0.104.0 // indirect - cloud.google.com/go/compute v1.7.0 // indirect - cloud.google.com/go/iam v0.3.0 // indirect + cloud.google.com/go v0.105.0 // indirect + cloud.google.com/go/compute v1.12.1 // indirect + cloud.google.com/go/iam v0.6.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 // indirect @@ -123,14 +123,15 @@ require ( github.com/AzureAD/microsoft-authentication-library-for-go v0.5.1 // indirect go.opentelemetry.io/contrib/samplers/jaegerremote v0.3.0 go.opentelemetry.io/otel/exporters/jaeger v1.8.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0 - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.10.0 + go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.1 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.1 + go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.11.1 ) require go.opentelemetry.io/contrib/propagators/autoprop v0.34.0 require ( + cloud.google.com/go/compute/metadata v0.2.1 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/internal/resourcemapping v0.32.3 // indirect github.com/OneOfOne/xxhash v1.2.6 // indirect github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect @@ -138,7 +139,7 @@ require ( github.com/aliyun/aliyun-oss-go-sdk v2.2.2+incompatible // indirect github.com/armon/go-radix v1.0.0 // indirect github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect - github.com/aws/aws-sdk-go v1.44.109 // indirect + github.com/aws/aws-sdk-go v1.44.128 // indirect github.com/aws/aws-sdk-go-v2 v1.16.0 // indirect github.com/aws/aws-sdk-go-v2/config v1.15.1 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.11.0 // indirect @@ -156,7 +157,7 @@ require ( github.com/chromedp/sysutil v1.0.0 // indirect github.com/clbanning/mxj v1.8.4 // indirect github.com/coreos/go-semver v0.3.0 // indirect - github.com/coreos/go-systemd/v22 v22.3.2 // indirect + github.com/coreos/go-systemd/v22 v22.4.0 // indirect github.com/dennwc/varint v1.0.0 // indirect github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect github.com/dnaeon/go-vcr v1.2.0 // indirect @@ -188,10 +189,10 @@ require ( github.com/google/btree v1.0.1 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/go-querystring v1.1.0 // indirect - github.com/google/pprof v0.0.0-20220829040838-70bd9ae97f40 // indirect + github.com/google/pprof v0.0.0-20221102093814-76f304f74e5e // indirect github.com/google/uuid v1.3.0 // indirect - github.com/googleapis/enterprise-certificate-proxy v0.1.0 // indirect - github.com/googleapis/gax-go/v2 v2.5.1 // indirect + github.com/googleapis/enterprise-certificate-proxy v0.2.0 // indirect + github.com/googleapis/gax-go/v2 v2.6.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.1 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-hclog v0.16.2 // indirect @@ -234,7 +235,7 @@ require ( github.com/shirou/gopsutil/v3 v3.22.9 // indirect github.com/sirupsen/logrus v1.9.0 // indirect github.com/spaolacci/murmur3 v1.1.0 // indirect - github.com/stretchr/objx v0.4.0 // indirect + github.com/stretchr/objx v0.5.0 // indirect github.com/tencentyun/cos-go-sdk-v5 v0.7.34 // indirect github.com/tidwall/pretty v1.2.0 // indirect github.com/tklauser/go-sysconf v0.3.10 // indirect @@ -246,21 +247,21 @@ require ( go.elastic.co/fastjson v1.1.0 // indirect go.mongodb.org/mongo-driver v1.10.2 // indirect go.opencensus.io v0.23.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.36.0 // indirect + go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.36.4 // indirect go.opentelemetry.io/contrib/propagators/aws v1.9.0 // indirect go.opentelemetry.io/contrib/propagators/b3 v1.9.0 // indirect go.opentelemetry.io/contrib/propagators/jaeger v1.9.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0 // indirect - go.opentelemetry.io/otel/metric v0.32.0 // indirect + go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.1 // indirect + go.opentelemetry.io/otel/metric v0.33.0 // indirect go.opentelemetry.io/proto/otlp v0.19.0 // indirect go.uber.org/multierr v1.8.0 // indirect go.uber.org/zap v1.21.0 // indirect - golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e // indirect - golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect - golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect - golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 // indirect - golang.org/x/tools v0.1.12 // indirect - golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f // indirect + golang.org/x/exp v0.0.0-20221031165847-c99f073a8326 // indirect + golang.org/x/mod v0.6.0 // indirect + golang.org/x/oauth2 v0.1.0 // indirect + golang.org/x/sys v0.1.0 // indirect + golang.org/x/tools v0.2.0 // indirect + golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect gonum.org/v1/gonum v0.12.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/protobuf v1.28.1 // indirect @@ -275,6 +276,9 @@ replace ( github.com/vimeo/galaxycache => github.com/thanos-community/galaxycache v0.0.0-20211122094458-3a32041a1f1e + // Until https://github.com/weaveworks/common/pull/262 is merged + github.com/weaveworks/common => github.com/rabenhorst/common v0.0.0-20221114111857-9eb1f146696e + // Override due to https://github.com/weaveworks/common/issues/239 google.golang.org/grpc => google.golang.org/grpc v1.45.0 diff --git a/go.sum b/go.sum index a1ba77b7181..df5cdb0b791 100644 --- a/go.sum +++ b/go.sum @@ -27,8 +27,8 @@ cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Ud cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= -cloud.google.com/go v0.104.0 h1:gSmWO7DY1vOm0MVU6DNXM11BWHHsTUmsC5cv1fuW5X8= -cloud.google.com/go v0.104.0/go.mod h1:OO6xxXdJyvuJPcEPBLN9BJPD+jep5G1+2U5B5gkRYtA= +cloud.google.com/go v0.105.0 h1:DNtEKRBAAzeS4KyIory52wWHuClNaXJ5x1F7xa4q+5Y= +cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -40,12 +40,18 @@ cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJW cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= -cloud.google.com/go/compute v1.7.0 h1:v/k9Eueb8aAJ0vZuxKMrgm6kPhCLZU9HxFU+AFDs9Uk= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= +cloud.google.com/go/compute v1.12.1 h1:gKVJMEyqV5c/UnpzjjQbo3Rjvvqpr9B1DFSbJC4OXr0= +cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU= +cloud.google.com/go/compute/metadata v0.2.1 h1:efOwf5ymceDhK6PKMnnrTHP4pppY5L22mle96M1yP48= +cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/iam v0.3.0 h1:exkAomrVUuzx9kWFI1wm3KI0uoDeUFPB4kKGzx6x+Gc= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= +cloud.google.com/go/iam v0.6.0 h1:nsqQC88kT5Iwlm4MeNGTpfMWddp6NB/UOLFTH6m1QfQ= +cloud.google.com/go/iam v0.6.0/go.mod h1:+1AH33ueBne5MzYccyMHtEKqLE4/kJOibtffMHDMFMc= +cloud.google.com/go/longrunning v0.1.1 h1:y50CXG4j0+qvEukslYFBCrzaXX0qpFbBzc3PchSu/LE= +cloud.google.com/go/monitoring v1.7.0 h1:zK12aN/jzLRzrRXopEOUaG6kvuF6WJmlv1mXn1L7a6E= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= @@ -58,8 +64,8 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= cloud.google.com/go/storage v1.27.0 h1:YOO045NZI9RKfCj1c5A/ZtuuENUc8OAW+gHdGnDgyMQ= cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s= -cloud.google.com/go/trace v1.2.0 h1:oIaB4KahkIUOpLSAAjEJ8y2desbjY/x/RfP4O3KAtTI= -cloud.google.com/go/trace v1.2.0/go.mod h1:Wc8y/uYyOhPy12KEnXG9XGrvfMz5F5SrYecQlbW1rwM= +cloud.google.com/go/trace v1.3.0 h1:YmCusGVDe0scOkHKi+y/GgBZlwQjHybtQHV12AfJEgo= +cloud.google.com/go/trace v1.3.0/go.mod h1:FFUE83d9Ca57C+K8rDl/Ih8LwOzWIV1krKgxg6N0G28= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v65.0.0+incompatible h1:HzKLt3kIwMm4KeJYTdx9EbjRYTySD/t8i1Ee/W5EGXw= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.0 h1:Ut0ZGdOwJDw0npYEg+TLlPls3Pq6JiZaP2/aGKir7Zw= @@ -140,8 +146,8 @@ github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQ github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.43.11/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= -github.com/aws/aws-sdk-go v1.44.109 h1:+Na5JPeS0kiEHoBp5Umcuuf+IDqXqD0lXnM920E31YI= -github.com/aws/aws-sdk-go v1.44.109/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= +github.com/aws/aws-sdk-go v1.44.128 h1:X34pX5t0LIZXjBY11yf9JKMP3c1aZgirh+5PjtaZyJ4= +github.com/aws/aws-sdk-go v1.44.128/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aws/aws-sdk-go-v2 v1.16.0 h1:cBAYjiiexRAg9v2z9vb6IdxAa7ef4KCtjW7w7e3GxGo= github.com/aws/aws-sdk-go-v2 v1.16.0/go.mod h1:lJYcuZZEHWNIb6ugJjbQY1fykdoobWbOS7kJYb4APoI= @@ -213,8 +219,9 @@ github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= -github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= +github.com/coreos/go-systemd/v22 v22.4.0 h1:y9YHcjnjynCd/DVbg5j9L/33jQM3MxJlbj/zWskzfGU= +github.com/coreos/go-systemd/v22 v22.4.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= @@ -229,14 +236,14 @@ github.com/dennwc/varint v1.0.0/go.mod h1:hnItb35rvZvJrbTALZtY/iQfDs48JKRG1RPpgz github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= -github.com/digitalocean/godo v1.84.1 h1:VgPsuxhrO9pUygvij6qOhqXfAkxAsDZYRpmjSDMEaHo= +github.com/digitalocean/godo v1.88.0 h1:SAEdw63xOMmzlwCeCWjLH1GcyDPUjbSAR1Bh7VELxzc= github.com/dnaeon/go-vcr v1.2.0 h1:zHCHvJYTMh1N7xnV7zf1m1GPBF9Ad0Jk/whtQ1663qI= github.com/dnaeon/go-vcr v1.2.0/go.mod h1:R4UdLID7HZT3taECzJs4YgbbH6PIGXB6W/sc5OLb6RQ= github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= -github.com/docker/docker v20.10.18+incompatible h1:SN84VYXTBNGn92T/QwIRPlum9zfemfitN7pbsp26WSc= +github.com/docker/docker v20.10.21+incompatible h1:UTLdBmHk3bEY+w8qeO5KttOhy6OmXWsl/FEet9Uswog= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= -github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= +github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -264,7 +271,7 @@ github.com/emicklei/go-restful/v3 v3.8.0 h1:eCZ8ulSerjdAiaNpF7GxXIE7ZCMo1moN1qX+ github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.3 h1:xdCVXxEe0Y3FQith+0cj2irwZudqGYvecuLB1HtdexY= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/envoyproxy/protoc-gen-validate v0.6.8 h1:B2cR/FAaiMtYDHv5BQpaqtkjGuWQIgr2KQZtHQ7f6i8= +github.com/envoyproxy/protoc-gen-validate v0.6.13 h1:TvDcILLkjuZV3ER58VkBmncKsLUBqBDxra/XctCzuMM= github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb h1:IT4JYU7k4ikYg1SCxNI1/Tieq/NFvh6dzLdgi7eu0tM= github.com/facette/natsort v0.0.0-20181210072756-2cd4dd1e2dcb/go.mod h1:bH6Xx7IW64qjjJq8M2u4dxNaBiDfKK+z/3eGDpXEQhc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -284,8 +291,8 @@ github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHqu github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= -github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= +github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= +github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -491,8 +498,8 @@ github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg= -github.com/google/pprof v0.0.0-20220829040838-70bd9ae97f40 h1:ykKxL12NZd3JmWZnyqarJGsF73M9Xhtrik/FEtEeFRE= -github.com/google/pprof v0.0.0-20220829040838-70bd9ae97f40/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo= +github.com/google/pprof v0.0.0-20221102093814-76f304f74e5e h1:F1LLQqQ8WoIbyoxLUY+JUZe1kuHdxThM6CPUATzE6Io= +github.com/google/pprof v0.0.0-20221102093814-76f304f74e5e/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -500,8 +507,8 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= -github.com/googleapis/enterprise-certificate-proxy v0.1.0 h1:zO8WHNx/MYiAKJ3d5spxZXZE6KHmIQGQcAzwUzV7qQw= -github.com/googleapis/enterprise-certificate-proxy v0.1.0/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= +github.com/googleapis/enterprise-certificate-proxy v0.2.0 h1:y8Yozv7SZtlU//QXbezB6QkpuE6jMD2/gfzk4AftXjs= +github.com/googleapis/enterprise-certificate-proxy v0.2.0/go.mod h1:8C0jb7/mgJe/9KK8Lm7X9ctZC2t60YyIpYEI16jx0Qg= github.com/googleapis/gax-go v2.0.2+incompatible h1:silFMLAnr330+NRuag/VjIGF7TLp/LBrV2CJKFLWEww= github.com/googleapis/gax-go v2.0.2+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= @@ -511,8 +518,8 @@ github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0 github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= -github.com/googleapis/gax-go/v2 v2.5.1 h1:kBRZU0PSuI7PspsSb/ChWoVResUcwNVIdpB049pKTiw= -github.com/googleapis/gax-go/v2 v2.5.1/go.mod h1:h6B0KMMFNtI2ddbGJn3T3ZbwkeT6yqEF02fYlzkUCyo= +github.com/googleapis/gax-go/v2 v2.6.0 h1:SXk3ABtQYDT/OH8jAyvEOQ58mgawq5C4o/4/89qN2ZU= +github.com/googleapis/gax-go/v2 v2.6.0/go.mod h1:1mjbznJAPHFpesgE5ucqfYEscaz5kMdcIDwU/6+DDoY= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleinterns/cloud-operations-api-mock v0.0.0-20200709193332-a1e58c29bdd3 h1:eHv/jVY/JNop1xg2J9cBb4EzyMpWZoNCP1BslSAIkOI= github.com/gophercloud/gophercloud v1.0.0 h1:9nTGx0jizmHxDobe4mck89FyQHVyA3CaXLIUSGJjP9k= @@ -524,8 +531,8 @@ github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/grafana/regexp v0.0.0-20220304095617-2e8d9baf4ac2 h1:uirlL/j72L93RhV4+mkWhjv0cov2I0MIgPOG9rMDr1k= -github.com/grafana/regexp v0.0.0-20220304095617-2e8d9baf4ac2/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= +github.com/grafana/regexp v0.0.0-20221005093135-b4c2bcb0a4b6 h1:A3dhViTeFDSQcGOXuUi6ukCQSMyDtDISBp2z6OOo2YM= +github.com/grafana/regexp v0.0.0-20221005093135-b4c2bcb0a4b6/go.mod h1:M5qHK+eWfAv8VR/265dIuEpL3fNfeC21tXXp9itM24A= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.1.0/go.mod h1:f5nM7jw/oeRSadq3xCzHAvxcr8HZnzsqU6ILg/0NiiE= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= @@ -544,8 +551,8 @@ github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.1 h1:/sDbPb60SusIXjiJGYLUoS/rAQu github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.1/go.mod h1:G+WkljZi4mflcqVxYSgvt8MNctRQHjEH8ubKtt1Ka3w= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= -github.com/hashicorp/consul/api v1.15.2 h1:3Q/pDqvJ7udgt/60QOOW/p/PeKioQN+ncYzzCdN2av0= -github.com/hashicorp/consul/api v1.15.2/go.mod h1:v6nvB10borjOuIwNRZYPZiHKrTM/AyrGtd0WVVodKM8= +github.com/hashicorp/consul/api v1.15.3 h1:WYONYL2rxTXtlekAqblR2SCdJsizMDIj/uXb5wNy9zU= +github.com/hashicorp/consul/api v1.15.3/go.mod h1:/g/qgcoBcEXALCNZgRRisyTW0nY86++L0KbeAMXYCeY= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.11.0 h1:HRzj8YSCln2yGgCumN5CL8lYlD3gBurnervJRJAZyC4= github.com/hashicorp/consul/sdk v0.11.0/go.mod h1:yPkX5Q6CsxTFMjQQDJwzeNmUUF5NUGGbrDsv9wTb8cw= @@ -598,7 +605,7 @@ github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2p github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/memberlist v0.3.1 h1:MXgUXLqva1QvpVEDQW1IQLG0wivQAtmFlHRQ+1vWZfM= github.com/hashicorp/memberlist v0.3.1/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= -github.com/hashicorp/nomad/api v0.0.0-20220921012004-ddeeb1040edf h1:l/EZ57iRPNs8vd8c9qH0dB4Q+IiZHJouLAgxJ5j25tU= +github.com/hashicorp/nomad/api v0.0.0-20221102143410-8a95f1239005 h1:jKwXhVS4F7qk0g8laz+Anz0g/6yaSJ3HqmSAuSNLUcA= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.9.7 h1:hkdgbqizGQHuU5IPqYM1JdSMV8nKfpuOnZYXssk9muY= github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= @@ -654,7 +661,7 @@ github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa02 github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/cpuid/v2 v2.1.0 h1:eyi1Ad2aNJMW95zcSbmGg7Cg6cq3ADwLpMAP96d8rF0= github.com/klauspost/cpuid/v2 v2.1.0/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY= -github.com/kolo/xmlrpc v0.0.0-20220919000247-3377102c83bd h1:b1taQnM42dp3NdiiQwfmM1WyyucHayZSKN5R0PRYWL0= +github.com/kolo/xmlrpc v0.0.0-20220921171641-a4b6fa1dd06b h1:udzkj9S/zlT5X367kqJis0QP7YMxobob6zhzq6Yre00= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -679,7 +686,7 @@ github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20210210170715-a github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lightstep/lightstep-tracer-go v0.25.0 h1:sGVnz8h3jTQuHKMbUe2949nXm3Sg09N1UcR3VoQNN5E= github.com/lightstep/lightstep-tracer-go v0.25.0/go.mod h1:G1ZAEaqTHFPWpWunnbUn1ADEY/Jvzz7jIOaXwAfD6A8= -github.com/linode/linodego v1.9.1 h1:29UpEPpYcGFnbwiJW8mbk/bjBZpgd/pv68io2IKTo34= +github.com/linode/linodego v1.9.3 h1:+lxNZw4avRxhCqGjwfPgQ2PvMT+vOL0OMsTdzixR7hQ= github.com/lovoo/gcloud-opentracing v0.3.0 h1:nAeKG70rIsog0TelcEtt6KU0Y1s5qXtsDLnHp0urPLU= github.com/lovoo/gcloud-opentracing v0.3.0/go.mod h1:ZFqk2y38kMDDikZPAK7ynTTGuyt17nSPdS3K5e+ZTBY= github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= @@ -805,6 +812,7 @@ github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnh github.com/oracle/oci-go-sdk/v65 v65.13.0 h1:0+9ea5goYfhI3/MPfbIQU6yzHYWE6sCk6VuUepxk5Nk= github.com/oracle/oci-go-sdk/v65 v65.13.0/go.mod h1:oyMrMa1vOzzKTmPN+kqrTR9y9kPA2tU1igN3NUSNTIE= github.com/orisano/pixelmatch v0.0.0-20210112091706-4fa4c7ba91d5 h1:1SoBaSPudixRecmlHXb/GxmaD3fLMtHIDN13QujwQuc= +github.com/ovh/go-ovh v1.1.0 h1:bHXZmw8nTgZin4Nv7JuaLs0KG5x54EQR7migYTd1zrk= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= @@ -840,15 +848,17 @@ github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= -github.com/prometheus/client_golang v1.13.0 h1:b71QUfeo5M8gq2+evJdTPfZhYMAU0uKPkyPJ7TPsloU= github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= +github.com/prometheus/client_golang v1.13.1 h1:3gMjIY2+/hzmqhtUC/aQNYldJA6DtH3CgQvwS+02K1c= +github.com/prometheus/client_golang v1.13.1/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= +github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= @@ -861,9 +871,9 @@ github.com/prometheus/common v0.37.0 h1:ccBbHCgIiT9uSoFY0vX8H3zsNR5eLt17/RQLUvn8 github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/common/sigv4 v0.1.0 h1:qoVebwtwwEhS85Czm2dSROY5fTo2PAPEVdDeppTwGX4= github.com/prometheus/common/sigv4 v0.1.0/go.mod h1:2Jkxxk9yYvCkE5G1sQT7GuEXm57JrvHu9k5YwTjsNtI= -github.com/prometheus/exporter-toolkit v0.7.0/go.mod h1:ZUBIj498ePooX9t/2xtDjeQYwvRpiPP2lh5u4iblj2g= -github.com/prometheus/exporter-toolkit v0.7.1 h1:c6RXaK8xBVercEeUQ4tRNL8UGWzDHfvj9dseo1FcK1Y= github.com/prometheus/exporter-toolkit v0.7.1/go.mod h1:ZUBIj498ePooX9t/2xtDjeQYwvRpiPP2lh5u4iblj2g= +github.com/prometheus/exporter-toolkit v0.8.1 h1:TpKt8z55q1zF30BYaZKqh+bODY0WtByHDOhDA2M9pEs= +github.com/prometheus/exporter-toolkit v0.8.1/go.mod h1:00shzmJL7KxcsabLWcONwpyNEuWhREOnFqZW7vadFS0= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190425082905-87a4384529e0/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -875,8 +885,10 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= -github.com/prometheus/prometheus v0.39.1 h1:abZM6A+sKAv2eKTbRIaHq4amM/nT07MuxRm0+QTaTj0= -github.com/prometheus/prometheus v0.39.1/go.mod h1:GjQjgLhHMc0oo4Ko7qt/yBSJMY4hUoiAZwsYQgjaePA= +github.com/prometheus/prometheus v0.40.1 h1:E/N2OO3gb0pM/tU18lXWARgL3pqvjMAJzBYsalp9q78= +github.com/prometheus/prometheus v0.40.1/go.mod h1:/UhsWkOXkO11wqTW2Bx5YDOwRweSDcaFBlTIzFe7P0Y= +github.com/rabenhorst/common v0.0.0-20221114111857-9eb1f146696e h1:cVCjZPyUtB5dgFxGZcpv7hHhf7aZkzzZqe6ix1KYdMo= +github.com/rabenhorst/common v0.0.0-20221114111857-9eb1f146696e/go.mod h1:dV2jU5Wgvk0eEIKeOLDNagFm1Z9C+q3n15rdnGRJYq0= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= @@ -936,24 +948,26 @@ github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3 github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.194/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y= github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.194/go.mod h1:yrBKWhChnDqNz1xuXdSbWXG56XawEq0G5j1lg4VwBD4= github.com/tencentyun/cos-go-sdk-v5 v0.7.34 h1:xm+Pg+6m486y4eugRI7/E4WasbVmpY1hp9QBSRErgp8= github.com/tencentyun/cos-go-sdk-v5 v0.7.34/go.mod h1:4dCEtLHGh8QPxHEkgq+nFaky7yZxQuYwgSJM87icDaw= github.com/thanos-community/galaxycache v0.0.0-20211122094458-3a32041a1f1e h1:f1Zsv7OAU9iQhZwigp50Yl38W10g/vd5NC8Rdk1Jzng= github.com/thanos-community/galaxycache v0.0.0-20211122094458-3a32041a1f1e/go.mod h1:jXcofnrSln/cLI6/dhlBxPQZEEQHVPCcFaH75M+nSzM= -github.com/thanos-community/promql-engine v0.0.0-20221101075408-6d5b22b2cd4d h1:UIqUy9mHwI1ZqAtxYiYmRhSlGCgRtfS9rFy2usHcA30= -github.com/thanos-community/promql-engine v0.0.0-20221101075408-6d5b22b2cd4d/go.mod h1:e3BzS0UVlHOKQa5STt/C0elYAa4Qp/7jyzp/Xf+e0C0= +github.com/thanos-community/promql-engine v0.0.0-20221113073407-ac31e29297ca h1:2g2z1uk98Bm/GvASekoYZmOmVpFfySiO9Lj7dNjl/fY= +github.com/thanos-community/promql-engine v0.0.0-20221113073407-ac31e29297ca/go.mod h1:GJkKOtKfXos1xbTmHBnX3YTCov8enxdAS1woR6/h4CI= github.com/thanos-io/objstore v0.0.0-20221006135717-79dcec7fe604 h1:9dceDSKKsLWNHjrMpyzK1t7eVcAZv9Dp3FX+uokUS2Y= github.com/thanos-io/objstore v0.0.0-20221006135717-79dcec7fe604/go.mod h1:Vx5dZs9ElxEhNLnum/OgB0pNTqNdI2zdXL82BeJr3T4= github.com/themihai/gomemcache v0.0.0-20180902122335-24332e2d58ab h1:7ZR3hmisBWw77ZpO1/o86g+JV3VKlk3d48jopJxzTjU= @@ -978,8 +992,6 @@ github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6 github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= -github.com/weaveworks/common v0.0.0-20220706100410-67d27ed40fae h1:Z8YibUpdBEdCq8nwrYXJQ8vYooevbmEBIdFpseXK3/8= -github.com/weaveworks/common v0.0.0-20220706100410-67d27ed40fae/go.mod h1:YfOOLoW1Q/jIIu0WLeSwgStmrKjuJEZSKTAUc+0KFvE= github.com/weaveworks/promrus v1.2.0 h1:jOLf6pe6/vss4qGHjXmGz4oDJQA+AOCqEL3FvvZGz7M= github.com/weaveworks/promrus v1.2.0/go.mod h1:SaE82+OJ91yqjrE1rsvBWVzNZKcHYFtMUyS1+Ogs/KA= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= @@ -1032,8 +1044,8 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.36.0 h1:qZ3KzA4qPzLBDtQyPk4ydjlg8zvXbNysnFHaVMKJbVo= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.36.0/go.mod h1:14Oo79mRwusSI02L0EfG3Gp1uF3+1wSL+D4zDysxyqs= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.36.4 h1:aUEBEdCa6iamGzg6fuYxDA8ThxvOG240mAvWDU+XLio= +go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.36.4/go.mod h1:l2MdsbKTocpPS5nQZscqTR9jd8u96VYZdcpF8Sye7mA= go.opentelemetry.io/contrib/propagators/autoprop v0.34.0 h1:S1iBWYnf1iqK4O/qnjUhQ2MMNis/h5+LeB/51+uzGHI= go.opentelemetry.io/contrib/propagators/autoprop v0.34.0/go.mod h1:lJppyBme+d8vGNukA9sHdlKvw/q4i4c9JXx2RTpuHmM= go.opentelemetry.io/contrib/propagators/aws v1.9.0 h1:60BnkzNPdU3WD12oOGQNTjgbyws8iDggIaBWpghvcVo= @@ -1046,26 +1058,26 @@ go.opentelemetry.io/contrib/propagators/ot v1.9.0 h1:+pYoqyFoA3H6EZ7Wie2ZQdqS4Zf go.opentelemetry.io/contrib/propagators/ot v1.9.0/go.mod h1:D2GfaecHHX67fXT93/5iKl2DArjt8+H0XWtFD8b4Z+k= go.opentelemetry.io/contrib/samplers/jaegerremote v0.3.0 h1:SLLzX5hdPC0jR3t0MrmRhZkKZJ0UKhcB+0N/wWkiarQ= go.opentelemetry.io/contrib/samplers/jaegerremote v0.3.0/go.mod h1:QnxuwZJaTvT5YN/25CLle62v/7gal96wXN/CSOhWMaI= -go.opentelemetry.io/otel v1.10.0 h1:Y7DTJMR6zs1xkS/upamJYk0SxxN4C9AqRd77jmZnyY4= -go.opentelemetry.io/otel v1.10.0/go.mod h1:NbvWjCthWHKBEUMpf0/v8ZRZlni86PpGFEMA9pnQSnQ= +go.opentelemetry.io/otel v1.11.1 h1:4WLLAmcfkmDk2ukNXJyq3/kiz/3UzCaYq6PskJsaou4= +go.opentelemetry.io/otel v1.11.1/go.mod h1:1nNhXBbWSD0nsL38H6btgnFN2k4i0sNLHNNMZMSbUGE= go.opentelemetry.io/otel/bridge/opentracing v1.10.0 h1:WzAVGovpC1s7KD5g4taU6BWYZP3QGSDVTlbRu9fIHw8= go.opentelemetry.io/otel/bridge/opentracing v1.10.0/go.mod h1:J7GLR/uxxqMAzZptsH0pjte3Ep4GacTCrbGBoDuHBqk= go.opentelemetry.io/otel/exporters/jaeger v1.8.0 h1:TLLqD6kDhLPziEC7pgPrMvP9lAqdk3n1gf8DiFSnfW8= go.opentelemetry.io/otel/exporters/jaeger v1.8.0/go.mod h1:GbWg+ng88rDtx+id26C34QLqw2erqJeAjsCx9AFeHfE= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0 h1:TaB+1rQhddO1sF71MpZOZAuSPW1klK2M8XxfrBMfK7Y= -go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.10.0/go.mod h1:78XhIg8Ht9vR4tbLNUhXsiOnE2HOuSeKAiAcoVQEpOY= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0 h1:pDDYmo0QadUPal5fwXoY1pmMpFcdyhXOmL5drCrI3vU= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.10.0/go.mod h1:Krqnjl22jUJ0HgMzw5eveuCvFDXY4nSYb4F8t5gdrag= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0 h1:KtiUEhQmj/Pa874bVYKGNVdq8NPKiacPbaRRtgXi+t4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.10.0/go.mod h1:OfUCyyIiDvNXHWpcWgbF+MWvqPZiNa3YDEnivcnYsV0= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.10.0 h1:S8DedULB3gp93Rh+9Z+7NTEv+6Id/KYS7LDyipZ9iCE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.10.0/go.mod h1:5WV40MLWwvWlGP7Xm8g3pMcg0pKOUY609qxJn8y7LmM= -go.opentelemetry.io/otel/metric v0.32.0 h1:lh5KMDB8xlMM4kwE38vlZJ3rZeiWrjw3As1vclfC01k= -go.opentelemetry.io/otel/metric v0.32.0/go.mod h1:PVDNTt297p8ehm949jsIzd+Z2bIZJYQQG/uuHTeWFHY= -go.opentelemetry.io/otel/sdk v1.10.0 h1:jZ6K7sVn04kk/3DNUdJ4mqRlGDiXAVuIG+MMENpTNdY= -go.opentelemetry.io/otel/sdk v1.10.0/go.mod h1:vO06iKzD5baltJz1zarxMCNHFpUlUiOy4s65ECtn6kE= -go.opentelemetry.io/otel/trace v1.10.0 h1:npQMbR8o7mum8uF95yFbOEJffhs1sbCOfDh8zAJiH5E= -go.opentelemetry.io/otel/trace v1.10.0/go.mod h1:Sij3YYczqAdz+EhmGhE6TpTxUO5/F/AzrK+kxfGqySM= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.1 h1:X2GndnMCsUPh6CiY2a+frAbNsXaPLbB0soHRYhAZ5Ig= +go.opentelemetry.io/otel/exporters/otlp/internal/retry v1.11.1/go.mod h1:i8vjiSzbiUC7wOQplijSXMYUpNM93DtlS5CbUT+C6oQ= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.1 h1:MEQNafcNCB0uQIti/oHgU7CZpUMYQ7qigBwMVKycHvc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.11.1/go.mod h1:19O5I2U5iys38SsmT2uDJja/300woyzE1KPIQxEUBUc= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.1 h1:LYyG/f1W/jzAix16jbksJfMQFpOH/Ma6T639pVPMgfI= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.11.1/go.mod h1:QrRRQiY3kzAoYPNLP0W/Ikg0gR6V3LMc+ODSxr7yyvg= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.11.1 h1:tFl63cpAAcD9TOU6U8kZU7KyXuSRYAZlbx1C61aaB74= +go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.11.1/go.mod h1:X620Jww3RajCJXw/unA+8IRTgxkdS7pi+ZwK9b7KUJk= +go.opentelemetry.io/otel/metric v0.33.0 h1:xQAyl7uGEYvrLAiV/09iTJlp1pZnQ9Wl793qbVvED1E= +go.opentelemetry.io/otel/metric v0.33.0/go.mod h1:QlTYc+EnYNq/M2mNk1qDDMRLpqCOj2f/r5c7Fd5FYaI= +go.opentelemetry.io/otel/sdk v1.11.1 h1:F7KmQgoHljhUuJyA+9BiU+EkJfyX5nVVF4wyzWZpKxs= +go.opentelemetry.io/otel/sdk v1.11.1/go.mod h1:/l3FE4SupHJ12TduVjUkZtlfFqDCQJlOlithYrdktys= +go.opentelemetry.io/otel/trace v1.11.1 h1:ofxdnzsNrGBYXbP7t7zpUK281+go5rF7dvdIZXF8gdQ= +go.opentelemetry.io/otel/trace v1.11.1/go.mod h1:f/Q9G7vzk5u91PhbmKbg1Qn0rzH1LJ4vbPHFGkTPtOk= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= @@ -1108,8 +1120,9 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c= -golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20221012134737-56aed061732a/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.1.0 h1:MDRAIl0xIo9Io2xV565hzXHw3zVseKrJKodhohM5CjU= +golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1120,8 +1133,8 @@ golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e h1:+WEEuIdZHnUeJJmEUjyYC2gfUMj69yZXw17EnHg/otA= -golang.org/x/exp v0.0.0-20220722155223-a9213eeb770e/go.mod h1:Kr81I6Kryrl9sr8s2FK3vxD90NdsKWRuOIl2O4CvYbA= +golang.org/x/exp v0.0.0-20221031165847-c99f073a8326 h1:QfTh0HpN6hlw6D3vu8DAwC8pBIwikq0AI1evdm+FksE= +golang.org/x/exp v0.0.0-20221031165847-c99f073a8326/go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -1148,8 +1161,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.6.0 h1:b9gGHsz9/HhJ3HF5DHQytPpuwocVTChQJK3AvoLRD5I= +golang.org/x/mod v0.6.0/go.mod h1:4mET923SAdbXp2ki8ey+zGs1SLqsuM2Y0uvdZR/fUNI= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1209,8 +1222,8 @@ golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= -golang.org/x/net v0.0.0-20220920203100-d0c6ba3f52d9 h1:asZqf0wXastQr+DudYagQS8uBO8bHKeYD1vbAvGmFL8= -golang.org/x/net v0.0.0-20220920203100-d0c6ba3f52d9/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= +golang.org/x/net v0.1.0 h1:hZ/3BUoy5aId7sCpA/Tc5lt8DkFgdVS2onTpJsZ/fl0= +golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1231,9 +1244,9 @@ golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= -golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= -golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 h1:lxqLZaMad/dJHMFZH0NiNpiEZI/nhgWhe4wgzpE+MuA= golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= +golang.org/x/oauth2 v0.1.0 h1:isLCZuhj4v+tYv7eskaN4v/TM+A1begWWgyVJDdl1+Y= +golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1247,8 +1260,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220907140024-f12130a52804 h1:0SH2R3f1b1VmIMG7BXbEZCBUu2dKmHschSmjqGUrW8A= -golang.org/x/sync v0.0.0-20220907140024-f12130a52804/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1347,12 +1360,13 @@ golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8 h1:h+EGohizhe9XlX18rfpa8k8RAc5XyaeamM+0VHRd4lc= -golang.org/x/sys v0.0.0-20220919091848-fb04ddd9f9c8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0 h1:kunALQeHf1/185U1i0GOB/fy1IPRDDpuoOOqRReG57U= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.1.0 h1:g6Z6vPFA9dYBAF7DWcH6sCcOntplXsDKcliusYijMlw= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1361,14 +1375,15 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= +golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20220920022843-2ce7c2934d45 h1:yuLAip3bfURHClMG9VBdzPrQvCWjWiWUTBGV+/fCbUs= -golang.org/x/time v0.0.0-20220920022843-2ce7c2934d45/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA= +golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -1436,16 +1451,17 @@ golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.6-0.20210726203631-07bc1bf47fb2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= -golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.2.0 h1:G6AHpWxTMGY1KyEYoAQ5WTtIekUUvDNjan3ugu60JvE= +golang.org/x/tools v0.2.0/go.mod h1:y4OqIKeOV/fWJetJ8bXPU1sEVniLMIyDAZWeHdV+NTA= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= -golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f h1:uF6paiQQebLeSXkrTqHqz0MXhXXS1KgF41eUdBNvxK0= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gonum.org/v1/gonum v0.12.0 h1:xKuo6hzt+gMav00meVPUlXwSdoEJP46BR+wdxQEFK2o= gonum.org/v1/gonum v0.12.0/go.mod h1:73TDxJfAAHeA8Mk9mf8NlIppyhQNo5GLTcYeqgo2lvY= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= @@ -1488,8 +1504,8 @@ google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69 google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= -google.golang.org/api v0.97.0 h1:x/vEL1XDF/2V4xzdNgFPaKHluRESo2aTsL7QzHnBtGQ= -google.golang.org/api v0.97.0/go.mod h1:w7wJQLTM+wvQpNf5JyEcBoxK0RH7EDrh/L4qfsuJ13s= +google.golang.org/api v0.102.0 h1:JxJl2qQ85fRMPNvlZY/enexbxpCjLwGhZUtgfGeQ51I= +google.golang.org/api v0.102.0/go.mod h1:3VFl6/fzoA+qNuS1N1/VfXY4LjoXN/wzeIp7TweWwGo= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -1580,9 +1596,8 @@ google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220624142145-8cd45d7dbd1f/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= -google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006 h1:mmbq5q8M1t7dhkLw320YK4PsOXm6jdnUAkErImaIqOg= -google.golang.org/genproto v0.0.0-20220920201722-2b89144ce006/go.mod h1:ht8XFiar2npT/g4vkk7O0WYS1sHOHbdujxbEp7CJWbw= +google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c h1:QgY/XxIAIeccR+Ca/rDdKubLIU9rcJ3xfy1DC/Wd2Oo= +google.golang.org/genproto v0.0.0-20221027153422-115e99e71e1c/go.mod h1:CGI5F/G+E5bKwmfYo09AXuVN4dD894kIKUFmVbP2/Fo= google.golang.org/grpc v1.45.0 h1:NEpgUqV3Z+ZjkqMsxMg11IaDrXY4RY6CQukSGK0uI1M= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= @@ -1647,9 +1662,9 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= howett.net/plist v0.0.0-20181124034731-591f970eefbb h1:jhnBjNi9UFpfpl8YZhA9CrOqpnJdvzuiHsl/dnxl11M= howett.net/plist v0.0.0-20181124034731-591f970eefbb/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= -k8s.io/api v0.25.1 h1:yL7du50yc93k17nH/Xe9jujAYrcDkI/i5DL1jPz4E3M= -k8s.io/apimachinery v0.25.1 h1:t0XrnmCEHVgJlR2arwO8Awp9ylluDic706WePaYCBTI= -k8s.io/client-go v0.25.1 h1:uFj4AJKtE1/ckcSKz8IhgAuZTdRXZDKev8g387ndD58= +k8s.io/api v0.25.3 h1:Q1v5UFfYe87vi5H7NU0p4RXC26PPMT8KOpr1TLQbCMQ= +k8s.io/apimachinery v0.25.3 h1:7o9ium4uyUOM76t6aunP0nZuex7gDf8VGwkR5RcJnQc= +k8s.io/client-go v0.25.3 h1:oB4Dyl8d6UbfDHD8Bv8evKylzs3BXzzufLiO27xuPs0= k8s.io/kube-openapi v0.0.0-20220803162953-67bda5d908f1 h1:MQ8BAZPZlWk3S9K4a9NCkIFQtZShWqoha7snGixVgEA= k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed h1:jAne/RjBTyawwAy0utX5eqigAwz/lQhTmy+Hr/Cpue4= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= diff --git a/internal/cortex/chunk/encoding/bigchunk.go b/internal/cortex/chunk/encoding/bigchunk.go index 187ee197f41..e8f93497cfe 100644 --- a/internal/cortex/chunk/encoding/bigchunk.go +++ b/internal/cortex/chunk/encoding/bigchunk.go @@ -278,7 +278,7 @@ func (it *bigchunkIterator) FindAtOrAfter(target model.Time) bool { it.curr = it.chunks[it.i].Iterator(it.curr) } - for it.curr.Next() { + for it.curr.Next() != chunkenc.ValNone { t, _ := it.curr.At() if t >= int64(target) { return true @@ -296,7 +296,7 @@ func (it *bigchunkIterator) FindAtOrAfter(target model.Time) bool { } func (it *bigchunkIterator) Scan() bool { - if it.curr.Next() { + if it.curr.Next() != chunkenc.ValNone { return true } if err := it.curr.Err(); err != nil { @@ -306,7 +306,7 @@ func (it *bigchunkIterator) Scan() bool { for it.i < len(it.chunks)-1 { it.i++ it.curr = it.chunks[it.i].Iterator(it.curr) - if it.curr.Next() { + if it.curr.Next() != chunkenc.ValNone { return true } } @@ -348,7 +348,7 @@ func (it *bigchunkIterator) Err() error { func firstTime(c chunkenc.Chunk, iter chunkenc.Iterator) (int64, chunkenc.Iterator, error) { var first int64 iter = c.Iterator(iter) - if iter.Next() { + if iter.Next() != chunkenc.ValNone { first, _ = iter.At() } return first, iter, iter.Err() diff --git a/internal/cortex/chunk/encoding/prometheus_chunk.go b/internal/cortex/chunk/encoding/prometheus_chunk.go index 69ee16cd55a..f72148bc3ea 100644 --- a/internal/cortex/chunk/encoding/prometheus_chunk.go +++ b/internal/cortex/chunk/encoding/prometheus_chunk.go @@ -106,14 +106,14 @@ type prometheusChunkIterator struct { } func (p *prometheusChunkIterator) Scan() bool { - return p.it.Next() + return p.it.Next() != chunkenc.ValNone } func (p *prometheusChunkIterator) FindAtOrAfter(time model.Time) bool { // FindAtOrAfter must return OLDEST value at given time. That means we need to start with a fresh iterator, // otherwise we cannot guarantee OLDEST. p.it = p.c.Iterator(p.it) - return p.it.Seek(int64(time)) + return p.it.Seek(int64(time)) != chunkenc.ValNone } func (p *prometheusChunkIterator) Value() model.SamplePair { @@ -132,7 +132,7 @@ func (p *prometheusChunkIterator) Batch(size int) Batch { batch.Timestamps[j] = t batch.Values[j] = v j++ - if j < size && !p.it.Next() { + if j < size && p.it.Next() == chunkenc.ValNone { break } } diff --git a/internal/cortex/querier/batch/batch.go b/internal/cortex/querier/batch/batch.go index 8677d376a4c..a58c39886d4 100644 --- a/internal/cortex/querier/batch/batch.go +++ b/internal/cortex/querier/batch/batch.go @@ -5,6 +5,7 @@ package batch import ( "github.com/prometheus/common/model" + "github.com/prometheus/prometheus/model/histogram" "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/thanos-io/thanos/internal/cortex/chunk" @@ -84,22 +85,23 @@ func newIteratorAdapter(underlying iterator) chunkenc.Iterator { } } +// TODO(rabenhorst): Native histogram support needs to be added, float type is hardcoded. // Seek implements chunkenc.Iterator. -func (a *iteratorAdapter) Seek(t int64) bool { +func (a *iteratorAdapter) Seek(t int64) chunkenc.ValueType { // Optimisation: fulfill the seek using current batch if possible. if a.curr.Length > 0 && a.curr.Index < a.curr.Length { if t <= a.curr.Timestamps[a.curr.Index] { //In this case, the interface's requirement is met, so state of this //iterator does not need any change. - return true + return chunkenc.ValFloat } else if t <= a.curr.Timestamps[a.curr.Length-1] { //In this case, some timestamp between current sample and end of batch can fulfill //the seek. Let's find it. for a.curr.Index < a.curr.Length && t > a.curr.Timestamps[a.curr.Index] { a.curr.Index++ } - return true + return chunkenc.ValFloat } } @@ -107,13 +109,15 @@ func (a *iteratorAdapter) Seek(t int64) bool { a.batchSize = 1 if a.underlying.Seek(t, a.batchSize) { a.curr = a.underlying.Batch() - return a.curr.Index < a.curr.Length + if a.curr.Index < a.curr.Length { + return chunkenc.ValFloat + } } - return false + return chunkenc.ValNone } // Next implements chunkenc.Iterator. -func (a *iteratorAdapter) Next() bool { +func (a *iteratorAdapter) Next() chunkenc.ValueType { a.curr.Index++ for a.curr.Index >= a.curr.Length && a.underlying.Next(a.batchSize) { a.curr = a.underlying.Batch() @@ -122,7 +126,12 @@ func (a *iteratorAdapter) Next() bool { a.batchSize = promchunk.BatchSize } } - return a.curr.Index < a.curr.Length + + if a.curr.Index < a.curr.Length { + return chunkenc.ValFloat + } + + return chunkenc.ValNone } // At implements chunkenc.Iterator. @@ -130,6 +139,19 @@ func (a *iteratorAdapter) At() (int64, float64) { return a.curr.Timestamps[a.curr.Index], a.curr.Values[a.curr.Index] } +// TODO(rabenhorst): Needs to be implemented for native histogram support. +func (a *iteratorAdapter) AtHistogram() (int64, *histogram.Histogram) { + panic("not implemented") +} + +func (a *iteratorAdapter) AtFloatHistogram() (int64, *histogram.FloatHistogram) { + panic("not implemented") +} + +func (a *iteratorAdapter) AtT() int64 { + return a.curr.Timestamps[a.curr.Index] +} + // Err implements chunkenc.Iterator. func (a *iteratorAdapter) Err() error { return nil diff --git a/internal/cortex/querier/batch/batch_test.go b/internal/cortex/querier/batch/batch_test.go index fc0004a07f6..6dd620621f0 100644 --- a/internal/cortex/querier/batch/batch_test.go +++ b/internal/cortex/querier/batch/batch_test.go @@ -9,6 +9,7 @@ import ( "time" "github.com/prometheus/common/model" + "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/stretchr/testify/require" "github.com/thanos-io/thanos/internal/cortex/chunk" @@ -50,7 +51,7 @@ func BenchmarkNewChunkMergeIterator_CreateAndIterate(b *testing.B) { for n := 0; n < b.N; n++ { it := NewChunkMergeIterator(chunks, 0, 0) - for it.Next() { + for it.Next() != chunkenc.ValNone { it.At() } @@ -71,8 +72,8 @@ func TestSeekCorrectlyDealWithSinglePointChunks(t *testing.T) { sut := NewChunkMergeIterator(chunks, 0, 0) // Following calls mimics Prometheus's query engine behaviour for VectorSelector. - require.True(t, sut.Next()) - require.True(t, sut.Seek(0)) + require.NotEqual(t, chunkenc.ValNone, sut.Next()) + require.NotEqual(t, chunkenc.ValNone, sut.Seek(0)) actual, val := sut.At() require.Equal(t, float64(1*time.Second/time.Millisecond), val) // since mkChunk use ts as value. diff --git a/internal/cortex/querier/batch/chunk_test.go b/internal/cortex/querier/batch/chunk_test.go index 8ffdaa225bd..f6d46609ad4 100644 --- a/internal/cortex/querier/batch/chunk_test.go +++ b/internal/cortex/querier/batch/chunk_test.go @@ -74,20 +74,20 @@ func mkGenericChunk(t require.TestingT, from model.Time, points int, enc promchu func testIter(t require.TestingT, points int, iter chunkenc.Iterator) { ets := model.TimeFromUnix(0) for i := 0; i < points; i++ { - require.True(t, iter.Next(), strconv.Itoa(i)) + require.NotEqual(t, chunkenc.ValNone, iter.Next(), strconv.Itoa(i)) ts, v := iter.At() require.EqualValues(t, int64(ets), ts, strconv.Itoa(i)) require.EqualValues(t, float64(ets), v, strconv.Itoa(i)) ets = ets.Add(step) } - require.False(t, iter.Next()) + require.Equal(t, chunkenc.ValNone, iter.Next()) } func testSeek(t require.TestingT, points int, iter chunkenc.Iterator) { for i := 0; i < points; i += points / 10 { ets := int64(i * int(step/time.Millisecond)) - require.True(t, iter.Seek(ets)) + require.NotEqual(t, chunkenc.ValNone, iter.Seek(ets)) ts, v := iter.At() require.EqualValues(t, ets, ts) require.EqualValues(t, v, float64(ets)) @@ -95,7 +95,7 @@ func testSeek(t require.TestingT, points int, iter chunkenc.Iterator) { for j := i + 1; j < i+points/10; j++ { ets := int64(j * int(step/time.Millisecond)) - require.True(t, iter.Next()) + require.NotEqual(t, chunkenc.ValNone, iter.Next()) ts, v := iter.At() require.EqualValues(t, ets, ts) require.EqualValues(t, float64(ets), v) diff --git a/internal/cortex/querier/block.go b/internal/cortex/querier/block.go index b8bc0b00aea..dd059f80ab3 100644 --- a/internal/cortex/querier/block.go +++ b/internal/cortex/querier/block.go @@ -8,6 +8,7 @@ import ( "sort" "github.com/pkg/errors" + "github.com/prometheus/prometheus/model/histogram" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunkenc" @@ -142,17 +143,18 @@ type blockQuerierSeriesIterator struct { lastT int64 } -func (it *blockQuerierSeriesIterator) Seek(t int64) bool { +// TODO(rabenhorst): Native histogram support needs to be added, float type is hardcoded. +func (it *blockQuerierSeriesIterator) Seek(t int64) chunkenc.ValueType { // We generally expect the chunks already to be cut down // to the range we are interested in. There's not much to be gained from // hopping across chunks so we just call next until we reach t. for { ct, _ := it.At() if ct >= t { - return true + return chunkenc.ValFloat } - if !it.Next() { - return false + if it.Next() == chunkenc.ValNone { + return chunkenc.ValNone } } } @@ -167,30 +169,44 @@ func (it *blockQuerierSeriesIterator) At() (int64, float64) { return t, v } -func (it *blockQuerierSeriesIterator) Next() bool { +// TODO(rabenhorst): Needs to be implemented for native histogram support. +func (it *blockQuerierSeriesIterator) AtHistogram() (int64, *histogram.Histogram) { + panic("not implemented") +} + +func (it *blockQuerierSeriesIterator) AtFloatHistogram() (int64, *histogram.FloatHistogram) { + panic("not implemented") +} + +func (it *blockQuerierSeriesIterator) AtT() int64 { + t, _ := it.At() + return t +} + +func (it *blockQuerierSeriesIterator) Next() chunkenc.ValueType { if it.i >= len(it.iterators) { - return false + return chunkenc.ValNone } - if it.iterators[it.i].Next() { - return true + if valueType := it.iterators[it.i].Next(); valueType != chunkenc.ValNone { + return valueType } if it.iterators[it.i].Err() != nil { - return false + return chunkenc.ValNone } for { it.i++ if it.i >= len(it.iterators) { - return false + return chunkenc.ValNone } // we must advance iterator first, to see if it has any samples. // Seek will call At() as its first operation. - if !it.iterators[it.i].Next() { + if it.iterators[it.i].Next() == chunkenc.ValNone { if it.iterators[it.i].Err() != nil { - return false + return chunkenc.ValNone } // Found empty iterator without error, skip it. diff --git a/internal/cortex/querier/block_test.go b/internal/cortex/querier/block_test.go index 1ad0b5d78db..176ecc4c003 100644 --- a/internal/cortex/querier/block_test.go +++ b/internal/cortex/querier/block_test.go @@ -81,7 +81,7 @@ func TestBlockQuerierSeries(t *testing.T) { sampleIx := 0 it := series.Iterator() - for it.Next() { + for it.Next() != chunkenc.ValNone { ts, val := it.At() require.True(t, sampleIx < len(testData.expectedSamples)) assert.Equal(t, int64(testData.expectedSamples[sampleIx].Timestamp), ts) @@ -211,7 +211,7 @@ func verifyNextSeries(t *testing.T, ss storage.SeriesSet, labels labels.Labels, prevTS := int64(0) count := 0 - for it := s.Iterator(); it.Next(); { + for it := s.Iterator(); it.Next() != chunkenc.ValNone; { count++ ts, v := it.At() require.Equal(t, math.Sin(float64(ts)), v) @@ -336,7 +336,7 @@ func Benchmark_blockQuerierSeriesSet_iteration(b *testing.B) { set := blockQuerierSeriesSet{series: series} for set.Next() { - for t := set.At().Iterator(); t.Next(); { + for t := set.At().Iterator(); t.Next() != chunkenc.ValNone; { t.At() } } diff --git a/internal/cortex/querier/blocks_store_queryable_test.go b/internal/cortex/querier/blocks_store_queryable_test.go index be9713efe32..90b1bf7e2f4 100644 --- a/internal/cortex/querier/blocks_store_queryable_test.go +++ b/internal/cortex/querier/blocks_store_queryable_test.go @@ -664,7 +664,7 @@ func TestBlocksStoreQuerier_Select(t *testing.T) { var actualValues []valueResult it := set.At().Iterator() - for it.Next() { + for it.Next() != chunkenc.ValNone { t, v := it.At() actualValues = append(actualValues, valueResult{ t: t, diff --git a/internal/cortex/querier/distributor_queryable_test.go b/internal/cortex/querier/distributor_queryable_test.go index 51bada69f52..3aa1129eaae 100644 --- a/internal/cortex/querier/distributor_queryable_test.go +++ b/internal/cortex/querier/distributor_queryable_test.go @@ -12,6 +12,7 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" + "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" @@ -300,13 +301,13 @@ func verifySeries(t *testing.T, series storage.Series, l labels.Labels, samples it := series.Iterator() for _, s := range samples { - require.True(t, it.Next()) + require.NotEqual(t, chunkenc.ValNone, it.Next()) require.Nil(t, it.Err()) ts, v := it.At() require.Equal(t, s.Value, v) require.Equal(t, s.TimestampMs, ts) } - require.False(t, it.Next()) + require.Equal(t, chunkenc.ValNone, it.Next()) require.Nil(t, it.Err()) } func TestDistributorQuerier_LabelNames(t *testing.T) { diff --git a/internal/cortex/querier/iterators/chunk_merge_iterator.go b/internal/cortex/querier/iterators/chunk_merge_iterator.go index f34dc6ca91d..d2237358480 100644 --- a/internal/cortex/querier/iterators/chunk_merge_iterator.go +++ b/internal/cortex/querier/iterators/chunk_merge_iterator.go @@ -8,6 +8,7 @@ import ( "sort" "github.com/prometheus/common/model" + "github.com/prometheus/prometheus/model/histogram" "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/thanos-io/thanos/internal/cortex/chunk" @@ -32,7 +33,7 @@ func NewChunkMergeIterator(cs []chunk.Chunk, _, _ model.Time) chunkenc.Iterator } for _, iter := range c.its { - if iter.Next() { + if iter.Next() != chunkenc.ValNone { c.h = append(c.h, iter) continue } @@ -76,18 +77,19 @@ outer: return its } -func (c *chunkMergeIterator) Seek(t int64) bool { +// TODO(rabenhorst): Native histogram support needs to be added, float type is hardcoded. +func (c *chunkMergeIterator) Seek(t int64) chunkenc.ValueType { c.h = c.h[:0] for _, iter := range c.its { - if iter.Seek(t) { + if iter.Seek(t) != chunkenc.ValNone { c.h = append(c.h, iter) continue } if err := iter.Err(); err != nil { c.currErr = err - return false + return chunkenc.ValNone } } @@ -95,22 +97,22 @@ func (c *chunkMergeIterator) Seek(t int64) bool { if len(c.h) > 0 { c.currTime, c.currValue = c.h[0].At() - return true + return chunkenc.ValFloat } - return false + return chunkenc.ValNone } -func (c *chunkMergeIterator) Next() bool { +func (c *chunkMergeIterator) Next() chunkenc.ValueType { if len(c.h) == 0 { - return false + return chunkenc.ValNone } lastTime := c.currTime for c.currTime == lastTime && len(c.h) > 0 { c.currTime, c.currValue = c.h[0].At() - if c.h[0].Next() { + if c.h[0].Next() != chunkenc.ValNone { heap.Fix(&c.h, 0) continue } @@ -118,17 +120,34 @@ func (c *chunkMergeIterator) Next() bool { iter := heap.Pop(&c.h).(chunkenc.Iterator) if err := iter.Err(); err != nil { c.currErr = err - return false + return chunkenc.ValNone } } - return c.currTime != lastTime + if c.currTime != lastTime { + return chunkenc.ValFloat + } + + return chunkenc.ValNone } func (c *chunkMergeIterator) At() (t int64, v float64) { return c.currTime, c.currValue } +// TODO(rabenhorst): Needs to be implemented for native histogram support. +func (c *chunkMergeIterator) AtHistogram() (int64, *histogram.Histogram) { + panic("not implemented") +} + +func (c *chunkMergeIterator) AtFloatHistogram() (int64, *histogram.FloatHistogram) { + panic("not implemented") +} + +func (c *chunkMergeIterator) AtT() int64 { + return c.currTime +} + func (c *chunkMergeIterator) Err() error { return c.currErr } @@ -180,22 +199,27 @@ func newNonOverlappingIterator(chunks []*chunkIterator) *nonOverlappingIterator } } -func (it *nonOverlappingIterator) Seek(t int64) bool { +// TODO(rabenhorst): Native histogram support needs to be added, float type is hardcoded. +func (it *nonOverlappingIterator) Seek(t int64) chunkenc.ValueType { for ; it.curr < len(it.chunks); it.curr++ { if it.chunks[it.curr].Seek(t) { - return true + return chunkenc.ValFloat } } - return false + return chunkenc.ValNone } -func (it *nonOverlappingIterator) Next() bool { +func (it *nonOverlappingIterator) Next() chunkenc.ValueType { for it.curr < len(it.chunks) && !it.chunks[it.curr].Next() { it.curr++ } - return it.curr < len(it.chunks) + if it.curr < len(it.chunks) { + return chunkenc.ValFloat + } + + return chunkenc.ValNone } func (it *nonOverlappingIterator) AtTime() int64 { @@ -206,6 +230,19 @@ func (it *nonOverlappingIterator) At() (int64, float64) { return it.chunks[it.curr].At() } +// TODO(rabenhorst): Needs to be implemented for native histogram support. +func (it *nonOverlappingIterator) AtHistogram() (int64, *histogram.Histogram) { + panic("not implemented") +} + +func (it *nonOverlappingIterator) AtFloatHistogram() (int64, *histogram.FloatHistogram) { + panic("not implemented") +} + +func (it *nonOverlappingIterator) AtT() int64 { + return it.chunks[it.curr].AtTime() +} + func (it *nonOverlappingIterator) Err() error { return nil } diff --git a/internal/cortex/querier/iterators/chunk_merge_iterator_test.go b/internal/cortex/querier/iterators/chunk_merge_iterator_test.go index d23061f21db..93c1be37a7c 100644 --- a/internal/cortex/querier/iterators/chunk_merge_iterator_test.go +++ b/internal/cortex/querier/iterators/chunk_merge_iterator_test.go @@ -10,6 +10,7 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -62,13 +63,13 @@ func TestChunkMergeIterator(t *testing.T) { t.Run(strconv.Itoa(i), func(t *testing.T) { iter := NewChunkMergeIterator(tc.chunks, 0, 0) for i := tc.mint; i < tc.maxt; i++ { - require.True(t, iter.Next()) + require.NotEqual(t, chunkenc.ValNone, iter.Next()) ts, s := iter.At() assert.Equal(t, i, ts) assert.Equal(t, float64(i), s) assert.NoError(t, iter.Err()) } - assert.False(t, iter.Next()) + assert.Equal(t, chunkenc.ValNone, iter.Next()) }) } } @@ -81,20 +82,20 @@ func TestChunkMergeIteratorSeek(t *testing.T) { }, 0, 0) for i := int64(0); i < 10; i += 20 { - require.True(t, iter.Seek(i)) + require.NotEqual(t, chunkenc.ValNone, iter.Seek(i)) ts, s := iter.At() assert.Equal(t, i, ts) assert.Equal(t, float64(i), s) assert.NoError(t, iter.Err()) for j := i + 1; j < 200; j++ { - require.True(t, iter.Next()) + require.NotEqual(t, chunkenc.ValNone, iter.Next()) ts, s := iter.At() assert.Equal(t, j, ts) assert.Equal(t, float64(j), s) assert.NoError(t, iter.Err()) } - assert.False(t, iter.Next()) + require.Equal(t, chunkenc.ValNone, iter.Next()) } } diff --git a/internal/cortex/querier/queryrange/promql_test.go b/internal/cortex/querier/queryrange/promql_test.go index 9c5d92ebb21..96057988863 100644 --- a/internal/cortex/querier/queryrange/promql_test.go +++ b/internal/cortex/querier/queryrange/promql_test.go @@ -17,6 +17,7 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/storage" + "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/stretchr/testify/require" "github.com/thanos-io/thanos/internal/cortex/querier/astmapper" @@ -670,7 +671,7 @@ func splitByShard(shardIndex, shardTotal int, testMatrices *testMatrix) *testMat } var points []promql.Point it := s.Iterator() - for it.Next() { + for it.Next() != chunkenc.ValNone { t, v := it.At() points = append(points, promql.Point{ T: t, diff --git a/internal/cortex/querier/queryrange/series_test.go b/internal/cortex/querier/queryrange/series_test.go index c8b38ee0c91..d41bc43a921 100644 --- a/internal/cortex/querier/queryrange/series_test.go +++ b/internal/cortex/querier/queryrange/series_test.go @@ -7,6 +7,7 @@ import ( "testing" "github.com/prometheus/prometheus/promql/parser" + "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/stretchr/testify/require" "github.com/thanos-io/thanos/internal/cortex/cortexpb" @@ -64,7 +65,7 @@ func Test_ResponseToSamples(t *testing.T) { require.Nil(t, set.Err()) sampleCt := 0 - for iter.Next() { + for iter.Next() != chunkenc.ValNone { ts, v := iter.At() require.Equal(t, input.Data.Result[setCt].Samples[sampleCt].TimestampMs, ts) require.Equal(t, input.Data.Result[setCt].Samples[sampleCt].Value, v) diff --git a/internal/cortex/querier/queryrange/test_utils_test.go b/internal/cortex/querier/queryrange/test_utils_test.go index dae02bc9024..559bd701d85 100644 --- a/internal/cortex/querier/queryrange/test_utils_test.go +++ b/internal/cortex/querier/queryrange/test_utils_test.go @@ -9,6 +9,7 @@ import ( "testing" "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/stretchr/testify/require" "github.com/thanos-io/thanos/internal/cortex/querier/astmapper" @@ -126,7 +127,7 @@ func TestNewMockShardedqueryable(t *testing.T) { seriesCt++ iter := set.At().Iterator() samples := 0 - for iter.Next() { + for iter.Next() != chunkenc.ValNone { samples++ } require.Equal(t, tc.nSamples, samples) diff --git a/internal/cortex/querier/remote_read.go b/internal/cortex/querier/remote_read.go index f34736e3270..5a4545516e5 100644 --- a/internal/cortex/querier/remote_read.go +++ b/internal/cortex/querier/remote_read.go @@ -9,6 +9,7 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/prometheus/prometheus/storage" + "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/thanos-io/thanos/internal/cortex/cortexpb" "github.com/thanos-io/thanos/internal/cortex/ingester/client" @@ -85,7 +86,7 @@ func seriesSetToQueryResponse(s storage.SeriesSet) (*client.QueryResponse, error series := s.At() samples := []cortexpb.Sample{} it := series.Iterator() - for it.Next() { + for it.Next() != chunkenc.ValNone { t, v := it.At() samples = append(samples, cortexpb.Sample{ TimestampMs: t, diff --git a/internal/cortex/querier/series/series_set.go b/internal/cortex/querier/series/series_set.go index 32428687efd..d1f20439236 100644 --- a/internal/cortex/querier/series/series_set.go +++ b/internal/cortex/querier/series/series_set.go @@ -23,6 +23,7 @@ import ( "sort" "github.com/prometheus/common/model" + "github.com/prometheus/prometheus/model/histogram" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunkenc" @@ -106,11 +107,17 @@ func NewConcreteSeriesIterator(series *ConcreteSeries) chunkenc.Iterator { } } -func (c *concreteSeriesIterator) Seek(t int64) bool { +// TODO(rabenhorst): Native histogram support needs to be added, float type is hardcoded. +func (c *concreteSeriesIterator) Seek(t int64) chunkenc.ValueType { c.cur = sort.Search(len(c.series.samples), func(n int) bool { return c.series.samples[n].Timestamp >= model.Time(t) }) - return c.cur < len(c.series.samples) + + if c.cur < len(c.series.samples) { + return chunkenc.ValFloat + } + + return chunkenc.ValNone } func (c *concreteSeriesIterator) At() (t int64, v float64) { @@ -118,9 +125,28 @@ func (c *concreteSeriesIterator) At() (t int64, v float64) { return int64(s.Timestamp), float64(s.Value) } -func (c *concreteSeriesIterator) Next() bool { +// TODO(rabenhorst): Needs to be implemented for native histogram support. +func (c *concreteSeriesIterator) AtHistogram() (int64, *histogram.Histogram) { + panic("not implemented") +} + +func (c *concreteSeriesIterator) AtFloatHistogram() (int64, *histogram.FloatHistogram) { + panic("not implemented") +} + +func (c *concreteSeriesIterator) AtT() int64 { + t, _ := c.At() + return t +} + +func (c *concreteSeriesIterator) Next() chunkenc.ValueType { c.cur++ - return c.cur < len(c.series.samples) + + if c.cur < len(c.series.samples) { + return chunkenc.ValFloat + } + + return chunkenc.ValNone } func (c *concreteSeriesIterator) Err() error { @@ -137,18 +163,30 @@ type errIterator struct { err error } -func (errIterator) Seek(int64) bool { - return false +func (errIterator) Seek(int64) chunkenc.ValueType { + return chunkenc.ValNone } -func (errIterator) Next() bool { - return false +func (errIterator) Next() chunkenc.ValueType { + return chunkenc.ValNone } func (errIterator) At() (t int64, v float64) { return 0, 0 } +func (errIterator) AtHistogram() (int64, *histogram.Histogram) { + return 0, nil +} + +func (errIterator) AtFloatHistogram() (int64, *histogram.FloatHistogram) { + return 0, nil +} + +func (errIterator) AtT() int64 { + return 0 +} + func (e errIterator) Err() error { return e.err } @@ -268,9 +306,10 @@ func NewDeletedSeriesIterator(itr chunkenc.Iterator, deletedIntervals []model.In } } -func (d DeletedSeriesIterator) Seek(t int64) bool { - if found := d.itr.Seek(t); !found { - return false +// TODO(rabenhorst): Native histogram support needs to be added, float type is hardcoded. +func (d DeletedSeriesIterator) Seek(t int64) chunkenc.ValueType { + if valueType := d.itr.Seek(t); valueType == chunkenc.ValNone { + return valueType } seekedTs, _ := d.itr.At() @@ -279,23 +318,37 @@ func (d DeletedSeriesIterator) Seek(t int64) bool { return d.Next() } - return true + return chunkenc.ValFloat } func (d DeletedSeriesIterator) At() (t int64, v float64) { return d.itr.At() } -func (d DeletedSeriesIterator) Next() bool { - for d.itr.Next() { +// TODO(rabenhorst): Needs to be implemented for native histogram support. +func (d DeletedSeriesIterator) AtHistogram() (int64, *histogram.Histogram) { + panic("not implemented") +} + +func (d DeletedSeriesIterator) AtFloatHistogram() (int64, *histogram.FloatHistogram) { + panic("not implemented") +} + +func (d DeletedSeriesIterator) AtT() int64 { + t, _ := d.itr.At() + return t +} + +func (d DeletedSeriesIterator) Next() chunkenc.ValueType { + for valueType := d.itr.Next(); valueType != chunkenc.ValNone; valueType = d.itr.Next() { ts, _ := d.itr.At() if d.isDeleted(ts) { continue } - return true + return valueType } - return false + return chunkenc.ValNone } func (d DeletedSeriesIterator) Err() error { @@ -343,16 +396,28 @@ func NewEmptySeriesIterator() chunkenc.Iterator { return emptySeriesIterator{} } -func (emptySeriesIterator) Seek(t int64) bool { - return false +func (emptySeriesIterator) Seek(t int64) chunkenc.ValueType { + return chunkenc.ValNone } func (emptySeriesIterator) At() (t int64, v float64) { return 0, 0 } -func (emptySeriesIterator) Next() bool { - return false +func (emptySeriesIterator) AtHistogram() (int64, *histogram.Histogram) { + return 0, nil +} + +func (emptySeriesIterator) AtFloatHistogram() (int64, *histogram.FloatHistogram) { + return 0, nil +} + +func (emptySeriesIterator) AtT() int64 { + return 0 +} + +func (emptySeriesIterator) Next() chunkenc.ValueType { + return chunkenc.ValNone } func (emptySeriesIterator) Err() error { diff --git a/internal/cortex/querier/series/series_set_test.go b/internal/cortex/querier/series/series_set_test.go index b20fd767626..844d9799a89 100644 --- a/internal/cortex/querier/series/series_set_test.go +++ b/internal/cortex/querier/series/series_set_test.go @@ -10,6 +10,7 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" + "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/stretchr/testify/require" ) @@ -84,7 +85,7 @@ func TestDeletedSeriesIterator(t *testing.T) { it := NewDeletedSeriesIterator(NewConcreteSeriesIterator(&cs), c.r) ranges := c.r[:] - for it.Next() { + for it.Next() != chunkenc.ValNone { i++ for _, tr := range ranges { if inbound(model.Time(i), tr) { @@ -122,28 +123,28 @@ func TestDeletedIterator_WithSeek(t *testing.T) { } cases := []struct { - r []model.Interval - seek int64 - ok bool - seekedTs int64 + r []model.Interval + seek int64 + valueType chunkenc.ValueType + seekedTs int64 }{ - {r: []model.Interval{{Start: 1, End: 20}}, seek: 1, ok: true, seekedTs: 21}, - {r: []model.Interval{{Start: 1, End: 20}}, seek: 20, ok: true, seekedTs: 21}, - {r: []model.Interval{{Start: 1, End: 20}}, seek: 10, ok: true, seekedTs: 21}, - {r: []model.Interval{{Start: 1, End: 20}}, seek: 999, ok: true, seekedTs: 999}, - {r: []model.Interval{{Start: 1, End: 20}}, seek: 1000, ok: false}, - {r: []model.Interval{{Start: 1, End: 23}, {Start: 24, End: 40}, {Start: 45, End: 3000}}, seek: 1, ok: true, seekedTs: 41}, - {r: []model.Interval{{Start: 5, End: 23}, {Start: 24, End: 40}, {Start: 41, End: 3000}}, seek: 5, ok: false}, - {r: []model.Interval{{Start: 0, End: 2000}}, seek: 10, ok: false}, - {r: []model.Interval{{Start: 500, End: 2000}}, seek: 10, ok: true, seekedTs: 10}, - {r: []model.Interval{{Start: 500, End: 2000}}, seek: 501, ok: false}, + {r: []model.Interval{{Start: 1, End: 20}}, seek: 1, valueType: chunkenc.ValFloat, seekedTs: 21}, + {r: []model.Interval{{Start: 1, End: 20}}, seek: 20, valueType: chunkenc.ValFloat, seekedTs: 21}, + {r: []model.Interval{{Start: 1, End: 20}}, seek: 10, valueType: chunkenc.ValFloat, seekedTs: 21}, + {r: []model.Interval{{Start: 1, End: 20}}, seek: 999, valueType: chunkenc.ValFloat, seekedTs: 999}, + {r: []model.Interval{{Start: 1, End: 20}}, seek: 1000, valueType: chunkenc.ValNone}, + {r: []model.Interval{{Start: 1, End: 23}, {Start: 24, End: 40}, {Start: 45, End: 3000}}, seek: 1, valueType: chunkenc.ValFloat, seekedTs: 41}, + {r: []model.Interval{{Start: 5, End: 23}, {Start: 24, End: 40}, {Start: 41, End: 3000}}, seek: 5, valueType: chunkenc.ValNone}, + {r: []model.Interval{{Start: 0, End: 2000}}, seek: 10, valueType: chunkenc.ValNone}, + {r: []model.Interval{{Start: 500, End: 2000}}, seek: 10, valueType: chunkenc.ValFloat, seekedTs: 10}, + {r: []model.Interval{{Start: 500, End: 2000}}, seek: 501, valueType: chunkenc.ValNone}, } for _, c := range cases { it := NewDeletedSeriesIterator(NewConcreteSeriesIterator(&cs), c.r) - require.Equal(t, c.ok, it.Seek(c.seek)) - if c.ok { + require.Equal(t, c.valueType, it.Seek(c.seek)) + if c.valueType != chunkenc.ValNone { ts, _ := it.At() require.Equal(t, c.seekedTs, ts) } diff --git a/internal/cortex/querier/timeseries_series_set.go b/internal/cortex/querier/timeseries_series_set.go index 55a315951a7..f9c8228a247 100644 --- a/internal/cortex/querier/timeseries_series_set.go +++ b/internal/cortex/querier/timeseries_series_set.go @@ -6,6 +6,7 @@ package querier import ( "sort" + "github.com/prometheus/prometheus/model/histogram" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunkenc" @@ -77,8 +78,9 @@ func (t *timeseries) Iterator() chunkenc.Iterator { } } +// TODO(rabenhorst): Native histogram support needs to be added, float type is hardcoded. // Seek implements SeriesIterator interface -func (t *timeSeriesSeriesIterator) Seek(s int64) bool { +func (t *timeSeriesSeriesIterator) Seek(s int64) chunkenc.ValueType { offset := 0 if t.i > 0 { offset = t.i // only advance via Seek @@ -88,7 +90,11 @@ func (t *timeSeriesSeriesIterator) Seek(s int64) bool { return t.ts.series.Samples[offset+i].TimestampMs >= s }) + offset - return t.i < len(t.ts.series.Samples) + if t.i < len(t.ts.series.Samples) { + return chunkenc.ValFloat + } + + return chunkenc.ValNone } // At implements the SeriesIterator interface @@ -99,8 +105,30 @@ func (t *timeSeriesSeriesIterator) At() (int64, float64) { return t.ts.series.Samples[t.i].TimestampMs, t.ts.series.Samples[t.i].Value } +// TODO(rabenhorst): Needs to be implemented for native histogram support. +func (t *timeSeriesSeriesIterator) AtHistogram() (int64, *histogram.Histogram) { + panic("not implemented") +} + +func (t *timeSeriesSeriesIterator) AtFloatHistogram() (int64, *histogram.FloatHistogram) { + panic("not implemented") +} + +func (t *timeSeriesSeriesIterator) AtT() int64 { + ts, _ := t.At() + return ts +} + // Next implements the SeriesIterator interface -func (t *timeSeriesSeriesIterator) Next() bool { t.i++; return t.i < len(t.ts.series.Samples) } +func (t *timeSeriesSeriesIterator) Next() chunkenc.ValueType { + t.i++ + + if t.i < len(t.ts.series.Samples) { + return chunkenc.ValFloat + } + + return chunkenc.ValNone +} // Err implements the SeriesIterator interface func (t *timeSeriesSeriesIterator) Err() error { return nil } diff --git a/internal/cortex/querier/timeseries_series_set_test.go b/internal/cortex/querier/timeseries_series_set_test.go index b9a18947da6..88369bce0cc 100644 --- a/internal/cortex/querier/timeseries_series_set_test.go +++ b/internal/cortex/querier/timeseries_series_set_test.go @@ -6,6 +6,7 @@ package querier import ( "testing" + "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/stretchr/testify/require" "github.com/thanos-io/thanos/internal/cortex/cortexpb" @@ -39,7 +40,7 @@ func TestTimeSeriesSeriesSet(t *testing.T) { require.Equal(t, ss.ts[0].Labels[0].Value, series.Labels()[0].Value) it := series.Iterator() - require.True(t, it.Next()) + require.NotEqual(t, chunkenc.ValNone, it.Next()) ts, v := it.At() require.Equal(t, 3.14, v) require.Equal(t, int64(1234), ts) @@ -54,7 +55,7 @@ func TestTimeSeriesSeriesSet(t *testing.T) { require.True(t, ss.Next()) it = ss.At().Iterator() - require.True(t, it.Seek(2000)) + require.NotEqual(t, chunkenc.ValNone, it.Seek(2000)) ts, v = it.At() require.Equal(t, 1.618, v) require.Equal(t, int64(2345), ts) @@ -87,25 +88,25 @@ func TestTimeSeriesIterator(t *testing.T) { } it := ts.Iterator() - require.True(t, it.Seek(1235)) // Seek to middle + require.NotEqual(t, chunkenc.ValNone, it.Seek(1235)) // Seek to middle i, _ := it.At() require.EqualValues(t, 1235, i) - require.True(t, it.Seek(1236)) // Seek to end + require.NotEqual(t, chunkenc.ValNone, it.Seek(1236)) // Seek to end i, _ = it.At() require.EqualValues(t, 1236, i) - require.False(t, it.Seek(1238)) // Seek past end + require.Equal(t, chunkenc.ValNone, it.Seek(1238)) // Seek past end it = ts.Iterator() - require.True(t, it.Next()) - require.True(t, it.Next()) + require.NotEqual(t, chunkenc.ValNone, it.Next()) + require.NotEqual(t, chunkenc.ValNone, it.Next()) i, _ = it.At() require.EqualValues(t, 1235, i) - require.True(t, it.Seek(1234)) // Ensure seek doesn't do anything if already past seek target. + require.NotEqual(t, chunkenc.ValNone, it.Seek(1234)) // Ensure seek doesn't do anything if already past seek target. i, _ = it.At() require.EqualValues(t, 1235, i) it = ts.Iterator() - for i := 0; it.Next(); { + for i := 0; it.Next() != chunkenc.ValNone; { j, _ := it.At() switch i { case 0: diff --git a/internal/cortex/storage/tsdb/config.go b/internal/cortex/storage/tsdb/config.go index e5ed8eb99b8..673017d85ad 100644 --- a/internal/cortex/storage/tsdb/config.go +++ b/internal/cortex/storage/tsdb/config.go @@ -12,7 +12,7 @@ import ( "github.com/alecthomas/units" "github.com/pkg/errors" "github.com/prometheus/prometheus/tsdb/chunks" - "github.com/prometheus/prometheus/tsdb/wal" + "github.com/prometheus/prometheus/tsdb/wlog" "github.com/thanos-io/thanos/pkg/store" "github.com/thanos-io/thanos/internal/cortex/storage/bucket" @@ -172,7 +172,7 @@ func (cfg *TSDBConfig) RegisterFlags(f *flag.FlagSet) { f.IntVar(&cfg.HeadChunksWriteBufferSize, "blocks-storage.tsdb.head-chunks-write-buffer-size-bytes", chunks.DefaultWriteBufferSize, "The write buffer size used by the head chunks mapper. Lower values reduce memory utilisation on clusters with a large number of tenants at the cost of increased disk I/O operations.") f.IntVar(&cfg.StripeSize, "blocks-storage.tsdb.stripe-size", 16384, "The number of shards of series to use in TSDB (must be a power of 2). Reducing this will decrease memory footprint, but can negatively impact performance.") f.BoolVar(&cfg.WALCompressionEnabled, "blocks-storage.tsdb.wal-compression-enabled", false, "True to enable TSDB WAL compression.") - f.IntVar(&cfg.WALSegmentSizeBytes, "blocks-storage.tsdb.wal-segment-size-bytes", wal.DefaultSegmentSize, "TSDB WAL segments files max size (bytes).") + f.IntVar(&cfg.WALSegmentSizeBytes, "blocks-storage.tsdb.wal-segment-size-bytes", wlog.DefaultSegmentSize, "TSDB WAL segments files max size (bytes).") f.BoolVar(&cfg.FlushBlocksOnShutdown, "blocks-storage.tsdb.flush-blocks-on-shutdown", false, "True to flush blocks to storage on shutdown. If false, incomplete blocks will be reused after restart.") f.DurationVar(&cfg.CloseIdleTSDBTimeout, "blocks-storage.tsdb.close-idle-tsdb-timeout", 0, "If TSDB has not received any data for this duration, and all blocks from TSDB have been shipped, TSDB is closed and deleted from local disk. If set to positive value, this value should be equal or higher than -querier.query-ingesters-within flag to make sure that TSDB is not closed prematurely, which could cause partial query results. 0 or negative value disables closing of idle TSDB.") f.IntVar(&cfg.MaxExemplars, "blocks-storage.tsdb.max-exemplars", 0, "Enables support for exemplars in TSDB and sets the maximum number that will be stored. 0 or less means disabled.") diff --git a/internal/cortex/storegateway/gateway_test.go b/internal/cortex/storegateway/gateway_test.go index 56aaf343d39..e14d5d51a61 100644 --- a/internal/cortex/storegateway/gateway_test.go +++ b/internal/cortex/storegateway/gateway_test.go @@ -1150,7 +1150,7 @@ func readSamplesFromChunks(rawChunks []storepb.AggrChunk) ([]sample, error) { } it := c.Iterator(nil) - for it.Next() { + for it.Next() != chunkenc.ValNone { if it.Err() != nil { return nil, it.Err() } diff --git a/pkg/api/query/v1_test.go b/pkg/api/query/v1_test.go index 07c562af9ce..3f533619b8f 100644 --- a/pkg/api/query/v1_test.go +++ b/pkg/api/query/v1_test.go @@ -34,6 +34,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/common/route" + "github.com/prometheus/prometheus/model/histogram" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/timestamp" "github.com/prometheus/prometheus/promql" @@ -41,6 +42,7 @@ import ( "github.com/prometheus/prometheus/rules" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb" + "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/prometheus/prometheus/tsdb/tsdbutil" promgate "github.com/prometheus/prometheus/util/gate" "github.com/prometheus/prometheus/util/stats" @@ -1855,3 +1857,16 @@ func (s sample) T() int64 { func (s sample) V() float64 { return s.v } + +// TODO(rabenhorst): Needs to be implemented for native histogram support. +func (s sample) H() *histogram.Histogram { + panic("not implemented") +} + +func (s sample) FH() *histogram.FloatHistogram { + panic("not implemented") +} + +func (s sample) Type() chunkenc.ValueType { + return chunkenc.ValFloat +} diff --git a/pkg/compact/downsample/downsample.go b/pkg/compact/downsample/downsample.go index 7731eab877d..8f15428e934 100644 --- a/pkg/compact/downsample/downsample.go +++ b/pkg/compact/downsample/downsample.go @@ -15,6 +15,7 @@ import ( "github.com/go-kit/log/level" "github.com/oklog/ulid" "github.com/pkg/errors" + "github.com/prometheus/prometheus/model/histogram" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/value" "github.com/prometheus/prometheus/tsdb" @@ -450,7 +451,7 @@ func expandChunkIterator(it chunkenc.Iterator, buf *[]sample) error { // If it does, we skip it. lastT := int64(0) - for it.Next() { + for it.Next() != chunkenc.ValNone { t, v := it.At() if value.IsStaleNaN(v) { continue @@ -604,12 +605,13 @@ func NewApplyCounterResetsIterator(chks ...chunkenc.Iterator) *ApplyCounterReset return &ApplyCounterResetsSeriesIterator{chks: chks} } -func (it *ApplyCounterResetsSeriesIterator) Next() bool { +// TODO(rabenhorst): Native histogram support needs to be added, float type is hardcoded. +func (it *ApplyCounterResetsSeriesIterator) Next() chunkenc.ValueType { for { if it.i >= len(it.chks) { - return false + return chunkenc.ValNone } - if ok := it.chks[it.i].Next(); !ok { + if it.chks[it.i].Next() == chunkenc.ValNone { it.i++ // While iterators are ordered, they are not generally guaranteed to be // non-overlapping. Ensure that the series does not go back in time by seeking at least @@ -626,7 +628,7 @@ func (it *ApplyCounterResetsSeriesIterator) Next() bool { it.total++ it.lastT, it.lastV = t, v it.totalV = v - return true + return chunkenc.ValFloat } // If the timestamp increased, it is not the special last sample. if t > it.lastT { @@ -637,7 +639,7 @@ func (it *ApplyCounterResetsSeriesIterator) Next() bool { } it.lastT, it.lastV = t, v it.total++ - return true + return chunkenc.ValFloat } // We hit a sample that indicates what the true last value was. For the // next chunk we use it to determine whether there was a counter reset between them. @@ -652,16 +654,28 @@ func (it *ApplyCounterResetsSeriesIterator) At() (t int64, v float64) { return it.lastT, it.totalV } -func (it *ApplyCounterResetsSeriesIterator) Seek(x int64) bool { +// TODO(rabenhorst): Needs to be implemented for native histogram support. +func (it *ApplyCounterResetsSeriesIterator) AtHistogram() (int64, *histogram.Histogram) { + panic("not implemented") +} + +func (it *ApplyCounterResetsSeriesIterator) AtFloatHistogram() (int64, *histogram.FloatHistogram) { + panic("not implemented") +} + +func (it *ApplyCounterResetsSeriesIterator) AtT() int64 { + return it.lastT +} + +func (it *ApplyCounterResetsSeriesIterator) Seek(x int64) chunkenc.ValueType { // Don't use underlying Seek, but iterate over next to not miss counter resets. for { if t, _ := it.At(); t >= x { - return true + return chunkenc.ValFloat } - ok := it.Next() - if !ok { - return false + if it.Next() == chunkenc.ValNone { + return chunkenc.ValNone } } } @@ -687,35 +701,49 @@ func NewAverageChunkIterator(cnt, sum chunkenc.Iterator) *AverageChunkIterator { return &AverageChunkIterator{cntIt: cnt, sumIt: sum} } -func (it *AverageChunkIterator) Next() bool { +// TODO(rabenhorst): Native histogram support needs to be added, float type is hardcoded. +func (it *AverageChunkIterator) Next() chunkenc.ValueType { cok, sok := it.cntIt.Next(), it.sumIt.Next() if cok != sok { it.err = errors.New("sum and count iterator not aligned") - return false + return chunkenc.ValFloat } - if !cok { - return false + if cok == chunkenc.ValNone { + return chunkenc.ValNone } cntT, cntV := it.cntIt.At() sumT, sumV := it.sumIt.At() if cntT != sumT { it.err = errors.New("sum and count timestamps not aligned") - return false + return chunkenc.ValNone } it.t, it.v = cntT, sumV/cntV - return true + return chunkenc.ValFloat } -func (it *AverageChunkIterator) Seek(t int64) bool { +func (it *AverageChunkIterator) Seek(t int64) chunkenc.ValueType { it.err = errors.New("seek used, but not implemented") - return false + return chunkenc.ValNone } func (it *AverageChunkIterator) At() (int64, float64) { return it.t, it.v } +// TODO(rabenhorst): Needs to be implemented for native histogram support. +func (it *AverageChunkIterator) AtHistogram() (int64, *histogram.Histogram) { + panic("not implemented") +} + +func (it *AverageChunkIterator) AtFloatHistogram() (int64, *histogram.FloatHistogram) { + panic("not implemented") +} + +func (it *AverageChunkIterator) AtT() int64 { + return it.t +} + func (it *AverageChunkIterator) Err() error { if it.cntIt.Err() != nil { return it.cntIt.Err() diff --git a/pkg/compact/downsample/downsample_test.go b/pkg/compact/downsample/downsample_test.go index 8ad54d4e214..cada383c382 100644 --- a/pkg/compact/downsample/downsample_test.go +++ b/pkg/compact/downsample/downsample_test.go @@ -12,6 +12,7 @@ import ( "github.com/go-kit/log" "github.com/pkg/errors" + "github.com/prometheus/prometheus/model/histogram" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/value" "github.com/prometheus/prometheus/storage" @@ -48,7 +49,7 @@ func TestDownsampleCounterBoundaryReset(t *testing.T) { testutil.Ok(t, err) iter := chk.Iterator(nil) - for iter.Next() { + for iter.Next() != chunkenc.ValNone { t, v := iter.At() res = append(res, sample{t, v}) } @@ -65,7 +66,7 @@ func TestDownsampleCounterBoundaryReset(t *testing.T) { } citer := NewApplyCounterResetsIterator(iters...) - for citer.Next() { + for citer.Next() != chunkenc.ValNone { t, v := citer.At() res = append(res, sample{t: t, v: v}) } @@ -618,7 +619,7 @@ func TestAverageChunkIterator(t *testing.T) { x := NewAverageChunkIterator(newSampleIterator(cnt), newSampleIterator(sum)) var res []sample - for x.Next() { + for x.Next() != chunkenc.ValNone { t, v := x.At() res = append(res, sample{t, v}) } @@ -719,7 +720,7 @@ func TestApplyCounterResetsIterator(t *testing.T) { x := NewApplyCounterResetsIterator(its...) var res []sample - for x.Next() { + for x.Next() != chunkenc.ValNone { t, v := x.At() res = append(res, sample{t, v}) } @@ -752,15 +753,14 @@ func TestCounterSeriesIteratorSeek(t *testing.T) { var res []sample x := NewApplyCounterResetsIterator(its...) - ok := x.Seek(150) - testutil.Assert(t, ok, "Seek should return true") + valueType := x.Seek(150) + testutil.Equals(t, chunkenc.ValFloat, valueType, "Seek should return true") testutil.Ok(t, x.Err()) for { ts, v := x.At() res = append(res, sample{ts, v}) - ok = x.Next() - if !ok { + if x.Next() == chunkenc.ValNone { break } } @@ -779,8 +779,8 @@ func TestCounterSeriesIteratorSeekExtendTs(t *testing.T) { x := NewApplyCounterResetsIterator(its...) - ok := x.Seek(500) - testutil.Assert(t, !ok, "Seek should return false") + valueType := x.Seek(500) + testutil.Equals(t, chunkenc.ValNone, valueType, "Seek should return false") } func TestCounterSeriesIteratorSeekAfterNext(t *testing.T) { @@ -801,15 +801,14 @@ func TestCounterSeriesIteratorSeekAfterNext(t *testing.T) { x.Next() - ok := x.Seek(50) - testutil.Assert(t, ok, "Seek should return true") + valueType := x.Seek(50) + testutil.Equals(t, chunkenc.ValFloat, valueType, "Seek should return true") testutil.Ok(t, x.Err()) for { ts, v := x.At() res = append(res, sample{ts, v}) - ok = x.Next() - if !ok { + if x.Next() == chunkenc.ValNone { break } } @@ -861,6 +860,19 @@ func (s testSample) V() float64 { return s.v } +// TODO(rabenhorst): Needs to be implemented for native histogram support. +func (s testSample) H() *histogram.Histogram { + panic("not implemented") +} + +func (s testSample) FH() *histogram.FloatHistogram { + panic("not implemented") +} + +func (s testSample) Type() chunkenc.ValueType { + panic("not implemented") +} + type sampleIterator struct { l []sample i int @@ -874,15 +886,16 @@ func (it *sampleIterator) Err() error { return nil } -func (it *sampleIterator) Next() bool { +// TODO(rabenhorst): Native histogram support needs to be added. +func (it *sampleIterator) Next() chunkenc.ValueType { if it.i >= len(it.l)-1 { - return false + return chunkenc.ValNone } it.i++ - return true + return chunkenc.ValFloat } -func (it *sampleIterator) Seek(int64) bool { +func (it *sampleIterator) Seek(int64) chunkenc.ValueType { panic("unexpected") } @@ -890,6 +903,19 @@ func (it *sampleIterator) At() (t int64, v float64) { return it.l[it.i].t, it.l[it.i].v } +// TODO(rabenhorst): Needs to be implemented for native histogram support. +func (it *sampleIterator) AtHistogram() (int64, *histogram.Histogram) { + panic("not implemented") +} + +func (it *sampleIterator) AtFloatHistogram() (int64, *histogram.FloatHistogram) { + panic("not implemented") +} + +func (it *sampleIterator) AtT() int64 { + return it.l[it.i].t +} + // memBlock is an in-memory block that implements a subset of the tsdb.BlockReader interface // to allow tsdb.StreamedBlockWriter to persist the data as a block. type memBlock struct { diff --git a/pkg/compactv2/chunk_series_set.go b/pkg/compactv2/chunk_series_set.go index bc8be1a10d4..bccf30ded07 100644 --- a/pkg/compactv2/chunk_series_set.go +++ b/pkg/compactv2/chunk_series_set.go @@ -7,6 +7,7 @@ import ( "context" "github.com/pkg/errors" + "github.com/prometheus/prometheus/model/histogram" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb" @@ -87,10 +88,17 @@ type lazyPopulatableChunk struct { type errChunkIterator struct{ err error } -func (e errChunkIterator) Seek(int64) bool { return false } -func (e errChunkIterator) At() (int64, float64) { return 0, 0 } -func (e errChunkIterator) Next() bool { return false } -func (e errChunkIterator) Err() error { return e.err } +func (e errChunkIterator) Seek(int64) chunkenc.ValueType { return chunkenc.ValNone } +func (e errChunkIterator) At() (int64, float64) { return 0, 0 } + +// TODO(rabenhorst): Needs to be implemented for native histogram support. +func (e errChunkIterator) AtHistogram() (int64, *histogram.Histogram) { panic("not implemented") } +func (e errChunkIterator) AtFloatHistogram() (int64, *histogram.FloatHistogram) { + panic("not implemented") +} +func (e errChunkIterator) AtT() int64 { return 0 } +func (e errChunkIterator) Next() chunkenc.ValueType { return chunkenc.ValNone } +func (e errChunkIterator) Err() error { return e.err } type errChunk struct{ err errChunkIterator } diff --git a/pkg/compactv2/compactor_test.go b/pkg/compactv2/compactor_test.go index e2b66b29d25..74505b2b1d9 100644 --- a/pkg/compactv2/compactor_test.go +++ b/pkg/compactv2/compactor_test.go @@ -674,7 +674,7 @@ func readBlockSeries(t *testing.T, bDir string) []seriesSamples { var chk []sample iter := c.Chunk.Iterator(nil) - for iter.Next() { + for iter.Next() != chunkenc.ValNone { sa := sample{} sa.t, sa.v = iter.At() chk = append(chk, sa) diff --git a/pkg/compactv2/modifiers.go b/pkg/compactv2/modifiers.go index 3a7684895e3..1fa03c1baab 100644 --- a/pkg/compactv2/modifiers.go +++ b/pkg/compactv2/modifiers.go @@ -8,6 +8,7 @@ import ( "sort" "github.com/pkg/errors" + "github.com/prometheus/prometheus/model/histogram" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/relabel" "github.com/prometheus/prometheus/storage" @@ -234,9 +235,9 @@ type delSeriesIterator struct { curr chunkenc.Iterator } -func (p *delSeriesIterator) Next() bool { - if p.curr != nil && p.curr.Next() { - return true +func (p *delSeriesIterator) Next() chunkenc.ValueType { + if valueType := p.curr.Next(); p.curr != nil && valueType != chunkenc.ValNone { + return valueType } for p.next() { @@ -245,27 +246,42 @@ func (p *delSeriesIterator) Next() bool { } else { p.curr = p.currChkMeta.Chunk.Iterator(nil) } - if p.curr.Next() { - return true + if valueType := p.curr.Next(); valueType != chunkenc.ValNone { + return valueType } } - return false + return chunkenc.ValNone } -func (p *delSeriesIterator) Seek(t int64) bool { - if p.curr != nil && p.curr.Seek(t) { - return true +func (p *delSeriesIterator) Seek(t int64) chunkenc.ValueType { + if valueType := p.curr.Seek(t); p.curr != nil && valueType != chunkenc.ValNone { + return valueType } - for p.Next() { - if p.curr.Seek(t) { - return true + for p.Next() != chunkenc.ValNone { + // TODO(rabenhorst): Need to check if this is correct. + if valueType := p.curr.Seek(t); valueType != chunkenc.ValNone { + return valueType } } - return false + return chunkenc.ValNone } func (p *delSeriesIterator) At() (int64, float64) { return p.curr.At() } +// TODO(rabenhorst): Needs to be implemented for native histogram support. +func (p *delSeriesIterator) AtHistogram() (int64, *histogram.Histogram) { + panic("not implemented") +} + +func (p *delSeriesIterator) AtFloatHistogram() (int64, *histogram.FloatHistogram) { + panic("not implemented") +} + +func (p *delSeriesIterator) AtT() int64 { + t, _ := p.curr.At() + return t +} + func (p *delSeriesIterator) Err() error { if err := p.delGenericSeriesIterator.Err(); err != nil { return err @@ -300,7 +316,7 @@ func (p *delChunkSeriesIterator) Next() bool { return false } - if !p.currDelIter.Next() { + if p.currDelIter.Next() == chunkenc.ValNone { if err := p.currDelIter.Err(); err != nil { p.err = errors.Wrap(err, "iterate chunk while re-encoding") return false @@ -315,7 +331,7 @@ func (p *delChunkSeriesIterator) Next() bool { p.curr.MinTime = t app.Append(t, v) - for p.currDelIter.Next() { + for p.currDelIter.Next() != chunkenc.ValNone { t, v = p.currDelIter.At() app.Append(t, v) } diff --git a/pkg/dedup/chunk_iter.go b/pkg/dedup/chunk_iter.go index e053c7a6c48..2055ade87ba 100644 --- a/pkg/dedup/chunk_iter.go +++ b/pkg/dedup/chunk_iter.go @@ -312,7 +312,7 @@ func (a *aggrChunkIterator) toChunk(at downsample.AggrType, minTime, maxTime int lastT int64 lastV float64 ) - for it.Next() { + for it.Next() != chunkenc.ValNone { lastT, lastV = it.At() appender.Append(lastT, lastV) } diff --git a/pkg/dedup/iter.go b/pkg/dedup/iter.go index 9737de279f7..fb315889c9c 100644 --- a/pkg/dedup/iter.go +++ b/pkg/dedup/iter.go @@ -6,6 +6,7 @@ package dedup import ( "math" + "github.com/prometheus/prometheus/model/histogram" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunkenc" @@ -375,7 +376,7 @@ func (it *counterErrAdjustSeriesIterator) At() (int64, float64) { type dedupSeriesIterator struct { a, b adjustableSeriesIterator - aok, bok bool + aval, bval chunkenc.ValueType // TODO(bwplotka): Don't base on LastT, but on detected scrape interval. This will allow us to be more // responsive to gaps: https://github.com/thanos-io/thanos/issues/981, let's do it in next PR. @@ -392,12 +393,12 @@ func newDedupSeriesIterator(a, b adjustableSeriesIterator) *dedupSeriesIterator b: b, lastT: math.MinInt64, lastV: float64(math.MinInt64), - aok: a.Next(), - bok: b.Next(), + aval: a.Next(), + bval: b.Next(), } } -func (it *dedupSeriesIterator) Next() bool { +func (it *dedupSeriesIterator) Next() chunkenc.ValueType { lastValue := it.lastV lastUseA := it.useA defer func() { @@ -409,27 +410,28 @@ func (it *dedupSeriesIterator) Next() bool { }() // Advance both iterators to at least the next highest timestamp plus the potential penalty. - if it.aok { - it.aok = it.a.Seek(it.lastT + 1 + it.penA) + if it.aval != chunkenc.ValNone { + it.aval = it.a.Seek(it.lastT + 1 + it.penA) } - if it.bok { - it.bok = it.b.Seek(it.lastT + 1 + it.penB) + if it.bval != chunkenc.ValNone { + it.bval = it.b.Seek(it.lastT + 1 + it.penB) } // Handle basic cases where one iterator is exhausted before the other. - if !it.aok { + if it.aval == chunkenc.ValNone { it.useA = false - if it.bok { + if it.bval != chunkenc.ValNone { it.lastT, it.lastV = it.b.At() it.penB = 0 } - return it.bok + return it.bval } - if !it.bok { + if it.bval == chunkenc.ValNone { it.useA = true it.lastT, it.lastV = it.a.At() it.penA = 0 - return true + // TODO(rabenhorst): Need to check if this is correct. + return it.aval } // General case where both iterators still have data. We pick the one // with the smaller timestamp. @@ -458,7 +460,8 @@ func (it *dedupSeriesIterator) Next() bool { it.penA = 0 it.lastT = ta it.lastV = va - return true + // TODO(rabenhorst): Need to check if this is correct. + return it.aval } if it.lastT != math.MinInt64 { it.penA = 2 * (tb - it.lastT) @@ -468,27 +471,29 @@ func (it *dedupSeriesIterator) Next() bool { it.penB = 0 it.lastT = tb it.lastV = vb - return true + // TODO(rabenhorst): Need to check if this is correct. + return it.bval } func (it *dedupSeriesIterator) adjustAtValue(lastValue float64) { - if it.aok { + if it.aval != chunkenc.ValNone { it.a.adjustAtValue(lastValue) } - if it.bok { + if it.bval != chunkenc.ValNone { it.b.adjustAtValue(lastValue) } } -func (it *dedupSeriesIterator) Seek(t int64) bool { +// TODO(rabenhorst): Native histogram support needs to be implemented, float type hardcoded. +func (it *dedupSeriesIterator) Seek(t int64) chunkenc.ValueType { // Don't use underlying Seek, but iterate over next to not miss gaps. for { ts, _ := it.At() if ts >= t { - return true + return chunkenc.ValFloat } - if !it.Next() { - return false + if it.Next() == chunkenc.ValNone { + return chunkenc.ValNone } } } @@ -500,6 +505,25 @@ func (it *dedupSeriesIterator) At() (int64, float64) { return it.b.At() } +// TODO(rabenhorst): Needs to be implemented for native histogram support. +func (it *dedupSeriesIterator) AtHistogram() (int64, *histogram.Histogram) { + panic("not implemented") +} + +func (it *dedupSeriesIterator) AtFloatHistogram() (int64, *histogram.FloatHistogram) { + panic("not implemented") +} + +func (it *dedupSeriesIterator) AtT() int64 { + var t int64 + if it.useA { + t, _ = it.a.At() + } else { + t, _ = it.b.At() + } + return t +} + func (it *dedupSeriesIterator) Err() error { if it.a.Err() != nil { return it.a.Err() @@ -518,9 +542,9 @@ func NewBoundedSeriesIterator(it chunkenc.Iterator, mint, maxt int64) *boundedSe return &boundedSeriesIterator{it: it, mint: mint, maxt: maxt} } -func (it *boundedSeriesIterator) Seek(t int64) (ok bool) { +func (it *boundedSeriesIterator) Seek(t int64) chunkenc.ValueType { if t > it.maxt { - return false + return chunkenc.ValNone } if t < it.mint { t = it.mint @@ -532,21 +556,40 @@ func (it *boundedSeriesIterator) At() (t int64, v float64) { return it.it.At() } -func (it *boundedSeriesIterator) Next() bool { - if !it.it.Next() { - return false +// TODO(rabenhorst): Needs to be implemented for native histogram support. +func (it *boundedSeriesIterator) AtHistogram() (int64, *histogram.Histogram) { + panic("not implemented") +} + +func (it *boundedSeriesIterator) AtFloatHistogram() (int64, *histogram.FloatHistogram) { + panic("not implemented") +} + +func (it *boundedSeriesIterator) AtT() int64 { + t, _ := it.it.At() + return t +} + +func (it *boundedSeriesIterator) Next() chunkenc.ValueType { + valueType := it.it.Next() + if valueType == chunkenc.ValNone { + return chunkenc.ValNone } t, _ := it.it.At() // Advance the iterator if we are before the valid interval. if t < it.mint { - if !it.Seek(it.mint) { - return false + if it.Seek(it.mint) == chunkenc.ValNone { + return chunkenc.ValNone } t, _ = it.it.At() } // Once we passed the valid interval, there is no going back. - return t <= it.maxt + if t <= it.maxt { + return valueType + } + + return chunkenc.ValNone } func (it *boundedSeriesIterator) Err() error { diff --git a/pkg/dedup/iter_test.go b/pkg/dedup/iter_test.go index 40f7ed95d57..fe3b75a455b 100644 --- a/pkg/dedup/iter_test.go +++ b/pkg/dedup/iter_test.go @@ -11,6 +11,7 @@ import ( "sort" "testing" + "github.com/prometheus/prometheus/model/histogram" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunkenc" @@ -31,6 +32,19 @@ func (s sample) V() float64 { return s.v } +// TODO(rabenhorst): Needs to be implemented for native histogram support. +func (s sample) H() *histogram.Histogram { + panic("not implemented") +} + +func (s sample) FH() *histogram.FloatHistogram { + panic("not implemented") +} + +func (s sample) Type() chunkenc.ValueType { + return chunkenc.ValFloat +} + type series struct { lset labels.Labels samples []sample @@ -68,11 +82,15 @@ func newMockedSeriesIterator(samples []sample) *mockedSeriesIterator { return &mockedSeriesIterator{samples: samples, cur: -1} } -func (s *mockedSeriesIterator) Seek(t int64) bool { +// TODO(rabenhorst): Native histogram support needs to be added, currently hardcoded to float. +func (s *mockedSeriesIterator) Seek(t int64) chunkenc.ValueType { s.cur = sort.Search(len(s.samples), func(n int) bool { return s.samples[n].t >= t }) - return s.cur < len(s.samples) + if s.cur < len(s.samples) { + return chunkenc.ValFloat + } + return chunkenc.ValNone } func (s *mockedSeriesIterator) At() (t int64, v float64) { @@ -80,9 +98,26 @@ func (s *mockedSeriesIterator) At() (t int64, v float64) { return sample.t, sample.v } -func (s *mockedSeriesIterator) Next() bool { +// TODO(rabenhorst): Needs to be implemented for native histogram support. +func (s *mockedSeriesIterator) AtHistogram() (int64, *histogram.Histogram) { + panic("not implemented") +} + +func (s *mockedSeriesIterator) AtFloatHistogram() (int64, *histogram.FloatHistogram) { + panic("not implemented") +} + +func (s *mockedSeriesIterator) AtT() int64 { + return s.samples[s.cur].t +} + +func (s *mockedSeriesIterator) Next() chunkenc.ValueType { s.cur++ - return s.cur < len(s.samples) + if s.cur < len(s.samples) { + return chunkenc.ValFloat + } + + return chunkenc.ValNone } func (s *mockedSeriesIterator) Err() error { return nil } @@ -497,7 +532,7 @@ func BenchmarkDedupSeriesIterator(b *testing.B) { b.ResetTimer() var total int64 - for it.Next() { + for it.Next() != chunkenc.ValNone { t, _ := it.At() total += t } @@ -541,7 +576,7 @@ func BenchmarkDedupSeriesIterator(b *testing.B) { const hackyStaleMarker = float64(-99999999) func expandSeries(t testing.TB, it chunkenc.Iterator) (res []sample) { - for it.Next() { + for it.Next() != chunkenc.ValNone { t, v := it.At() // Nan != Nan, so substitute for another value. // This is required for testutil.Equals to work deterministically. diff --git a/pkg/dedup/pushdown_iter.go b/pkg/dedup/pushdown_iter.go index 890a98b0025..6de8fab2a92 100644 --- a/pkg/dedup/pushdown_iter.go +++ b/pkg/dedup/pushdown_iter.go @@ -7,6 +7,7 @@ import ( "fmt" "math" + "github.com/prometheus/prometheus/model/histogram" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/tsdb/chunkenc" ) @@ -17,7 +18,7 @@ var PushdownMarker = labels.Label{Name: "__thanos_pushed_down", Value: "true"} type pushdownSeriesIterator struct { a, b chunkenc.Iterator - aok, bok bool + aval, bval chunkenc.ValueType aused, bused bool function func(float64, float64) float64 @@ -44,24 +45,33 @@ func newPushdownSeriesIterator(a, b chunkenc.Iterator, function string) *pushdow } } -func (it *pushdownSeriesIterator) Next() bool { +func (it *pushdownSeriesIterator) Next() chunkenc.ValueType { // Push A if we've used A before. Push B if we've used B before. // Push both if we've used both before. switch { case !it.aused && !it.bused: - return false + return chunkenc.ValNone case it.aused && !it.bused: - it.aok = it.a.Next() + it.aval = it.a.Next() case !it.aused && it.bused: - it.bok = it.b.Next() + it.bval = it.b.Next() case it.aused && it.bused: - it.aok = it.a.Next() - it.bok = it.b.Next() + it.aval = it.a.Next() + it.bval = it.b.Next() } it.aused = false it.bused = false - return it.aok || it.bok + // TODO(rabenhorst): Need to check if this is correct. + if it.aval != chunkenc.ValNone { + return it.aval + } + + if it.bval != chunkenc.ValNone { + return it.bval + } + + return chunkenc.ValNone } func (it *pushdownSeriesIterator) At() (int64, float64) { @@ -69,7 +79,7 @@ func (it *pushdownSeriesIterator) At() (int64, float64) { var timestamp int64 var val float64 - if it.aok && it.bok { + if it.aval != chunkenc.ValNone && it.bval != chunkenc.ValNone { ta, va := it.a.At() tb, vb := it.b.At() if ta == tb { @@ -88,7 +98,7 @@ func (it *pushdownSeriesIterator) At() (int64, float64) { it.bused = true } } - } else if it.aok { + } else if it.aval != chunkenc.ValNone { ta, va := it.a.At() val = va timestamp = ta @@ -103,14 +113,29 @@ func (it *pushdownSeriesIterator) At() (int64, float64) { return timestamp, val } -func (it *pushdownSeriesIterator) Seek(t int64) bool { +// TODO(rabenhorst): Needs to be implemented for native histogram support. +func (it *pushdownSeriesIterator) AtHistogram() (int64, *histogram.Histogram) { + panic("not implemented") +} + +func (it *pushdownSeriesIterator) AtFloatHistogram() (int64, *histogram.FloatHistogram) { + panic("not implemented") +} + +func (it *pushdownSeriesIterator) AtT() int64 { + t, _ := it.a.At() + return t +} + +// TODO(rabenhorst): Native histogram support needs to be implemented, currently float type is hardcoded. +func (it *pushdownSeriesIterator) Seek(t int64) chunkenc.ValueType { for { ts, _ := it.At() if ts >= t { - return true + return chunkenc.ValFloat } - if !it.Next() { - return false + if it.Next() == chunkenc.ValNone { + return chunkenc.ValNone } } } diff --git a/pkg/query/iter.go b/pkg/query/iter.go index b41bf7a5cfd..8e499bf27f1 100644 --- a/pkg/query/iter.go +++ b/pkg/query/iter.go @@ -7,6 +7,7 @@ import ( "sort" "github.com/pkg/errors" + "github.com/prometheus/prometheus/model/histogram" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunkenc" @@ -242,10 +243,13 @@ type errSeriesIterator struct { err error } -func (errSeriesIterator) Seek(int64) bool { return false } -func (errSeriesIterator) Next() bool { return false } -func (errSeriesIterator) At() (int64, float64) { return 0, 0 } -func (it errSeriesIterator) Err() error { return it.err } +func (errSeriesIterator) Seek(int64) chunkenc.ValueType { return chunkenc.ValNone } +func (errSeriesIterator) Next() chunkenc.ValueType { return chunkenc.ValNone } +func (errSeriesIterator) At() (int64, float64) { return 0, 0 } +func (errSeriesIterator) AtHistogram() (int64, *histogram.Histogram) { return 0, nil } +func (errSeriesIterator) AtFloatHistogram() (int64, *histogram.FloatHistogram) { return 0, nil } +func (errSeriesIterator) AtT() int64 { return 0 } +func (it errSeriesIterator) Err() error { return it.err } // chunkSeriesIterator implements a series iterator on top // of a list of time-sorted, non-overlapping chunks. @@ -262,17 +266,18 @@ func newChunkSeriesIterator(cs []chunkenc.Iterator) chunkenc.Iterator { return &chunkSeriesIterator{chunks: cs} } -func (it *chunkSeriesIterator) Seek(t int64) (ok bool) { +// TODO(rabenhorst: Native histogram support needs to be implement, currently float type is hardcoded. +func (it *chunkSeriesIterator) Seek(t int64) chunkenc.ValueType { // We generally expect the chunks already to be cut down // to the range we are interested in. There's not much to be gained from // hopping across chunks so we just call next until we reach t. for { ct, _ := it.At() if ct >= t { - return true + return chunkenc.ValFloat } - if !it.Next() { - return false + if it.Next() == chunkenc.ValNone { + return chunkenc.ValNone } } } @@ -281,17 +286,31 @@ func (it *chunkSeriesIterator) At() (t int64, v float64) { return it.chunks[it.i].At() } -func (it *chunkSeriesIterator) Next() bool { +// TODO(rabenhorst): Needs to be implemented for native histogram support. +func (it *chunkSeriesIterator) AtHistogram() (int64, *histogram.Histogram) { + panic("not implemented") +} + +func (it *chunkSeriesIterator) AtFloatHistogram() (int64, *histogram.FloatHistogram) { + panic("not implemented") +} + +func (it *chunkSeriesIterator) AtT() int64 { + t, _ := it.chunks[it.i].At() + return t +} + +func (it *chunkSeriesIterator) Next() chunkenc.ValueType { lastT, _ := it.At() - if it.chunks[it.i].Next() { - return true + if valueType := it.chunks[it.i].Next(); valueType != chunkenc.ValNone { + return valueType } if it.Err() != nil { - return false + return chunkenc.ValNone } if it.i >= len(it.chunks)-1 { - return false + return chunkenc.ValNone } // Chunks are guaranteed to be ordered but not generally guaranteed to not overlap. // We must ensure to skip any overlapping range between adjacent chunks. diff --git a/pkg/query/querier_test.go b/pkg/query/querier_test.go index 2e31fa65a09..188901ec417 100644 --- a/pkg/query/querier_test.go +++ b/pkg/query/querier_test.go @@ -18,6 +18,7 @@ import ( "github.com/go-kit/log" "github.com/pkg/errors" "github.com/prometheus/common/model" + "github.com/prometheus/prometheus/model/histogram" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/timestamp" "github.com/prometheus/prometheus/model/value" @@ -824,11 +825,17 @@ func newMockedSeriesIterator(samples []sample) *mockedSeriesIterator { return &mockedSeriesIterator{samples: samples, cur: -1} } -func (s *mockedSeriesIterator) Seek(t int64) bool { +// TODO(rabenhorst): Native histogram support needs to be implemented, currently float type is hardcoded. +func (s *mockedSeriesIterator) Seek(t int64) chunkenc.ValueType { s.cur = sort.Search(len(s.samples), func(n int) bool { return s.samples[n].t >= t }) - return s.cur < len(s.samples) + + if s.cur < len(s.samples) { + return chunkenc.ValFloat + } + + return chunkenc.ValNone } func (s *mockedSeriesIterator) At() (t int64, v float64) { @@ -836,9 +843,26 @@ func (s *mockedSeriesIterator) At() (t int64, v float64) { return sample.t, sample.v } -func (s *mockedSeriesIterator) Next() bool { +// TODO(rabenhorst): Needs to be implemented for native histogram support. +func (s *mockedSeriesIterator) AtHistogram() (int64, *histogram.Histogram) { + panic("not implemented") +} + +func (s *mockedSeriesIterator) AtFloatHistogram() (int64, *histogram.FloatHistogram) { + panic("not implemented") +} + +func (s *mockedSeriesIterator) AtT() int64 { + return s.samples[s.cur].t +} + +func (s *mockedSeriesIterator) Next() chunkenc.ValueType { s.cur++ - return s.cur < len(s.samples) + if s.cur < len(s.samples) { + return chunkenc.ValFloat + } + + return chunkenc.ValNone } func (s *mockedSeriesIterator) Err() error { return nil } @@ -885,20 +909,20 @@ func TestQuerierWithDedupUnderstoodByPromQL_Rate(t *testing.T) { testutil.Ok(t, err) testutil.Equals(t, promql.Matrix{ {Metric: expectedLset1, Points: []promql.Point{ - {T: 1587690300000, V: 13.652631578947368}, {T: 1587690400000, V: 14.049122807017545}, {T: 1587690500000, V: 13.961403508771928}, {T: 1587690600000, V: 13.617543859649123}, {T: 1587690700000, V: 14.568421052631578}, {T: 1587690800000, V: 14.989473684210525}, - {T: 1587690900000, V: 16.2}, {T: 1587691000000, V: 16.052631578947366}, {T: 1587691100000, V: 15.831578947368419}, {T: 1587691200000, V: 15.659649122807016}, {T: 1587691300000, V: 14.842105263157894}, {T: 1587691400000, V: 14.003508771929825}, - {T: 1587691500000, V: 13.782456140350877}, {T: 1587691600000, V: 13.863157894736842}, {T: 1587691700000, V: 15.270282598474374}, {T: 1587691800000, V: 14.343859649122805}, {T: 1587691900000, V: 13.975438596491228}, {T: 1587692000000, V: 13.4}, - {T: 1587692100000, V: 14.087719298245615}, {T: 1587692200000, V: 14.39298245614035}, {T: 1587692300000, V: 15.024561403508772}, {T: 1587692400000, V: 14.073684210526313}, {T: 1587692500000, V: 9.3772165751634}, {T: 1587692600000, V: 6.378947368421052}, - {T: 1587692700000, V: 8.19298245614035}, {T: 1587692800000, V: 11.918703026416258}, {T: 1587692900000, V: 13.75813610765101}, {T: 1587693000000, V: 13.087719298245615}, {T: 1587693100000, V: 13.466666666666667}, {T: 1587693200000, V: 14.028070175438595}, - {T: 1587693300000, V: 14.23859649122807}, {T: 1587693400000, V: 15.407017543859647}, {T: 1587693500000, V: 15.915789473684208}, {T: 1587693600000, V: 15.712280701754386}, + {T: 1587690300000, V: 13.652631578947368}, {T: 1587690400000, V: 14.049122807017543}, {T: 1587690500000, V: 13.961403508771928}, {T: 1587690600000, V: 13.617543859649121}, {T: 1587690700000, V: 14.568421052631578}, {T: 1587690800000, V: 14.989473684210525}, + {T: 1587690900000, V: 16.2}, {T: 1587691000000, V: 16.052631578947366}, {T: 1587691100000, V: 15.831578947368419}, {T: 1587691200000, V: 15.659649122807016}, {T: 1587691300000, V: 14.842105263157894}, {T: 1587691400000, V: 14.003508771929823}, + {T: 1587691500000, V: 13.782456140350876}, {T: 1587691600000, V: 13.86315789473684}, {T: 1587691700000, V: 15.270282598474376}, {T: 1587691800000, V: 14.343859649122805}, {T: 1587691900000, V: 13.975438596491227}, {T: 1587692000000, V: 13.399999999999999}, + {T: 1587692100000, V: 14.087719298245613}, {T: 1587692200000, V: 14.392982456140349}, {T: 1587692300000, V: 15.02456140350877}, {T: 1587692400000, V: 14.073684210526315}, {T: 1587692500000, V: 9.3772165751634}, {T: 1587692600000, V: 6.378947368421052}, + {T: 1587692700000, V: 8.19298245614035}, {T: 1587692800000, V: 11.91870302641626}, {T: 1587692900000, V: 13.75813610765101}, {T: 1587693000000, V: 13.087719298245613}, {T: 1587693100000, V: 13.466666666666665}, {T: 1587693200000, V: 14.028070175438595}, + {T: 1587693300000, V: 14.23859649122807}, {T: 1587693400000, V: 15.407017543859647}, {T: 1587693500000, V: 15.915789473684208}, {T: 1587693600000, V: 15.712280701754384}, }}, {Metric: expectedLset2, Points: []promql.Point{ - {T: 1587690300000, V: 13.69122807017544}, {T: 1587690400000, V: 14.098245614035086}, {T: 1587690500000, V: 13.905263157894735}, {T: 1587690600000, V: 13.617543859649123}, {T: 1587690700000, V: 14.350877192982455}, {T: 1587690800000, V: 15.003508771929825}, - {T: 1587690900000, V: 16.12280701754386}, {T: 1587691000000, V: 16.049122807017543}, {T: 1587691100000, V: 15.922807017543859}, {T: 1587691200000, V: 15.63157894736842}, {T: 1587691300000, V: 14.982456140350878}, {T: 1587691400000, V: 14.187259188557551}, - {T: 1587691500000, V: 13.828070175438594}, {T: 1587691600000, V: 13.971929824561403}, {T: 1587691700000, V: 15.31994329585807}, {T: 1587691800000, V: 14.30877192982456}, {T: 1587691900000, V: 13.915789473684212}, {T: 1587692000000, V: 13.312280701754384}, - {T: 1587692100000, V: 14.136842105263158}, {T: 1587692200000, V: 14.39298245614035}, {T: 1587692300000, V: 15.014035087719297}, {T: 1587692400000, V: 14.112280701754386}, {T: 1587692500000, V: 9.421065148148147}, {T: 1587692600000, V: 6.421368067203301}, - {T: 1587692700000, V: 8.252631578947367}, {T: 1587692800000, V: 11.721237543747266}, {T: 1587692900000, V: 13.842105263157894}, {T: 1587693000000, V: 13.153509064307995}, {T: 1587693100000, V: 13.378947368421052}, {T: 1587693200000, V: 14.03157894736842}, - {T: 1587693300000, V: 14.147368421052631}, {T: 1587693400000, V: 15.343159785693985}, {T: 1587693500000, V: 15.90877192982456}, {T: 1587693600000, V: 15.761403508771927}, + {T: 1587690300000, V: 13.691228070175438}, {T: 1587690400000, V: 14.098245614035086}, {T: 1587690500000, V: 13.905263157894735}, {T: 1587690600000, V: 13.617543859649121}, {T: 1587690700000, V: 14.350877192982455}, {T: 1587690800000, V: 15.003508771929823}, + {T: 1587690900000, V: 16.12280701754386}, {T: 1587691000000, V: 16.049122807017543}, {T: 1587691100000, V: 15.922807017543859}, {T: 1587691200000, V: 15.63157894736842}, {T: 1587691300000, V: 14.982456140350875}, {T: 1587691400000, V: 14.187259188557553}, + {T: 1587691500000, V: 13.828070175438596}, {T: 1587691600000, V: 13.971929824561402}, {T: 1587691700000, V: 15.31994329585807}, {T: 1587691800000, V: 14.30877192982456}, {T: 1587691900000, V: 13.915789473684208}, {T: 1587692000000, V: 13.312280701754384}, + {T: 1587692100000, V: 14.136842105263156}, {T: 1587692200000, V: 14.392982456140349}, {T: 1587692300000, V: 15.014035087719297}, {T: 1587692400000, V: 14.112280701754385}, {T: 1587692500000, V: 9.421065148148148}, {T: 1587692600000, V: 6.421368067203301}, + {T: 1587692700000, V: 8.252631578947367}, {T: 1587692800000, V: 11.721237543747266}, {T: 1587692900000, V: 13.842105263157894}, {T: 1587693000000, V: 13.153509064307993}, {T: 1587693100000, V: 13.378947368421052}, {T: 1587693200000, V: 14.03157894736842}, + {T: 1587693300000, V: 14.14736842105263}, {T: 1587693400000, V: 15.343159785693986}, {T: 1587693500000, V: 15.90877192982456}, {T: 1587693600000, V: 15.761403508771927}, }}, }, vec) }) @@ -914,10 +938,10 @@ func TestQuerierWithDedupUnderstoodByPromQL_Rate(t *testing.T) { testutil.Ok(t, err) testutil.Equals(t, promql.Matrix{ {Metric: expectedLset1, Points: []promql.Point{ - {T: 1587691800000, V: 14.457142857142856}, {T: 1587692300000, V: 14.761904761904761}, {T: 1587692800000, V: 13.127170868347338}, {T: 1587693300000, V: 12.935014005602241}, + {T: 1587691800000, V: 14.457142857142856}, {T: 1587692300000, V: 14.761904761904761}, {T: 1587692800000, V: 13.127170868347338}, {T: 1587693300000, V: 12.93501400560224}, }}, {Metric: expectedLset2, Points: []promql.Point{ - {T: 1587691800000, V: 14.464425770308123}, {T: 1587692300000, V: 14.763025210084033}, {T: 1587692800000, V: 13.148909112808576}, {T: 1587693300000, V: 12.928291316526611}, + {T: 1587691800000, V: 14.464425770308122}, {T: 1587692300000, V: 14.763025210084033}, {T: 1587692800000, V: 13.148909112808576}, {T: 1587693300000, V: 12.92829131652661}, }}, }, vec) }) @@ -955,15 +979,15 @@ func TestQuerierWithDedupUnderstoodByPromQL_Rate(t *testing.T) { testutil.Ok(t, err) testutil.Equals(t, promql.Matrix{ {Metric: expectedLset, Points: []promql.Point{ - {T: 1587690300000, V: 13.69122807017544}, {T: 1587690400000, V: 14.098245614035086}, {T: 1587690500000, V: 13.905263157894735}, {T: 1587690600000, V: 13.617543859649123}, - {T: 1587690700000, V: 14.350877192982455}, {T: 1587690800000, V: 15.003508771929825}, {T: 1587690900000, V: 16.12280701754386}, {T: 1587691000000, V: 16.049122807017543}, - {T: 1587691100000, V: 15.922807017543859}, {T: 1587691200000, V: 15.63157894736842}, {T: 1587691300000, V: 14.982456140350878}, {T: 1587691400000, V: 14.187259188557551}, - {T: 1587691500000, V: 13.828070175438594}, {T: 1587691600000, V: 13.971929824561403}, {T: 1587691700000, V: 15.31994329585807}, {T: 1587691800000, V: 14.30877192982456}, - {T: 1587691900000, V: 13.915789473684212}, {T: 1587692000000, V: 13.312280701754384}, {T: 1587692100000, V: 14.136842105263158}, {T: 1587692200000, V: 14.39298245614035}, - {T: 1587692300000, V: 15.014035087719297}, {T: 1587692400000, V: 14.112280701754386}, {T: 1587692500000, V: 9.421065148148147}, {T: 1587692600000, V: 6.3736754978451735}, - {T: 1587692700000, V: 8.19632056099571}, {T: 1587692800000, V: 11.918703026416258}, {T: 1587692900000, V: 13.75813610765101}, {T: 1587693000000, V: 13.087719298245615}, - {T: 1587693100000, V: 13.466666666666667}, {T: 1587693200000, V: 14.028070175438595}, {T: 1587693300000, V: 14.23859649122807}, {T: 1587693400000, V: 15.407017543859647}, - {T: 1587693500000, V: 15.915789473684208}, {T: 1587693600000, V: 15.712280701754386}, + {T: 1587690300000, V: 13.691228070175438}, {T: 1587690400000, V: 14.098245614035086}, {T: 1587690500000, V: 13.905263157894735}, {T: 1587690600000, V: 13.617543859649121}, + {T: 1587690700000, V: 14.350877192982455}, {T: 1587690800000, V: 15.003508771929823}, {T: 1587690900000, V: 16.12280701754386}, {T: 1587691000000, V: 16.049122807017543}, + {T: 1587691100000, V: 15.922807017543859}, {T: 1587691200000, V: 15.63157894736842}, {T: 1587691300000, V: 14.982456140350875}, {T: 1587691400000, V: 14.187259188557553}, + {T: 1587691500000, V: 13.828070175438596}, {T: 1587691600000, V: 13.971929824561402}, {T: 1587691700000, V: 15.31994329585807}, {T: 1587691800000, V: 14.30877192982456}, + {T: 1587691900000, V: 13.915789473684208}, {T: 1587692000000, V: 13.312280701754384}, {T: 1587692100000, V: 14.136842105263156}, {T: 1587692200000, V: 14.392982456140349}, + {T: 1587692300000, V: 15.014035087719297}, {T: 1587692400000, V: 14.112280701754385}, {T: 1587692500000, V: 9.421065148148148}, {T: 1587692600000, V: 6.3736754978451735}, + {T: 1587692700000, V: 8.19632056099571}, {T: 1587692800000, V: 11.91870302641626}, {T: 1587692900000, V: 13.75813610765101}, {T: 1587693000000, V: 13.087719298245613}, + {T: 1587693100000, V: 13.466666666666665}, {T: 1587693200000, V: 14.028070175438595}, {T: 1587693300000, V: 14.23859649122807}, {T: 1587693400000, V: 15.407017543859647}, + {T: 1587693500000, V: 15.915789473684208}, {T: 1587693600000, V: 15.712280701754384}, }}, }, vec) }) @@ -979,10 +1003,10 @@ func TestQuerierWithDedupUnderstoodByPromQL_Rate(t *testing.T) { testutil.Ok(t, err) testutil.Equals(t, promql.Matrix{ {Metric: expectedLset, Points: []promql.Point{ - {T: 1587691800000, V: 14.464425770308123}, + {T: 1587691800000, V: 14.464425770308122}, {T: 1587692300000, V: 14.763025210084033}, {T: 1587692800000, V: 13.143575607888273}, - {T: 1587693300000, V: 12.930291298224086}, + {T: 1587693300000, V: 12.930291298224088}, }}, }, vec) }) @@ -1057,7 +1081,7 @@ func TestSortReplicaLabel(t *testing.T) { const hackyStaleMarker = float64(-99999999) func expandSeries(t testing.TB, it chunkenc.Iterator) (res []sample) { - for it.Next() { + for it.Next() != chunkenc.ValNone { t, v := it.At() // Nan != Nan, so substitute for another value. // This is required for testutil.Equals to work deterministically. diff --git a/pkg/query/query_bench_test.go b/pkg/query/query_bench_test.go index 84efb468201..2478a0db9cd 100644 --- a/pkg/query/query_bench_test.go +++ b/pkg/query/query_bench_test.go @@ -12,6 +12,7 @@ import ( "github.com/go-kit/log" "github.com/prometheus/prometheus/model/labels" + "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/thanos-io/thanos/pkg/gate" "github.com/thanos-io/thanos/pkg/store/labelpb" @@ -129,7 +130,7 @@ func testSelect(t testutil.TB, q *querier, expectedSeries []labels.Labels) { // This is when resource usage should actually start growing. iter := s.Iterator() - for iter.Next() { + for iter.Next() != chunkenc.ValNone { testT, testV = iter.At() } testutil.Ok(t, iter.Err()) @@ -145,7 +146,7 @@ func testSelect(t testutil.TB, q *querier, expectedSeries []labels.Labels) { // This is when resource usage should actually start growing. iter := s.Iterator() - for iter.Next() { + for iter.Next() != chunkenc.ValNone { testT, testV = iter.At() } testutil.Ok(t, iter.Err()) diff --git a/pkg/receive/handler_test.go b/pkg/receive/handler_test.go index 4a2a5360385..3cf2731e43b 100644 --- a/pkg/receive/handler_test.go +++ b/pkg/receive/handler_test.go @@ -32,6 +32,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/exemplar" + "github.com/prometheus/prometheus/model/histogram" "github.com/prometheus/prometheus/model/labels" prometheusMetadata "github.com/prometheus/prometheus/model/metadata" "github.com/prometheus/prometheus/model/relabel" @@ -335,6 +336,11 @@ func (f *fakeAppender) AppendExemplar(ref storage.SeriesRef, l labels.Labels, e return ref, f.appendErr() } +// TODO(rabenhorst): Needs to be implement for native histogram support. +func (f *fakeAppender) AppendHistogram(ref storage.SeriesRef, l labels.Labels, t int64, h *histogram.Histogram) (storage.SeriesRef, error) { + panic("not implemented") +} + func (f *fakeAppender) GetRef(l labels.Labels) (storage.SeriesRef, labels.Labels) { return storage.SeriesRef(l.Hash()), l } diff --git a/pkg/rules/manager_test.go b/pkg/rules/manager_test.go index 9acde97b55a..d80b2c2a4a4 100644 --- a/pkg/rules/manager_test.go +++ b/pkg/rules/manager_test.go @@ -18,6 +18,7 @@ import ( "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/model/exemplar" + "github.com/prometheus/prometheus/model/histogram" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/metadata" "github.com/prometheus/prometheus/promql" @@ -43,6 +44,11 @@ func (n nopAppender) Append(storage.SeriesRef, labels.Labels, int64, float64) (s func (n nopAppender) AppendExemplar(storage.SeriesRef, labels.Labels, exemplar.Exemplar) (storage.SeriesRef, error) { return 0, nil } + +func (n nopAppender) AppendHistogram(ref storage.SeriesRef, l labels.Labels, t int64, h *histogram.Histogram) (storage.SeriesRef, error) { + return 0, nil +} + func (n nopAppender) Commit() error { return nil } func (n nopAppender) Rollback() error { return nil } func (n nopAppender) Appender(_ context.Context) (storage.Appender, error) { return n, nil } diff --git a/pkg/server/http/http.go b/pkg/server/http/http.go index 256304fe110..c25a062c7af 100644 --- a/pkg/server/http/http.go +++ b/pkg/server/http/http.go @@ -75,7 +75,14 @@ func (s *Server) ListenAndServe() error { if err != nil { return errors.Wrap(err, "server could not be started") } - return errors.Wrap(toolkit_web.ListenAndServe(s.srv, s.opts.tlsConfigPath, s.logger), "serve HTTP and metrics") + + flags := &toolkit_web.FlagConfig{ + WebListenAddresses: &([]string{s.opts.listen}), + WebSystemdSocket: OfBool(false), + WebConfigFile: &s.opts.tlsConfigPath, + } + + return errors.Wrap(toolkit_web.ListenAndServe(s.srv, flags, s.logger), "serve HTTP and metrics") } // Shutdown gracefully shuts down the server by waiting, @@ -131,3 +138,7 @@ func registerProbes(mux *http.ServeMux, p *prober.HTTPProbe, logger log.Logger) mux.Handle("/-/ready", p.ReadyHandler(logger)) } } + +func OfBool(i bool) *bool { + return &i +} diff --git a/pkg/store/prometheus_test.go b/pkg/store/prometheus_test.go index 884f85bb127..9f70d7d0d63 100644 --- a/pkg/store/prometheus_test.go +++ b/pkg/store/prometheus_test.go @@ -156,7 +156,7 @@ type sample struct { } func expandChunk(cit chunkenc.Iterator) (res []sample) { - for cit.Next() { + for cit.Next() != chunkenc.ValNone { t, v := cit.At() res = append(res, sample{t, v}) } diff --git a/pkg/store/proxy.go b/pkg/store/proxy.go index 508b4c62cab..999901c04c8 100644 --- a/pkg/store/proxy.go +++ b/pkg/store/proxy.go @@ -312,7 +312,7 @@ func (s *ProxyStore) Series(originalRequest *storepb.SeriesRequest, srv storepb. defer respSet.Close() } - level.Debug(reqLogger).Log("msg", "Series: started fanout streams", "status", strings.Join(storeDebugMsgs, ";")) + // level.Debug(reqLogger).Log("msg", "Series: started fanout streams", "status", strings.Join(storeDebugMsgs, ";")) respHeap := NewDedupResponseHeap(NewProxyResponseHeap(storeResponses...)) for respHeap.Next() { diff --git a/pkg/store/proxy_test.go b/pkg/store/proxy_test.go index 8a997907e43..bc5a1a5b23c 100644 --- a/pkg/store/proxy_test.go +++ b/pkg/store/proxy_test.go @@ -1484,7 +1484,7 @@ func seriesEquals(t *testing.T, expected []rawSeries, got []storepb.Series) { j := 0 iter := c.Iterator(nil) - for iter.Next() { + for iter.Next() != chunkenc.ValNone { testutil.Assert(t, j < len(expected[i].chunks[k]), "more samples than expected for %v chunk %d", series.Labels, k) tv, v := iter.At() diff --git a/pkg/store/storepb/custom_test.go b/pkg/store/storepb/custom_test.go index 37f5f9c680e..63d8fe9a548 100644 --- a/pkg/store/storepb/custom_test.go +++ b/pkg/store/storepb/custom_test.go @@ -369,7 +369,7 @@ func expandSeriesSet(t *testing.T, gotSS SeriesSet) (ret []rawSeries) { testutil.Ok(t, err) iter := c.Iterator(nil) - for iter.Next() { + for iter.Next() != chunkenc.ValNone { t, v := iter.At() r.chunks[i] = append(r.chunks[i], sample{t: t, v: v}) } diff --git a/pkg/store/storepb/testutil/series.go b/pkg/store/storepb/testutil/series.go index 9ad9a4619b7..9858eb3c382 100644 --- a/pkg/store/storepb/testutil/series.go +++ b/pkg/store/storepb/testutil/series.go @@ -22,7 +22,7 @@ import ( "github.com/prometheus/prometheus/tsdb" "github.com/prometheus/prometheus/tsdb/chunks" "github.com/prometheus/prometheus/tsdb/index" - "github.com/prometheus/prometheus/tsdb/wal" + "github.com/prometheus/prometheus/tsdb/wlog" "github.com/thanos-io/thanos/pkg/store/hintspb" "github.com/thanos-io/thanos/pkg/store/labelpb" @@ -74,10 +74,10 @@ func CreateHeadWithSeries(t testing.TB, j int, opts HeadGenOptions) (*tsdb.Head, opts.TSDBDir, ) - var w *wal.WAL + var w *wlog.WL var err error if opts.WithWAL { - w, err = wal.New(nil, nil, filepath.Join(opts.TSDBDir, "wal"), true) + w, err = wlog.New(nil, nil, filepath.Join(opts.TSDBDir, "wal"), true) testutil.Ok(t, err) } else { testutil.Ok(t, os.MkdirAll(filepath.Join(opts.TSDBDir, "wal"), os.ModePerm)) diff --git a/pkg/tracing/stackdriver/tracer.go b/pkg/tracing/stackdriver/tracer.go index 553ee1d5553..c11936d42fc 100644 --- a/pkg/tracing/stackdriver/tracer.go +++ b/pkg/tracing/stackdriver/tracer.go @@ -10,6 +10,7 @@ import ( "os" trace "cloud.google.com/go/trace/apiv1" + pb "cloud.google.com/go/trace/apiv1/tracepb" "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/googleapis/gax-go" @@ -17,7 +18,6 @@ import ( "github.com/opentracing/basictracer-go" "github.com/opentracing/opentracing-go" "github.com/prometheus/common/version" - pb "google.golang.org/genproto/googleapis/devtools/cloudtrace/v1" "github.com/thanos-io/thanos/pkg/tracing" )