diff --git a/cmd/metaconvert/main.go b/cmd/metaconvert/main.go index 0161cb3d6c6..6d7c763a5b3 100644 --- a/cmd/metaconvert/main.go +++ b/cmd/metaconvert/main.go @@ -19,9 +19,9 @@ import ( gklog "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/grafana/dskit/flagext" + dslog "github.com/grafana/dskit/log" "github.com/pkg/errors" "github.com/thanos-io/objstore" - "github.com/weaveworks/common/logging" "golang.org/x/exp/slices" "github.com/grafana/mimir/pkg/storage/bucket" @@ -31,8 +31,8 @@ import ( ) type config struct { - LogLevel logging.Level - LogFormat logging.Format + LogLevel dslog.Level + LogFormat dslog.Format BucketConfig bucket.Config DryRun bool Tenant string diff --git a/cmd/mimir-continuous-test/main.go b/cmd/mimir-continuous-test/main.go index 8392c257a13..57e48d85726 100644 --- a/cmd/mimir-continuous-test/main.go +++ b/cmd/mimir-continuous-test/main.go @@ -10,11 +10,11 @@ import ( "github.com/go-kit/log/level" "github.com/grafana/dskit/flagext" + "github.com/grafana/dskit/log" + "github.com/grafana/dskit/server" + "github.com/grafana/dskit/tracing" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/collectors" - "github.com/weaveworks/common/logging" - "github.com/weaveworks/common/server" - "github.com/weaveworks/common/tracing" "github.com/grafana/mimir/pkg/continuoustest" "github.com/grafana/mimir/pkg/util/instrumentation" @@ -24,7 +24,7 @@ import ( type Config struct { ServerMetricsPort int - LogLevel logging.Level + LogLevel log.Level Client continuoustest.ClientConfig Manager continuoustest.ManagerConfig WriteReadSeriesTest continuoustest.WriteReadSeriesTestConfig diff --git a/cmd/mimir/main.go b/cmd/mimir/main.go index f659a3366cc..49516e25aeb 100644 --- a/cmd/mimir/main.go +++ b/cmd/mimir/main.go @@ -20,9 +20,9 @@ import ( "github.com/go-kit/log/level" "github.com/grafana/dskit/flagext" + "github.com/grafana/dskit/tracing" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" - "github.com/weaveworks/common/tracing" "gopkg.in/yaml.v3" "github.com/grafana/mimir/pkg/mimir" diff --git a/cmd/query-tee/main.go b/cmd/query-tee/main.go index e0ee03d0944..79cd42bf88f 100644 --- a/cmd/query-tee/main.go +++ b/cmd/query-tee/main.go @@ -12,10 +12,10 @@ import ( "github.com/go-kit/log/level" "github.com/grafana/dskit/flagext" + "github.com/grafana/dskit/log" + "github.com/grafana/dskit/server" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/collectors" - "github.com/weaveworks/common/logging" - "github.com/weaveworks/common/server" "github.com/grafana/mimir/pkg/util/instrumentation" util_log "github.com/grafana/mimir/pkg/util/log" @@ -24,7 +24,7 @@ import ( type Config struct { ServerMetricsPort int - LogLevel logging.Level + LogLevel log.Level ProxyConfig querytee.ProxyConfig PathPrefix string } diff --git a/go.mod b/go.mod index 9d8db24b45f..69ce4c60528 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/golang/snappy v0.0.4 github.com/google/gopacket v1.1.19 github.com/gorilla/mux v1.8.0 - github.com/grafana/dskit v0.0.0-20230731140248-b62b4b2ca7b2 + github.com/grafana/dskit v0.0.0-20230804003603-740f56bd2934 github.com/grafana/e2e v0.1.1-0.20230221201045-21ebba73580b github.com/hashicorp/golang-lru v0.6.0 github.com/json-iterator/go v1.1.12 @@ -38,7 +38,6 @@ require ( github.com/spf13/afero v1.9.5 github.com/stretchr/testify v1.8.4 github.com/uber/jaeger-client-go v2.30.0+incompatible - github.com/weaveworks/common v0.0.0-20230728070032-dd9e68f319d5 go.uber.org/atomic v1.11.0 go.uber.org/goleak v1.2.1 golang.org/x/crypto v0.11.0 diff --git a/go.sum b/go.sum index 42d34277fb9..08a98e0e7c0 100644 --- a/go.sum +++ b/go.sum @@ -450,11 +450,9 @@ github.com/armon/go-metrics v0.4.1 h1:hR91U9KYmb6bLBYLQjyM+3j+rcd/UhE+G78SFnF8gJ github.com/armon/go-metrics v0.4.1/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3dyBCFEj5IhUbnKptjxatkF07cF2ak3yi77so= github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= -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.44.312 h1:llrElfzeqG/YOLFFKjg1xNpZCFJ2xraIi3PqSuP+95k= github.com/aws/aws-sdk-go v1.44.312/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI= @@ -499,7 +497,6 @@ github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91 github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/charleskorn/goautoneg v0.0.0-20230303030534-7248a2f4c9cc h1:r9yn26N6K60wfQPMwxNeD8U2djqObFYh6o9LXfeMecg= @@ -533,13 +530,11 @@ github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230105202645-06c439db220b/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/colega/go-yaml-yaml v0.0.0-20220720105220-255a8d16d094 h1:FpZSn61BWXbtyH68+uSv416veEswX1M2HRyQfdHnOyQ= github.com/colega/go-yaml-yaml v0.0.0-20220720105220-255a8d16d094/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 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/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/coreos/go-systemd/v22 v22.4.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -619,13 +614,11 @@ github.com/go-jose/go-jose/v3 v3.0.0/go.mod h1:RNkWWRld676jZEYoV3+XK8L2ZnNSvIsxF github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= -github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4= github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -719,14 +712,11 @@ github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v0.0.0-20180223154316-0cd9801be74a/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= -github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= -github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/gogo/status v1.0.3/go.mod h1:SavQ51ycCLnc7dGyJxp8YAmudx8xqiVrRf+6IXRsugc= github.com/gogo/status v1.1.1 h1:DuHXlSFHNKqTQ+/ACf5Vs6r4X/dH2EgIzR9Vr+H65kg= github.com/gogo/status v1.1.1/go.mod h1:jpG3dM5QPcqu19Hg8lkUhBFBa3TcLs1DG7+2Jqci7oU= github.com/golang-jwt/jwt/v4 v4.5.0 h1:7cYmW1XlMY7h7ii7UhUyChSgS5wUJEnm9uZVTGqOWzg= @@ -858,7 +848,6 @@ github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qK github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gophercloud/gophercloud v1.5.0 h1:cDN6XFCLKiiqvYpjQLq9AiM7RDRbIC9450WpPH+yvXo= -github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= 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 v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= @@ -866,8 +855,8 @@ github.com/gosimple/slug v1.1.1 h1:fRu/digW+NMwBIP+RmviTK97Ho/bEj/C9swrCspN3D4= github.com/gosimple/slug v1.1.1/go.mod h1:ER78kgg1Mv0NQGlXiDe57DpCyfbNywXXZ9mIorhxAf0= github.com/grafana-tools/sdk v0.0.0-20211220201350-966b3088eec9 h1:LQAhgcUPnzdjU/OjCJaLlPQI7NmQCRlfjMPSA1VegvA= github.com/grafana-tools/sdk v0.0.0-20211220201350-966b3088eec9/go.mod h1:AHHlOEv1+GGQ3ktHMlhuTUwo3zljV3QJbC0+8o2kn+4= -github.com/grafana/dskit v0.0.0-20230731140248-b62b4b2ca7b2 h1:cpwAHjmCSEjo67r8cmqqZQHa6jOFAujXel8hY7fZRgw= -github.com/grafana/dskit v0.0.0-20230731140248-b62b4b2ca7b2/go.mod h1:M03k2fzuQ2n9TVE1xfVKTESibxsXdw0wYfWT3+9Owp4= +github.com/grafana/dskit v0.0.0-20230804003603-740f56bd2934 h1:W1g+y6rOO7K/Jm2XNPxIXyJisJSJ25uiVVaSa7N1Zwo= +github.com/grafana/dskit v0.0.0-20230804003603-740f56bd2934/go.mod h1:Xg0aN3EpqkYFW1ZxGyIl4BGEpr3QrCQOM1aWalpU3ik= github.com/grafana/e2e v0.1.1-0.20230221201045-21ebba73580b h1:dzle+89/D0hOxscjZlkb6ovYA52t9hl6h/S+hI8ek1Q= github.com/grafana/e2e v0.1.1-0.20230221201045-21ebba73580b/go.mod h1:3UsooRp7yW5/NJQBlXcTsAHOoykEhNUYXkQ3r6ehEEY= github.com/grafana/gomemcache v0.0.0-20230316202710-a081dae0aba9 h1:WB3bGH2f1UN6jkd6uAEWfHB8OD7dKJ0v2Oo6SNfhpfQ= @@ -963,7 +952,6 @@ github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLf github.com/ionos-cloud/sdk-go/v6 v6.1.8 h1:493wE/BkZxJf7x79UCE0cYGPZoqQcPiEBALvt7uVGY0= github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= -github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= @@ -987,7 +975,6 @@ github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8 github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= @@ -1034,7 +1021,6 @@ github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= -github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= @@ -1046,7 +1032,6 @@ github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI= github.com/miekg/dns v1.1.55 h1:GoQ4hpsj0nFLYe+bWiCToyrBEJXkQfOOIvFGFy0lEgo= @@ -1106,7 +1091,6 @@ github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometh github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite v0.82.0/go.mod h1:2FVfNpoH3v34K0Lx4s37n54U11ir9Wz8rAab8DaL6ho= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/image-spec v1.0.2 h1:9yCKha/T5XdGtO0q9Q9a6T5NUCsTn/DrBg0D7ufOcFM= -github.com/opentracing-contrib/go-grpc v0.0.0-20180928155321-4b5a12d3ff02/go.mod h1:JNdpVEzCpXBgIiv4ds+TzhN1hrtxq6ClLrTlT9OQRSc= github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e h1:4cPxUYdgaGzZIT5/j0IfqOrrXmq6bG8AwvwisMXpdrg= github.com/opentracing-contrib/go-grpc v0.0.0-20210225150812-73cb765af46e/go.mod h1:DYR5Eij8rJl8h7gblRrOZ8g0kW1umSpKqYIBTgeDtLo= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -1141,16 +1125,12 @@ github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3O github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= 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/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= -github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_golang v1.16.0 h1:yk/hx9hDbrGHovbci4BY+pRMfSuuat626eFsHb7tmT8= github.com/prometheus/client_golang v1.16.0/go.mod h1:Zsulrv/L9oM40tJ7T815tM89lFEugiJ9HzIqaAx4LKc= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/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.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/client_model v0.4.0 h1:5lQXD3cAg1OXBf4Wq03gTrXHeaV0TQvGfUooCfx1yqY= github.com/prometheus/client_model v0.4.0/go.mod h1:oMQmHW1/JoDwqLtg57MGgP/Fb1CJEYF2imWWhWtMkYU= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= @@ -1158,13 +1138,10 @@ github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8b github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= -github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY= github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY= 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.8.2/go.mod h1:00shzmJL7KxcsabLWcONwpyNEuWhREOnFqZW7vadFS0= github.com/prometheus/exporter-toolkit v0.10.0 h1:yOAzZTi4M22ZzVxD+fhy1URTuNRj/36uQJJ5S8IPza8= github.com/prometheus/exporter-toolkit v0.10.0/go.mod h1:+sVFzuvV5JDyw+Ih6p3zFxZNVnKQa3x5qPmDSiPu4ZY= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -1172,8 +1149,6 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= -github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI= github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY= github.com/rainycape/unidecode v0.0.0-20150907023854-cb7f23ec59be h1:ta7tUOvsPHVHGom5hKW5VXNc2xZIkfCKP8iaqOyYtUQ= @@ -1257,15 +1232,11 @@ github.com/thanos-io/objstore v0.0.0-20230727115635-d0c43443ecda h1:DtxaU/a7QRPi github.com/thanos-io/objstore v0.0.0-20230727115635-d0c43443ecda/go.mod h1:IS7Z25+0KaknyU2P5PTP/5hwY6Yr/FzbInF88Yd5auU= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= -github.com/uber/jaeger-client-go v2.28.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-client-go v2.30.0+incompatible h1:D6wyKGCecFaSRUpo8lCVbaOOb6ThwMmTEbhRwtKR97o= github.com/uber/jaeger-client-go v2.30.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= -github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/uber/jaeger-lib v2.4.1+incompatible h1:td4jdvLcExb4cBISKIpHuGoVXh+dVKhn2Um6rjCsSsg= github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/vultr/govultr/v2 v2.17.2 h1:gej/rwr91Puc/tgh+j33p/BLR16UrIPnSr+AIwYWZQs= -github.com/weaveworks/common v0.0.0-20230728070032-dd9e68f319d5 h1:nORobjToZAvi54wcuUXLq+XG2Rsr0XEizy5aHBHvqWQ= -github.com/weaveworks/common v0.0.0-20230728070032-dd9e68f319d5/go.mod h1:rgbeLfJUtEr+G74cwFPR1k/4N0kDeaeSv/qhUNE4hm8= 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= @@ -1322,7 +1293,6 @@ go.opentelemetry.io/otel/trace v1.16.0 h1:8JRpaObFoW0pxuVPapkgH8UhHQj+bJW8jJsCZE go.opentelemetry.io/otel/trace v1.16.0/go.mod h1:Yt9vYq1SdNz3xdjZZK7wcXv1qv2pwLkqr2QVwea0ef0= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v0.15.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= -go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE= go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= @@ -1353,7 +1323,6 @@ golang.org/x/crypto v0.0.0-20220314234659-1baeb1ce4c0b/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= 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.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA= golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1593,7 +1562,6 @@ golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1648,7 +1616,6 @@ golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/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= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -1670,7 +1637,6 @@ golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= diff --git a/pkg/alertmanager/alertmanagerpb/alertmanager.pb.go b/pkg/alertmanager/alertmanagerpb/alertmanager.pb.go index ecb21512fec..f3bb82fe59c 100644 --- a/pkg/alertmanager/alertmanagerpb/alertmanager.pb.go +++ b/pkg/alertmanager/alertmanagerpb/alertmanager.pb.go @@ -8,8 +8,8 @@ import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + httpgrpc "github.com/grafana/dskit/httpgrpc" clusterpb "github.com/prometheus/alertmanager/cluster/clusterpb" - httpgrpc "github.com/weaveworks/common/httpgrpc" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -239,39 +239,39 @@ func init() { func init() { proto.RegisterFile("alertmanager.proto", fileDescriptor_e60437b6e0c74c9a) } var fileDescriptor_e60437b6e0c74c9a = []byte{ - // 509 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x41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 0x70, 0xef, 0x28, 0x96, 0x09, - 0x39, 0x84, 0xfb, 0x27, 0x7c, 0x3e, 0x9a, 0x86, 0xc9, 0x92, 0x07, 0x66, 0xf4, 0x54, 0x4e, 0xba, - 0xdd, 0xf6, 0x06, 0x2e, 0x3e, 0x4c, 0xc2, 0x41, 0xe4, 0x65, 0x44, 0x6c, 0xc8, 0xc4, 0x66, 0x26, - 0xb9, 0x58, 0x4a, 0x6d, 0xae, 0x74, 0xf1, 0xf1, 0x0d, 0xf7, 0x1f, 0x93, 0x61, 0xb0, 0x13, 0x0d, - 0x4e, 0x4a, 0xff, 0xbd, 0xb8, 0xf0, 0x3c, 0x07, 0x37, 0x74, 0x84, 0x9a, 0xc7, 0xf5, 0xc5, 0x92, - 0xa2, 0x8b, 0x25, 0x45, 0x57, 0x4b, 0x8a, 0x3f, 0xfb, 0x14, 0x7f, 0xf7, 0x29, 0xfe, 0xe1, 0x53, - 0xbc, 0xf0, 0x29, 0xfe, 0xe9, 0x53, 0x7c, 0xe9, 0x53, 0x74, 0xe5, 0x53, 0xfc, 0x65, 0x45, 0xd1, - 0x62, 0x45, 0xd1, 0xc5, 0x8a, 0xa2, 0x37, 0x89, 0xff, 0x6e, 0x90, 0x5e, 0x3f, 0xf7, 0x27, 0xbf, - 0x03, 0x00, 0x00, 0xff, 0xff, 0x81, 0x5b, 0x6b, 0x33, 0xa4, 0x03, 0x00, 0x00, + // 505 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x53, 0x4f, 0x6f, 0x12, 0x41, + 0x1c, 0x9d, 0x69, 0x2d, 0xa6, 0x3f, 0x14, 0xb6, 0x53, 0x54, 0xc2, 0x61, 0x4a, 0xf1, 0x42, 0x38, + 0xec, 0x1a, 0x3c, 0x18, 0x3d, 0xb5, 0x95, 0xc5, 0x36, 0x8d, 0x40, 0x06, 0xb8, 0x98, 0x18, 0x32, + 0xc0, 0x74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, 0xa5, 0x1e, + 0x97, 0xaa, 0xf2, 0xf4, 0x8e, 0xfb, 0x4f, 0xc9, 0x30, 0xd8, 0x4d, 0x06, 0x27, 0xd5, 0x7f, 0x5e, + 0x5c, 0x7c, 0x9e, 0xc3, 0x3b, 0x3a, 0x62, 0xcd, 0x93, 0xd6, 0x6a, 0x4d, 0xd1, 0xd5, 0x9a, 0xa2, + 0x9b, 0x35, 0xc5, 0x9f, 0x7c, 0x8a, 0xbf, 0xf9, 0x14, 0x7f, 0xf7, 0x29, 0x5e, 0xf9, 0x14, 0xff, + 0xf0, 0x29, 0xbe, 0xf6, 0x29, 0xba, 0xf1, 0x29, 0xfe, 0xbc, 0xa1, 0x68, 0xb5, 0xa1, 0xe8, 0x6a, + 0x43, 0xd1, 0xbb, 0xcc, 0x3f, 0x37, 0xce, 0x05, 0xcf, 0xfd, 0xf9, 0xaf, 0x00, 0x00, 0x00, 0xff, + 0xff, 0xd2, 0x51, 0xe3, 0x22, 0xa0, 0x03, 0x00, 0x00, } func (x UpdateStateStatus) String() string { diff --git a/pkg/alertmanager/alertmanagerpb/alertmanager.proto b/pkg/alertmanager/alertmanagerpb/alertmanager.proto index 976f3154107..618fdca94f1 100644 --- a/pkg/alertmanager/alertmanagerpb/alertmanager.proto +++ b/pkg/alertmanager/alertmanagerpb/alertmanager.proto @@ -10,7 +10,7 @@ import "gogoproto/gogo.proto"; option go_package = "alertmanagerpb"; -import "github.com/weaveworks/common/httpgrpc/httpgrpc.proto"; +import "github.com/grafana/dskit/httpgrpc/httpgrpc.proto"; import "github.com/prometheus/alertmanager/cluster/clusterpb/cluster.proto"; // Alertmanager interface exposed to the Alertmanager Distributor and other Alertmanagers diff --git a/pkg/alertmanager/api_test.go b/pkg/alertmanager/api_test.go index f780b4ec9f3..da944d5ba78 100644 --- a/pkg/alertmanager/api_test.go +++ b/pkg/alertmanager/api_test.go @@ -17,6 +17,7 @@ import ( "github.com/go-kit/log" "github.com/gorilla/mux" "github.com/grafana/dskit/flagext" + "github.com/grafana/dskit/user" "github.com/pkg/errors" "github.com/prometheus/alertmanager/config" "github.com/prometheus/client_golang/prometheus" @@ -24,7 +25,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/thanos-io/objstore" - "github.com/weaveworks/common/user" "github.com/grafana/mimir/pkg/alertmanager/alertspb" "github.com/grafana/mimir/pkg/alertmanager/alertstore/bucketclient" diff --git a/pkg/alertmanager/distributor.go b/pkg/alertmanager/distributor.go index e98f3f953aa..1ea29028752 100644 --- a/pkg/alertmanager/distributor.go +++ b/pkg/alertmanager/distributor.go @@ -17,15 +17,15 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" + "github.com/grafana/dskit/httpgrpc" "github.com/grafana/dskit/ring" "github.com/grafana/dskit/ring/client" "github.com/grafana/dskit/services" "github.com/grafana/dskit/tenant" + "github.com/grafana/dskit/user" "github.com/opentracing/opentracing-go" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/user" "github.com/grafana/mimir/pkg/alertmanager/merger" "github.com/grafana/mimir/pkg/util" diff --git a/pkg/alertmanager/distributor_test.go b/pkg/alertmanager/distributor_test.go index 0d0bcf49464..6947a55f645 100644 --- a/pkg/alertmanager/distributor_test.go +++ b/pkg/alertmanager/distributor_test.go @@ -20,16 +20,16 @@ import ( "github.com/go-kit/log" "github.com/grafana/dskit/flagext" + "github.com/grafana/dskit/httpgrpc" "github.com/grafana/dskit/kv" "github.com/grafana/dskit/kv/consul" "github.com/grafana/dskit/ring" "github.com/grafana/dskit/services" "github.com/grafana/dskit/test" + "github.com/grafana/dskit/user" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/user" "google.golang.org/grpc" "google.golang.org/grpc/health/grpc_health_v1" diff --git a/pkg/alertmanager/multitenant.go b/pkg/alertmanager/multitenant.go index d2cb5d5ee7e..abe934f0677 100644 --- a/pkg/alertmanager/multitenant.go +++ b/pkg/alertmanager/multitenant.go @@ -20,19 +20,19 @@ import ( "github.com/go-kit/log/level" "github.com/grafana/dskit/concurrency" "github.com/grafana/dskit/flagext" + "github.com/grafana/dskit/httpgrpc" + "github.com/grafana/dskit/httpgrpc/server" "github.com/grafana/dskit/kv" "github.com/grafana/dskit/ring" "github.com/grafana/dskit/ring/client" "github.com/grafana/dskit/services" "github.com/grafana/dskit/tenant" + "github.com/grafana/dskit/user" "github.com/pkg/errors" "github.com/prometheus/alertmanager/cluster/clusterpb" amconfig "github.com/prometheus/alertmanager/config" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/httpgrpc/server" - "github.com/weaveworks/common/user" "golang.org/x/time/rate" "gopkg.in/yaml.v3" diff --git a/pkg/alertmanager/multitenant_test.go b/pkg/alertmanager/multitenant_test.go index 8c57a6eab23..c425328efca 100644 --- a/pkg/alertmanager/multitenant_test.go +++ b/pkg/alertmanager/multitenant_test.go @@ -26,11 +26,13 @@ import ( "github.com/go-kit/log" "github.com/grafana/dskit/concurrency" "github.com/grafana/dskit/flagext" + "github.com/grafana/dskit/httpgrpc" "github.com/grafana/dskit/kv/consul" dskit_metrics "github.com/grafana/dskit/metrics" "github.com/grafana/dskit/ring" "github.com/grafana/dskit/services" "github.com/grafana/dskit/test" + "github.com/grafana/dskit/user" "github.com/grafana/regexp" "github.com/prometheus/alertmanager/cluster/clusterpb" amconfig "github.com/prometheus/alertmanager/config" @@ -43,8 +45,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/thanos-io/objstore" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/user" "go.uber.org/atomic" "golang.org/x/time/rate" "google.golang.org/grpc" diff --git a/pkg/api/api.go b/pkg/api/api.go index dba30a0a3d7..8b795d18e09 100644 --- a/pkg/api/api.go +++ b/pkg/api/api.go @@ -18,9 +18,9 @@ import ( "github.com/go-kit/log/level" "github.com/gorilla/mux" "github.com/grafana/dskit/kv/memberlist" + "github.com/grafana/dskit/middleware" + "github.com/grafana/dskit/server" "github.com/prometheus/client_golang/prometheus" - "github.com/weaveworks/common/middleware" - "github.com/weaveworks/common/server" "github.com/grafana/mimir/pkg/alertmanager" "github.com/grafana/mimir/pkg/alertmanager/alertmanagerpb" diff --git a/pkg/api/api_test.go b/pkg/api/api_test.go index 09aa6383422..04c92e02755 100644 --- a/pkg/api/api_test.go +++ b/pkg/api/api_test.go @@ -14,8 +14,8 @@ import ( "github.com/go-kit/log" "github.com/gorilla/mux" + "github.com/grafana/dskit/server" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/server" "github.com/grafana/mimir/pkg/util/gziphandler" ) diff --git a/pkg/api/error/error.go b/pkg/api/error/error.go index b397f0ccd03..843b9c343ae 100644 --- a/pkg/api/error/error.go +++ b/pkg/api/error/error.go @@ -11,7 +11,7 @@ import ( "fmt" "net/http" - "github.com/weaveworks/common/httpgrpc" + "github.com/grafana/dskit/httpgrpc" ) type Type string diff --git a/pkg/api/handlers.go b/pkg/api/handlers.go index 4244aee37ba..0da15c09b5d 100644 --- a/pkg/api/handlers.go +++ b/pkg/api/handlers.go @@ -17,7 +17,9 @@ import ( "github.com/go-kit/log" "github.com/gorilla/mux" + "github.com/grafana/dskit/instrument" "github.com/grafana/dskit/kv/memberlist" + "github.com/grafana/dskit/middleware" "github.com/grafana/regexp" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" @@ -28,8 +30,6 @@ import ( "github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/storage" v1 "github.com/prometheus/prometheus/web/api/v1" - "github.com/weaveworks/common/instrument" - "github.com/weaveworks/common/middleware" "github.com/grafana/mimir/pkg/querier" "github.com/grafana/mimir/pkg/querier/stats" diff --git a/pkg/compactor/block_upload_test.go b/pkg/compactor/block_upload_test.go index 3e1ab20e464..a656df50bf0 100644 --- a/pkg/compactor/block_upload_test.go +++ b/pkg/compactor/block_upload_test.go @@ -23,6 +23,7 @@ import ( "github.com/go-kit/log" "github.com/gorilla/mux" "github.com/grafana/dskit/test" + "github.com/grafana/dskit/user" "github.com/oklog/ulid" "github.com/pkg/errors" "github.com/prometheus/prometheus/model/labels" @@ -31,7 +32,6 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" "github.com/thanos-io/objstore" - "github.com/weaveworks/common/user" "github.com/grafana/mimir/pkg/storage/bucket" mimir_tsdb "github.com/grafana/mimir/pkg/storage/tsdb" diff --git a/pkg/compactor/tenant_deletion_api_test.go b/pkg/compactor/tenant_deletion_api_test.go index 1cc9c37a86c..7e7d8e9a3f1 100644 --- a/pkg/compactor/tenant_deletion_api_test.go +++ b/pkg/compactor/tenant_deletion_api_test.go @@ -14,9 +14,9 @@ import ( "testing" "github.com/grafana/dskit/services" + "github.com/grafana/dskit/user" "github.com/stretchr/testify/require" "github.com/thanos-io/objstore" - "github.com/weaveworks/common/user" "github.com/grafana/mimir/pkg/storage/tsdb" ) diff --git a/pkg/distributor/distributor.go b/pkg/distributor/distributor.go index d0fba35efeb..1910444d797 100644 --- a/pkg/distributor/distributor.go +++ b/pkg/distributor/distributor.go @@ -17,12 +17,16 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" + "github.com/grafana/dskit/httpgrpc" + "github.com/grafana/dskit/instrument" "github.com/grafana/dskit/kv" "github.com/grafana/dskit/limiter" + "github.com/grafana/dskit/mtime" "github.com/grafana/dskit/ring" ring_client "github.com/grafana/dskit/ring/client" "github.com/grafana/dskit/services" "github.com/grafana/dskit/tenant" + "github.com/grafana/dskit/user" "github.com/opentracing/opentracing-go" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" @@ -31,10 +35,6 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/relabel" "github.com/prometheus/prometheus/scrape" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/instrument" - "github.com/weaveworks/common/mtime" - "github.com/weaveworks/common/user" "go.uber.org/atomic" "golang.org/x/exp/slices" "golang.org/x/sync/errgroup" diff --git a/pkg/distributor/distributor_test.go b/pkg/distributor/distributor_test.go index 264d91b10f3..79d9011a065 100644 --- a/pkg/distributor/distributor_test.go +++ b/pkg/distributor/distributor_test.go @@ -21,13 +21,16 @@ import ( "github.com/go-kit/log" "github.com/grafana/dskit/flagext" + "github.com/grafana/dskit/httpgrpc" "github.com/grafana/dskit/kv" "github.com/grafana/dskit/kv/consul" + "github.com/grafana/dskit/mtime" "github.com/grafana/dskit/ring" ring_client "github.com/grafana/dskit/ring/client" "github.com/grafana/dskit/services" "github.com/grafana/dskit/tenant" "github.com/grafana/dskit/test" + "github.com/grafana/dskit/user" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/testutil" "github.com/prometheus/common/model" @@ -37,9 +40,6 @@ import ( "github.com/prometheus/prometheus/scrape" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/mtime" - "github.com/weaveworks/common/user" "golang.org/x/exp/slices" "golang.org/x/time/rate" "google.golang.org/grpc" diff --git a/pkg/distributor/ha_tracker_test.go b/pkg/distributor/ha_tracker_test.go index f06ffe72243..e830fa9ace4 100644 --- a/pkg/distributor/ha_tracker_test.go +++ b/pkg/distributor/ha_tracker_test.go @@ -19,6 +19,7 @@ import ( "github.com/grafana/dskit/ring" "github.com/grafana/dskit/services" "github.com/grafana/dskit/test" + "github.com/grafana/dskit/user" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/testutil" @@ -27,7 +28,6 @@ import ( "github.com/prometheus/prometheus/model/timestamp" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "github.com/grafana/mimir/pkg/mimirpb" util_log "github.com/grafana/mimir/pkg/util/log" diff --git a/pkg/distributor/query.go b/pkg/distributor/query.go index 5159223fbf3..a595aca0051 100644 --- a/pkg/distributor/query.go +++ b/pkg/distributor/query.go @@ -13,13 +13,13 @@ import ( "time" "github.com/go-kit/log/level" + "github.com/grafana/dskit/instrument" "github.com/grafana/dskit/ring" "github.com/grafana/dskit/tenant" "github.com/opentracing/opentracing-go" "github.com/pkg/errors" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/weaveworks/common/instrument" "golang.org/x/exp/slices" ingester_client "github.com/grafana/mimir/pkg/ingester/client" diff --git a/pkg/distributor/query_test.go b/pkg/distributor/query_test.go index b76097ccbe5..4e8fe1340a2 100644 --- a/pkg/distributor/query_test.go +++ b/pkg/distributor/query_test.go @@ -16,13 +16,13 @@ import ( "time" "github.com/grafana/dskit/flagext" + "github.com/grafana/dskit/user" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/timestamp" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" ingester_client "github.com/grafana/mimir/pkg/ingester/client" "github.com/grafana/mimir/pkg/mimirpb" diff --git a/pkg/frontend/frontend_test.go b/pkg/frontend/frontend_test.go index 5706e84c905..c59e7e2a578 100644 --- a/pkg/frontend/frontend_test.go +++ b/pkg/frontend/frontend_test.go @@ -21,15 +21,15 @@ import ( "github.com/gorilla/mux" "github.com/grafana/dskit/concurrency" "github.com/grafana/dskit/flagext" + httpgrpc_server "github.com/grafana/dskit/httpgrpc/server" + "github.com/grafana/dskit/middleware" "github.com/grafana/dskit/services" + "github.com/grafana/dskit/user" otgrpc "github.com/opentracing-contrib/go-grpc" "github.com/opentracing-contrib/go-stdlib/nethttp" opentracing "github.com/opentracing/opentracing-go" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - httpgrpc_server "github.com/weaveworks/common/httpgrpc/server" - "github.com/weaveworks/common/middleware" - "github.com/weaveworks/common/user" "google.golang.org/grpc" "github.com/grafana/mimir/pkg/frontend/transport" diff --git a/pkg/frontend/querymiddleware/cardinality_query_cache_test.go b/pkg/frontend/querymiddleware/cardinality_query_cache_test.go index e7ee7bfafe5..ad9fa785c79 100644 --- a/pkg/frontend/querymiddleware/cardinality_query_cache_test.go +++ b/pkg/frontend/querymiddleware/cardinality_query_cache_test.go @@ -13,10 +13,10 @@ import ( "github.com/grafana/dskit/cache" "github.com/grafana/dskit/tenant" + "github.com/grafana/dskit/user" "github.com/prometheus/prometheus/util/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" ) func TestCardinalityQueryCache_RoundTrip_WithTenantFederation(t *testing.T) { diff --git a/pkg/frontend/querymiddleware/cardinality_test.go b/pkg/frontend/querymiddleware/cardinality_test.go index a1ac2f264f3..54ce45d58a3 100644 --- a/pkg/frontend/querymiddleware/cardinality_test.go +++ b/pkg/frontend/querymiddleware/cardinality_test.go @@ -12,10 +12,10 @@ import ( "github.com/go-kit/log" "github.com/gogo/protobuf/proto" "github.com/grafana/dskit/cache" + "github.com/grafana/dskit/user" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "github.com/grafana/mimir/pkg/querier/stats" "github.com/grafana/mimir/pkg/util" diff --git a/pkg/frontend/querymiddleware/codec.go b/pkg/frontend/querymiddleware/codec.go index 005be4c55a2..c071699a33b 100644 --- a/pkg/frontend/querymiddleware/codec.go +++ b/pkg/frontend/querymiddleware/codec.go @@ -21,6 +21,7 @@ import ( "github.com/go-kit/log" "github.com/gogo/protobuf/proto" "github.com/gogo/status" + "github.com/grafana/dskit/httpgrpc" "github.com/munnerz/goautoneg" "github.com/opentracing/opentracing-go" otlog "github.com/opentracing/opentracing-go/log" @@ -28,7 +29,6 @@ import ( "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/common/model" v1 "github.com/prometheus/prometheus/web/api/v1" - "github.com/weaveworks/common/httpgrpc" "golang.org/x/exp/slices" apierror "github.com/grafana/mimir/pkg/api/error" diff --git a/pkg/frontend/querymiddleware/codec_test.go b/pkg/frontend/querymiddleware/codec_test.go index 6f708254b47..ed016d50734 100644 --- a/pkg/frontend/querymiddleware/codec_test.go +++ b/pkg/frontend/querymiddleware/codec_test.go @@ -19,14 +19,14 @@ import ( "time" "github.com/go-kit/log" + "github.com/grafana/dskit/httpgrpc" + "github.com/grafana/dskit/user" jsoniter "github.com/json-iterator/go" v1 "github.com/prometheus/client_golang/api/prometheus/v1" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/histogram" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/user" apierror "github.com/grafana/mimir/pkg/api/error" "github.com/grafana/mimir/pkg/mimirpb" diff --git a/pkg/frontend/querymiddleware/generic_query_cache_test.go b/pkg/frontend/querymiddleware/generic_query_cache_test.go index 0cd5a348693..3336d073306 100644 --- a/pkg/frontend/querymiddleware/generic_query_cache_test.go +++ b/pkg/frontend/querymiddleware/generic_query_cache_test.go @@ -15,12 +15,12 @@ import ( "github.com/go-kit/log" "github.com/grafana/dskit/cache" + "github.com/grafana/dskit/user" "github.com/prometheus/client_golang/prometheus" promtest "github.com/prometheus/client_golang/prometheus/testutil" "github.com/prometheus/prometheus/util/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" ) type newGenericQueryCacheFunc func(cache cache.Cache, limits Limits, next http.RoundTripper, logger log.Logger, reg prometheus.Registerer) http.RoundTripper diff --git a/pkg/frontend/querymiddleware/instrumentation.go b/pkg/frontend/querymiddleware/instrumentation.go index 33fcd39b1f3..99c1275df4f 100644 --- a/pkg/frontend/querymiddleware/instrumentation.go +++ b/pkg/frontend/querymiddleware/instrumentation.go @@ -9,10 +9,10 @@ import ( "context" "time" + "github.com/grafana/dskit/instrument" "github.com/opentracing/opentracing-go" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/weaveworks/common/instrument" ) // newInstrumentMiddleware can be inserted into the middleware chain to expose timing information. diff --git a/pkg/frontend/querymiddleware/limits.go b/pkg/frontend/querymiddleware/limits.go index 2c4946508dd..21de249bb4f 100644 --- a/pkg/frontend/querymiddleware/limits.go +++ b/pkg/frontend/querymiddleware/limits.go @@ -14,9 +14,9 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/grafana/dskit/tenant" + "github.com/grafana/dskit/user" "github.com/opentracing/opentracing-go" "github.com/prometheus/prometheus/model/timestamp" - "github.com/weaveworks/common/user" apierror "github.com/grafana/mimir/pkg/api/error" "github.com/grafana/mimir/pkg/util" diff --git a/pkg/frontend/querymiddleware/limits_test.go b/pkg/frontend/querymiddleware/limits_test.go index 4edfd039754..c2fba3f929e 100644 --- a/pkg/frontend/querymiddleware/limits_test.go +++ b/pkg/frontend/querymiddleware/limits_test.go @@ -16,10 +16,10 @@ import ( "github.com/go-kit/log" "github.com/grafana/dskit/tenant" + "github.com/grafana/dskit/user" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "go.uber.org/atomic" "github.com/grafana/mimir/pkg/util" diff --git a/pkg/frontend/querymiddleware/querysharding_test.go b/pkg/frontend/querymiddleware/querysharding_test.go index f0d1c29eb68..811de982f8b 100644 --- a/pkg/frontend/querymiddleware/querysharding_test.go +++ b/pkg/frontend/querymiddleware/querysharding_test.go @@ -20,6 +20,8 @@ import ( "time" "github.com/go-kit/log" + "github.com/grafana/dskit/httpgrpc" + "github.com/grafana/dskit/user" "github.com/grafana/regexp" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" @@ -33,8 +35,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/user" apierror "github.com/grafana/mimir/pkg/api/error" "github.com/grafana/mimir/pkg/frontend/querymiddleware/astmapper" diff --git a/pkg/frontend/querymiddleware/retry.go b/pkg/frontend/querymiddleware/retry.go index 2d41d6576c1..180ba683460 100644 --- a/pkg/frontend/querymiddleware/retry.go +++ b/pkg/frontend/querymiddleware/retry.go @@ -11,9 +11,9 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" + "github.com/grafana/dskit/httpgrpc" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/weaveworks/common/httpgrpc" apierror "github.com/grafana/mimir/pkg/api/error" util_log "github.com/grafana/mimir/pkg/util/log" diff --git a/pkg/frontend/querymiddleware/retry_test.go b/pkg/frontend/querymiddleware/retry_test.go index 4dbb5181920..e0d75c6bd58 100644 --- a/pkg/frontend/querymiddleware/retry_test.go +++ b/pkg/frontend/querymiddleware/retry_test.go @@ -13,8 +13,8 @@ import ( "testing" "github.com/go-kit/log" + "github.com/grafana/dskit/httpgrpc" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/httpgrpc" "go.uber.org/atomic" apierror "github.com/grafana/mimir/pkg/api/error" diff --git a/pkg/frontend/querymiddleware/roundtrip_test.go b/pkg/frontend/querymiddleware/roundtrip_test.go index d802733b27b..90db13947c3 100644 --- a/pkg/frontend/querymiddleware/roundtrip_test.go +++ b/pkg/frontend/querymiddleware/roundtrip_test.go @@ -19,6 +19,8 @@ import ( "time" "github.com/go-kit/log" + "github.com/grafana/dskit/middleware" + "github.com/grafana/dskit/user" "github.com/prometheus/client_golang/api" v1 "github.com/prometheus/client_golang/api/prometheus/v1" "github.com/prometheus/client_golang/prometheus" @@ -27,8 +29,6 @@ import ( "github.com/prometheus/prometheus/promql" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/middleware" - "github.com/weaveworks/common/user" "github.com/grafana/mimir/pkg/mimirpb" ) diff --git a/pkg/frontend/querymiddleware/split_and_cache_test.go b/pkg/frontend/querymiddleware/split_and_cache_test.go index 2d7eeadd93b..c49aa279aee 100644 --- a/pkg/frontend/querymiddleware/split_and_cache_test.go +++ b/pkg/frontend/querymiddleware/split_and_cache_test.go @@ -20,6 +20,8 @@ import ( "github.com/gogo/protobuf/proto" "github.com/grafana/dskit/cache" "github.com/grafana/dskit/concurrency" + "github.com/grafana/dskit/middleware" + "github.com/grafana/dskit/user" "github.com/opentracing/opentracing-go" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/testutil" @@ -29,8 +31,6 @@ import ( "github.com/prometheus/prometheus/promql/parser" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/middleware" - "github.com/weaveworks/common/user" "go.uber.org/atomic" apierror "github.com/grafana/mimir/pkg/api/error" diff --git a/pkg/frontend/querymiddleware/split_by_instant_interval_test.go b/pkg/frontend/querymiddleware/split_by_instant_interval_test.go index 748e386d39d..add48be1a3f 100644 --- a/pkg/frontend/querymiddleware/split_by_instant_interval_test.go +++ b/pkg/frontend/querymiddleware/split_by_instant_interval_test.go @@ -12,6 +12,7 @@ import ( "time" "github.com/go-kit/log" + "github.com/grafana/dskit/user" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/testutil" "github.com/prometheus/prometheus/promql" @@ -19,7 +20,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "github.com/grafana/mimir/pkg/querier/stats" "github.com/grafana/mimir/pkg/util" diff --git a/pkg/frontend/querymiddleware/stats_test.go b/pkg/frontend/querymiddleware/stats_test.go index 82bfeefa91e..fff3e7ba4ff 100644 --- a/pkg/frontend/querymiddleware/stats_test.go +++ b/pkg/frontend/querymiddleware/stats_test.go @@ -7,11 +7,11 @@ import ( "strings" "testing" + "github.com/grafana/dskit/user" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "github.com/grafana/mimir/pkg/util" ) diff --git a/pkg/frontend/transport/handler.go b/pkg/frontend/transport/handler.go index cefc4537e50..de20c941181 100644 --- a/pkg/frontend/transport/handler.go +++ b/pkg/frontend/transport/handler.go @@ -20,12 +20,12 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/grafana/dskit/flagext" + "github.com/grafana/dskit/httpgrpc" + "github.com/grafana/dskit/httpgrpc/server" "github.com/grafana/dskit/tenant" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/httpgrpc/server" apierror "github.com/grafana/mimir/pkg/api/error" querier_stats "github.com/grafana/mimir/pkg/querier/stats" diff --git a/pkg/frontend/transport/handler_test.go b/pkg/frontend/transport/handler_test.go index c8981adec02..e22cecf3c6c 100644 --- a/pkg/frontend/transport/handler_test.go +++ b/pkg/frontend/transport/handler_test.go @@ -21,14 +21,14 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/grafana/dskit/concurrency" + "github.com/grafana/dskit/httpgrpc" "github.com/grafana/dskit/test" + "github.com/grafana/dskit/user" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" promtest "github.com/prometheus/client_golang/prometheus/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/user" "go.uber.org/atomic" "github.com/grafana/mimir/pkg/util/activitytracker" diff --git a/pkg/frontend/transport/roundtripper.go b/pkg/frontend/transport/roundtripper.go index 81d04632406..0ee1b7c8dbe 100644 --- a/pkg/frontend/transport/roundtripper.go +++ b/pkg/frontend/transport/roundtripper.go @@ -11,8 +11,8 @@ import ( "io" "net/http" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/httpgrpc/server" + "github.com/grafana/dskit/httpgrpc" + "github.com/grafana/dskit/httpgrpc/server" ) // GrpcRoundTripper is similar to http.RoundTripper, but works with HTTP requests converted to protobuf messages. diff --git a/pkg/frontend/v1/frontend.go b/pkg/frontend/v1/frontend.go index 3f2a66ccef4..d49e5c6ee8a 100644 --- a/pkg/frontend/v1/frontend.go +++ b/pkg/frontend/v1/frontend.go @@ -14,13 +14,13 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" + "github.com/grafana/dskit/httpgrpc" "github.com/grafana/dskit/services" "github.com/grafana/dskit/tenant" "github.com/opentracing/opentracing-go" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/weaveworks/common/httpgrpc" "github.com/grafana/mimir/pkg/frontend/v1/frontendv1pb" "github.com/grafana/mimir/pkg/querier/stats" diff --git a/pkg/frontend/v1/frontend_test.go b/pkg/frontend/v1/frontend_test.go index 89b2c469051..547b72bfd2d 100644 --- a/pkg/frontend/v1/frontend_test.go +++ b/pkg/frontend/v1/frontend_test.go @@ -18,7 +18,10 @@ import ( "github.com/go-kit/log" "github.com/gorilla/mux" "github.com/grafana/dskit/flagext" + httpgrpc_server "github.com/grafana/dskit/httpgrpc/server" + "github.com/grafana/dskit/middleware" "github.com/grafana/dskit/services" + "github.com/grafana/dskit/user" otgrpc "github.com/opentracing-contrib/go-grpc" "github.com/opentracing-contrib/go-stdlib/nethttp" "github.com/opentracing/opentracing-go" @@ -29,9 +32,6 @@ import ( "github.com/stretchr/testify/require" "github.com/uber/jaeger-client-go" "github.com/uber/jaeger-client-go/config" - httpgrpc_server "github.com/weaveworks/common/httpgrpc/server" - "github.com/weaveworks/common/middleware" - "github.com/weaveworks/common/user" "go.uber.org/atomic" "google.golang.org/grpc" diff --git a/pkg/frontend/v1/frontendv1pb/frontend.pb.go b/pkg/frontend/v1/frontendv1pb/frontend.pb.go index f06b573ea2f..c23698e8060 100644 --- a/pkg/frontend/v1/frontendv1pb/frontend.pb.go +++ b/pkg/frontend/v1/frontendv1pb/frontend.pb.go @@ -11,8 +11,8 @@ import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + httpgrpc "github.com/grafana/dskit/httpgrpc" stats "github.com/grafana/mimir/pkg/querier/stats" - httpgrpc "github.com/weaveworks/common/httpgrpc" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -265,38 +265,37 @@ func init() { func init() { proto.RegisterFile("frontend.proto", fileDescriptor_eca3873955a29cfe) } var fileDescriptor_eca3873955a29cfe = []byte{ - // 487 bytes of a gzipped FileDescriptorProto + // 477 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x41, 0x6e, 0xd3, 0x40, - 0x14, 0x86, 0xfd, 0xa0, 0x94, 0xf0, 0x6a, 0x45, 0xd6, 0xa8, 0xa0, 0xc8, 0xa0, 0x51, 0x64, 0x01, - 0x8a, 0x58, 0xd8, 0x10, 0x10, 0x08, 0x96, 0xa5, 0xa1, 0x74, 0x83, 0x8a, 0x63, 0x36, 0x6c, 0x2a, - 0xc7, 0x99, 0x38, 0x56, 0x6b, 0x8f, 0x3b, 0x9e, 0x34, 0xca, 0x8e, 0x13, 0x20, 0x24, 0x2e, 0xc1, - 0x19, 0x38, 0x01, 0xcb, 0x2c, 0xbb, 0x24, 0xce, 0x86, 0x65, 0x8f, 0x80, 0xec, 0x49, 0xdc, 0x24, - 0xaa, 0x60, 0x33, 0x9a, 0x99, 0x7f, 0xde, 0x7b, 0xdf, 0xff, 0xdb, 0x58, 0x1f, 0x08, 0x9e, 0x48, - 0x96, 0xf4, 0xed, 0x54, 0x70, 0xc9, 0x49, 0x6d, 0x79, 0x36, 0x77, 0x43, 0x1e, 0xf2, 0xf2, 0xd2, - 0x29, 0x76, 0x4a, 0x37, 0x5f, 0x84, 0x91, 0x1c, 0x8e, 0x7a, 0x76, 0xc0, 0x63, 0x67, 0xcc, 0xfc, - 0x73, 0x36, 0xe6, 0xe2, 0x24, 0x73, 0x02, 0x1e, 0xc7, 0x3c, 0x71, 0x86, 0x52, 0xa6, 0xa1, 0x48, - 0x83, 0x6a, 0xb3, 0xa8, 0x7a, 0xb9, 0x52, 0x15, 0x0a, 0x7f, 0xe0, 0x27, 0xbe, 0x13, 0x47, 0x71, - 0x24, 0x9c, 0xf4, 0x24, 0x74, 0xce, 0x46, 0x4c, 0x44, 0x4c, 0x38, 0x99, 0xf4, 0x65, 0xa6, 0x56, - 0x55, 0x67, 0x7d, 0x07, 0x34, 0xde, 0x2d, 0x80, 0x3c, 0xfe, 0xf6, 0x34, 0x62, 0x89, 0x24, 0xaf, - 0x70, 0xa7, 0x68, 0xef, 0xb2, 0xb3, 0x11, 0xcb, 0x64, 0x03, 0x9a, 0xd0, 0xda, 0x69, 0xdf, 0xb5, - 0xab, 0x91, 0xef, 0x3d, 0xef, 0x68, 0x21, 0xba, 0xab, 0x2f, 0x89, 0x85, 0x5b, 0x72, 0x92, 0xb2, - 0xc6, 0x8d, 0x26, 0xb4, 0xea, 0xed, 0xba, 0x5d, 0x59, 0xf7, 0x26, 0x29, 0x73, 0x4b, 0x8d, 0x58, - 0xa8, 0x97, 0x00, 0x9d, 0xc4, 0xef, 0x9d, 0xb2, 0x7e, 0xe3, 0x66, 0x13, 0x5a, 0x35, 0x77, 0xed, - 0xce, 0xfa, 0x0a, 0x68, 0x28, 0x16, 0x8f, 0x2f, 0xe9, 0xc8, 0x1b, 0xd4, 0xd5, 0xac, 0x2c, 0xe5, - 0x49, 0xc6, 0x16, 0x58, 0xf7, 0x36, 0xb1, 0x94, 0xea, 0xae, 0xbd, 0x25, 0x26, 0xd6, 0x82, 0xb2, - 0xdf, 0xe1, 0x7e, 0x09, 0x77, 0xc7, 0xad, 0xce, 0xc4, 0xc2, 0x5b, 0xe5, 0xf0, 0x92, 0x64, 0xa7, - 0xad, 0xdb, 0x2a, 0x9f, 0x6e, 0xb1, 0xba, 0x4a, 0xb2, 0x5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0x34, 0x61, 0x1f, 0x08, 0xc3, 0xbd, 0x6d, 0x6c, 0xe4, 0xd1, 0x75, 0xe5, + 0x3f, 0x6c, 0xdb, 0x8f, 0xff, 0xf7, 0x4c, 0x5b, 0x3c, 0x38, 0x98, 0xce, 0xa8, 0x71, 0x39, 0xa3, + 0xc6, 0xd5, 0x8c, 0xc2, 0x97, 0x9c, 0xc2, 0x8f, 0x9c, 0xc2, 0xaf, 0x9c, 0xc2, 0x34, 0xa7, 0xf0, + 0x3b, 0xa7, 0xf0, 0x27, 0xa7, 0xc6, 0x55, 0x4e, 0xe1, 0xdb, 0x9c, 0x1a, 0xd3, 0x39, 0x35, 0x2e, + 0xe7, 0xd4, 0xf8, 0x68, 0x2e, 0x9b, 0x7f, 0x7a, 0x9a, 0x76, 0xbb, 0xbb, 0xea, 0x7f, 0x7d, 0xf6, + 0x37, 0x00, 0x00, 0xff, 0xff, 0x72, 0xa4, 0x89, 0x79, 0x4b, 0x03, 0x00, 0x00, } func (x Type) String() string { diff --git a/pkg/frontend/v1/frontendv1pb/frontend.proto b/pkg/frontend/v1/frontendv1pb/frontend.proto index cce85e65711..b92fa32ee8f 100644 --- a/pkg/frontend/v1/frontendv1pb/frontend.proto +++ b/pkg/frontend/v1/frontendv1pb/frontend.proto @@ -12,7 +12,7 @@ package frontend; option go_package = "frontendv1pb"; import "gogoproto/gogo.proto"; -import "github.com/weaveworks/common/httpgrpc/httpgrpc.proto"; +import "github.com/grafana/dskit/httpgrpc/httpgrpc.proto"; import "github.com/grafana/mimir/pkg/querier/stats/stats.proto"; option (gogoproto.marshaler_all) = true; diff --git a/pkg/frontend/v1/queue_test.go b/pkg/frontend/v1/queue_test.go index e63a12ceffd..9400ae9228d 100644 --- a/pkg/frontend/v1/queue_test.go +++ b/pkg/frontend/v1/queue_test.go @@ -15,11 +15,11 @@ import ( "github.com/go-kit/log" "github.com/grafana/dskit/flagext" + "github.com/grafana/dskit/httpgrpc" "github.com/grafana/dskit/services" + "github.com/grafana/dskit/user" "github.com/pkg/errors" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/user" "google.golang.org/grpc/metadata" "github.com/grafana/mimir/pkg/frontend/v1/frontendv1pb" diff --git a/pkg/frontend/v2/frontend.go b/pkg/frontend/v2/frontend.go index d594e958294..7f10726ca9b 100644 --- a/pkg/frontend/v2/frontend.go +++ b/pkg/frontend/v2/frontend.go @@ -18,6 +18,7 @@ import ( "github.com/go-kit/log/level" "github.com/grafana/dskit/flagext" "github.com/grafana/dskit/grpcclient" + "github.com/grafana/dskit/httpgrpc" "github.com/grafana/dskit/netutil" "github.com/grafana/dskit/services" "github.com/grafana/dskit/tenant" @@ -25,7 +26,6 @@ import ( "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/weaveworks/common/httpgrpc" "go.uber.org/atomic" "github.com/grafana/mimir/pkg/frontend/v2/frontendv2pb" diff --git a/pkg/frontend/v2/frontend_scheduler_worker.go b/pkg/frontend/v2/frontend_scheduler_worker.go index ed46b0102e1..932f1be6ab1 100644 --- a/pkg/frontend/v2/frontend_scheduler_worker.go +++ b/pkg/frontend/v2/frontend_scheduler_worker.go @@ -14,11 +14,11 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/grafana/dskit/backoff" + "github.com/grafana/dskit/httpgrpc" "github.com/grafana/dskit/services" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/weaveworks/common/httpgrpc" "google.golang.org/grpc" "github.com/grafana/mimir/pkg/frontend/v2/frontendv2pb" diff --git a/pkg/frontend/v2/frontend_test.go b/pkg/frontend/v2/frontend_test.go index 20baa613f0d..40aa3a85c1d 100644 --- a/pkg/frontend/v2/frontend_test.go +++ b/pkg/frontend/v2/frontend_test.go @@ -20,14 +20,14 @@ import ( "github.com/go-kit/log" "github.com/grafana/dskit/flagext" + "github.com/grafana/dskit/httpgrpc" "github.com/grafana/dskit/services" "github.com/grafana/dskit/test" + "github.com/grafana/dskit/user" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/testutil" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/user" "go.uber.org/atomic" "google.golang.org/grpc" "google.golang.org/grpc/keepalive" diff --git a/pkg/frontend/v2/frontendv2pb/frontend.pb.go b/pkg/frontend/v2/frontendv2pb/frontend.pb.go index eae32799af5..89639a2e507 100644 --- a/pkg/frontend/v2/frontendv2pb/frontend.pb.go +++ b/pkg/frontend/v2/frontendv2pb/frontend.pb.go @@ -8,8 +8,8 @@ import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + httpgrpc "github.com/grafana/dskit/httpgrpc" stats "github.com/grafana/mimir/pkg/querier/stats" - httpgrpc "github.com/weaveworks/common/httpgrpc" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -133,29 +133,28 @@ func init() { func init() { proto.RegisterFile("frontend.proto", fileDescriptor_eca3873955a29cfe) } var fileDescriptor_eca3873955a29cfe = []byte{ - // 343 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xbd, 0x4e, 0x3a, 0x41, - 0x14, 0xc5, 0x67, 0xfe, 0x7f, 0x3f, 0x92, 0x81, 0x58, 0x8c, 0x1f, 0xd9, 0x50, 0xdc, 0xe0, 0x56, - 0x54, 0x3b, 0x09, 0x1a, 0x0b, 0x4b, 0x62, 0x88, 0x76, 0xb2, 0x52, 0xd9, 0x2d, 0x38, 0x2c, 0x2b, - 0xee, 0xce, 0x32, 0x33, 0x0b, 0xa1, 0xf3, 0x09, 0x8c, 0x8f, 0xe1, 0xa3, 0x58, 0x52, 0x52, 0xca, - 0xd0, 0x58, 0xf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f, 0xc9, 0xf1, 0x8e, 0x1f, 0x8b, 0xd6, 0x9f, 0x09, 0x6d, - 0xae, 0xb2, 0x6b, 0x0a, 0xd9, 0xb2, 0xf7, 0xd0, 0x36, 0x29, 0x6d, 0x89, 0x69, 0xd5, 0xdb, 0xce, - 0xd7, 0xfb, 0x7d, 0x57, 0xe5, 0xfc, 0x0f, 0x85, 0xdd, 0xe4, 0xa2, 0x46, 0x63, 0x3a, 0x07, 0x34, - 0x9b, 0x03, 0x5a, 0xce, 0x01, 0xbf, 0x1a, 0xc0, 0x1f, 0x06, 0xf0, 0xa7, 0x01, 0x3c, 0x35, 0x80, - 0xbf, 0x0c, 0xe0, 0x6f, 0x03, 0x68, 0x69, 0x00, 0xbf, 0x2f, 0x00, 0x4d, 0x17, 0x80, 0x66, 0x0b, - 0x40, 0x8f, 0x3b, 0x7f, 0xdb, 0x39, 0x28, 0xe2, 0xbd, 0xf8, 0x09, 0x00, 0x00, 0xff, 0xff, 0xfc, - 0x56, 0xe4, 0xc6, 0x02, 0x02, 0x00, 0x00, + // 333 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xbf, 0x4e, 0x02, 0x41, + 0x10, 0xc6, 0x77, 0xfd, 0x9b, 0x2c, 0xc4, 0x62, 0xfd, 0x93, 0x0b, 0xc5, 0x04, 0xaf, 0xa2, 0xba, + 0x35, 0x98, 0x58, 0x58, 0x12, 0x43, 0xb4, 0x93, 0x93, 0xca, 0xee, 0x80, 0xe5, 0x38, 0x91, 0xdb, + 0x63, 0x77, 0xcf, 0x84, 0xce, 0x27, 0x30, 0x3e, 0x86, 0x8f, 0x62, 0x49, 0x49, 0x29, 0x4b, 0x63, + 0xc9, 0x23, 0x98, 0xbb, 0x05, 0xc2, 0x45, 0x63, 0xb3, 0x99, 0xc9, 0x7c, 0xbf, 0xcc, 0x37, 0xdf, + 0x92, 0xa3, 0xbe, 0x14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 0xbf, 0xef, 0xaa, 0x9c, 0xff, 0xa3, 0xb0, 0x9b, 0x5c, + 0xd4, 0x68, 0x4c, 0xe7, 0x80, 0x66, 0x73, 0x40, 0xcb, 0x39, 0xe0, 0x57, 0x03, 0xf8, 0xc3, 0x00, + 0xfe, 0x34, 0x80, 0xa7, 0x06, 0xf0, 0x97, 0x01, 0xfc, 0x6d, 0x00, 0x2d, 0x0d, 0xe0, 0xf7, 0x05, + 0xa0, 0xe9, 0x02, 0xd0, 0x6c, 0x01, 0xe8, 0xb1, 0xf0, 0xaf, 0x9d, 0x83, 0x3c, 0xde, 0xcb, 0x9f, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xef, 0x5d, 0x91, 0xa7, 0xfe, 0x01, 0x00, 0x00, } func (this *QueryResultRequest) Equal(that interface{}) bool { diff --git a/pkg/frontend/v2/frontendv2pb/frontend.proto b/pkg/frontend/v2/frontendv2pb/frontend.proto index ddf01a05ef0..db2e6f27769 100644 --- a/pkg/frontend/v2/frontendv2pb/frontend.proto +++ b/pkg/frontend/v2/frontendv2pb/frontend.proto @@ -10,7 +10,7 @@ package frontendv2pb; option go_package = "frontendv2pb"; import "gogoproto/gogo.proto"; -import "github.com/weaveworks/common/httpgrpc/httpgrpc.proto"; +import "github.com/grafana/dskit/httpgrpc/httpgrpc.proto"; import "github.com/grafana/mimir/pkg/querier/stats/stats.proto"; option (gogoproto.marshaler_all) = true; diff --git a/pkg/ingester/errors.go b/pkg/ingester/errors.go index ca498f615b2..24916c5818f 100644 --- a/pkg/ingester/errors.go +++ b/pkg/ingester/errors.go @@ -9,8 +9,8 @@ import ( "fmt" "net/http" + "github.com/grafana/dskit/httpgrpc" "github.com/prometheus/prometheus/model/labels" - "github.com/weaveworks/common/httpgrpc" ) var ( diff --git a/pkg/ingester/ingester.go b/pkg/ingester/ingester.go index 4a801f181e4..df9ee1f9080 100644 --- a/pkg/ingester/ingester.go +++ b/pkg/ingester/ingester.go @@ -26,6 +26,7 @@ import ( "github.com/go-kit/log/level" "github.com/gogo/status" "github.com/grafana/dskit/concurrency" + "github.com/grafana/dskit/httpgrpc" "github.com/grafana/dskit/ring" "github.com/grafana/dskit/services" "github.com/grafana/dskit/tenant" @@ -46,7 +47,6 @@ import ( "github.com/prometheus/prometheus/tsdb/index" "github.com/prometheus/prometheus/util/zeropool" "github.com/thanos-io/objstore" - "github.com/weaveworks/common/httpgrpc" "go.uber.org/atomic" "golang.org/x/exp/slices" "golang.org/x/sync/errgroup" diff --git a/pkg/ingester/ingester_activity.go b/pkg/ingester/ingester_activity.go index 973aeed33a5..ae8f2d71ce9 100644 --- a/pkg/ingester/ingester_activity.go +++ b/pkg/ingester/ingester_activity.go @@ -10,7 +10,7 @@ import ( "strconv" "github.com/grafana/dskit/tenant" - "github.com/weaveworks/common/tracing" + "github.com/grafana/dskit/tracing" "github.com/grafana/mimir/pkg/ingester/client" "github.com/grafana/mimir/pkg/mimirpb" diff --git a/pkg/ingester/ingester_early_compaction_test.go b/pkg/ingester/ingester_early_compaction_test.go index c715e84d77f..9788c5217d9 100644 --- a/pkg/ingester/ingester_early_compaction_test.go +++ b/pkg/ingester/ingester_early_compaction_test.go @@ -16,6 +16,7 @@ import ( "github.com/grafana/dskit/ring" "github.com/grafana/dskit/services" "github.com/grafana/dskit/test" + "github.com/grafana/dskit/user" "github.com/oklog/ulid" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" @@ -24,7 +25,6 @@ import ( "github.com/prometheus/prometheus/tsdb/chunks" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "golang.org/x/exp/slices" "github.com/grafana/mimir/pkg/ingester/client" diff --git a/pkg/ingester/ingester_test.go b/pkg/ingester/ingester_test.go index ccd7e6859f1..86dddd76a6a 100644 --- a/pkg/ingester/ingester_test.go +++ b/pkg/ingester/ingester_test.go @@ -29,10 +29,13 @@ import ( "time" "github.com/go-kit/log" + "github.com/grafana/dskit/httpgrpc" dskit_metrics "github.com/grafana/dskit/metrics" + "github.com/grafana/dskit/middleware" "github.com/grafana/dskit/ring" "github.com/grafana/dskit/services" "github.com/grafana/dskit/test" + "github.com/grafana/dskit/user" "github.com/oklog/ulid" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" @@ -47,9 +50,6 @@ import ( "github.com/stretchr/testify/require" "github.com/thanos-io/objstore" "github.com/thanos-io/objstore/providers/filesystem" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/middleware" - "github.com/weaveworks/common/user" "golang.org/x/exp/slices" "golang.org/x/sync/errgroup" "google.golang.org/grpc" diff --git a/pkg/ingester/instance_limits_test.go b/pkg/ingester/instance_limits_test.go index 6c73c61c215..8892929e0a2 100644 --- a/pkg/ingester/instance_limits_test.go +++ b/pkg/ingester/instance_limits_test.go @@ -12,8 +12,8 @@ import ( "testing" "time" + "github.com/grafana/dskit/middleware" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/middleware" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "gopkg.in/yaml.v3" diff --git a/pkg/ingester/label_names_and_values_test.go b/pkg/ingester/label_names_and_values_test.go index 9ba64e0b571..4cd5738bb10 100644 --- a/pkg/ingester/label_names_and_values_test.go +++ b/pkg/ingester/label_names_and_values_test.go @@ -12,12 +12,12 @@ import ( "testing" "time" + "github.com/grafana/dskit/user" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb" "github.com/prometheus/prometheus/tsdb/index" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "golang.org/x/exp/slices" "github.com/grafana/mimir/pkg/ingester/client" diff --git a/pkg/mimir/mimir.go b/pkg/mimir/mimir.go index 842e01aa949..e6c4fc367d4 100644 --- a/pkg/mimir/mimir.go +++ b/pkg/mimir/mimir.go @@ -25,7 +25,9 @@ import ( "github.com/grafana/dskit/multierror" "github.com/grafana/dskit/ring" "github.com/grafana/dskit/runtimeconfig" + "github.com/grafana/dskit/server" "github.com/grafana/dskit/services" + "github.com/grafana/dskit/signals" "github.com/grafana/dskit/tenant" "github.com/opentracing/opentracing-go" "github.com/pkg/errors" @@ -33,8 +35,6 @@ import ( "github.com/prometheus/client_golang/prometheus/collectors" "github.com/prometheus/prometheus/promql" prom_storage "github.com/prometheus/prometheus/storage" - "github.com/weaveworks/common/server" - "github.com/weaveworks/common/signals" "go.opentelemetry.io/otel" "go.uber.org/atomic" "google.golang.org/grpc/health/grpc_health_v1" diff --git a/pkg/mimir/mimir_test.go b/pkg/mimir/mimir_test.go index 224ca8d35b4..8893823775f 100644 --- a/pkg/mimir/mimir_test.go +++ b/pkg/mimir/mimir_test.go @@ -27,13 +27,13 @@ import ( "github.com/grafana/dskit/flagext" "github.com/grafana/dskit/kv" dskit_metrics "github.com/grafana/dskit/metrics" + "github.com/grafana/dskit/server" "github.com/grafana/dskit/services" "github.com/grafana/dskit/test" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/server" "go.uber.org/atomic" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" diff --git a/pkg/mimir/modules.go b/pkg/mimir/modules.go index a5a123266d6..93c2f955e0d 100644 --- a/pkg/mimir/modules.go +++ b/pkg/mimir/modules.go @@ -16,10 +16,12 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/grafana/dskit/dns" + httpgrpc_server "github.com/grafana/dskit/httpgrpc/server" "github.com/grafana/dskit/kv/memberlist" "github.com/grafana/dskit/modules" "github.com/grafana/dskit/ring" "github.com/grafana/dskit/runtimeconfig" + "github.com/grafana/dskit/server" "github.com/grafana/dskit/services" "github.com/opentracing-contrib/go-stdlib/nethttp" "github.com/opentracing/opentracing-go" @@ -30,8 +32,6 @@ import ( "github.com/prometheus/prometheus/rules" prom_storage "github.com/prometheus/prometheus/storage" prom_remote "github.com/prometheus/prometheus/storage/remote" - httpgrpc_server "github.com/weaveworks/common/httpgrpc/server" - "github.com/weaveworks/common/server" "github.com/grafana/mimir/pkg/alertmanager" "github.com/grafana/mimir/pkg/alertmanager/alertstore" diff --git a/pkg/mimir/modules_test.go b/pkg/mimir/modules_test.go index 45294709ca6..51699409cd5 100644 --- a/pkg/mimir/modules_test.go +++ b/pkg/mimir/modules_test.go @@ -13,10 +13,10 @@ import ( "github.com/gorilla/mux" "github.com/grafana/dskit/flagext" + "github.com/grafana/dskit/server" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/server" ) func changeTargetConfig(c *Config) { diff --git a/pkg/mimir/server_service.go b/pkg/mimir/server_service.go index a3cd1dc972b..137dec782fd 100644 --- a/pkg/mimir/server_service.go +++ b/pkg/mimir/server_service.go @@ -10,8 +10,8 @@ import ( "fmt" "github.com/go-kit/log/level" + "github.com/grafana/dskit/server" "github.com/grafana/dskit/services" - "github.com/weaveworks/common/server" util_log "github.com/grafana/mimir/pkg/util/log" ) diff --git a/pkg/mimir/server_service_test.go b/pkg/mimir/server_service_test.go index 062d52b877d..a918fdd5efa 100644 --- a/pkg/mimir/server_service_test.go +++ b/pkg/mimir/server_service_test.go @@ -10,10 +10,10 @@ import ( "testing" "time" + "github.com/grafana/dskit/server" "github.com/grafana/dskit/services" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/server" ) func TestServerStopViaContext(t *testing.T) { diff --git a/pkg/mimirtool/client/client.go b/pkg/mimirtool/client/client.go index f9d5839a595..2504b2d73fa 100644 --- a/pkg/mimirtool/client/client.go +++ b/pkg/mimirtool/client/client.go @@ -15,9 +15,9 @@ import ( "time" "github.com/grafana/dskit/crypto/tls" + "github.com/grafana/dskit/user" "github.com/pkg/errors" log "github.com/sirupsen/logrus" - "github.com/weaveworks/common/user" "github.com/grafana/mimir/pkg/util/version" ) diff --git a/pkg/querier/blocks_store_queryable_test.go b/pkg/querier/blocks_store_queryable_test.go index 6da3a83af5f..c170b2e4440 100644 --- a/pkg/querier/blocks_store_queryable_test.go +++ b/pkg/querier/blocks_store_queryable_test.go @@ -18,6 +18,7 @@ import ( "github.com/go-kit/log" "github.com/gogo/protobuf/types" "github.com/grafana/dskit/services" + "github.com/grafana/dskit/user" "github.com/oklog/ulid" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" @@ -29,7 +30,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "golang.org/x/exp/slices" "google.golang.org/grpc" "google.golang.org/grpc/metadata" diff --git a/pkg/querier/cardinality_analysis_handler.go b/pkg/querier/cardinality_analysis_handler.go index 794ffee089f..67a7360d3be 100644 --- a/pkg/querier/cardinality_analysis_handler.go +++ b/pkg/querier/cardinality_analysis_handler.go @@ -7,9 +7,9 @@ import ( "net/http" "sort" + "github.com/grafana/dskit/httpgrpc" "github.com/grafana/dskit/tenant" "github.com/pkg/errors" - "github.com/weaveworks/common/httpgrpc" "github.com/grafana/mimir/pkg/cardinality" ingester_client "github.com/grafana/mimir/pkg/ingester/client" diff --git a/pkg/querier/cardinality_analysis_handler_test.go b/pkg/querier/cardinality_analysis_handler_test.go index 11c3d69d366..4656f1ddd55 100644 --- a/pkg/querier/cardinality_analysis_handler_test.go +++ b/pkg/querier/cardinality_analysis_handler_test.go @@ -14,12 +14,12 @@ import ( "testing" "github.com/grafana/dskit/flagext" + "github.com/grafana/dskit/httpgrpc" + "github.com/grafana/dskit/user" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/user" "github.com/grafana/mimir/pkg/cardinality" "github.com/grafana/mimir/pkg/ingester/client" diff --git a/pkg/querier/distributor_queryable_test.go b/pkg/querier/distributor_queryable_test.go index 30f18c01296..7255d3cf50d 100644 --- a/pkg/querier/distributor_queryable_test.go +++ b/pkg/querier/distributor_queryable_test.go @@ -14,6 +14,7 @@ import ( "time" "github.com/go-kit/log" + "github.com/grafana/dskit/user" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" @@ -23,7 +24,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "github.com/grafana/mimir/pkg/cardinality" "github.com/grafana/mimir/pkg/ingester/client" diff --git a/pkg/querier/engine/query_tracker.go b/pkg/querier/engine/query_tracker.go index d8dd672a139..85827b46a92 100644 --- a/pkg/querier/engine/query_tracker.go +++ b/pkg/querier/engine/query_tracker.go @@ -7,7 +7,7 @@ import ( "context" "github.com/grafana/dskit/tenant" //lint:ignore faillint queryTracker needs tenant package - "github.com/weaveworks/common/tracing" + "github.com/grafana/dskit/tracing" "github.com/grafana/mimir/pkg/util/activitytracker" //lint:ignore faillint queryTracker needs activitytracker ) diff --git a/pkg/querier/engine/query_tracker_test.go b/pkg/querier/engine/query_tracker_test.go index 542288e5ef7..ad24fa70b9c 100644 --- a/pkg/querier/engine/query_tracker_test.go +++ b/pkg/querier/engine/query_tracker_test.go @@ -6,11 +6,11 @@ import ( "context" "testing" + "github.com/grafana/dskit/user" "github.com/opentracing/opentracing-go" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/uber/jaeger-client-go" - "github.com/weaveworks/common/user" ) func TestQueryTrackerUnlimitedMaxConcurrency(t *testing.T) { diff --git a/pkg/querier/error_translate_queryable_test.go b/pkg/querier/error_translate_queryable_test.go index b3a551fff18..5d66847dcf4 100644 --- a/pkg/querier/error_translate_queryable_test.go +++ b/pkg/querier/error_translate_queryable_test.go @@ -14,6 +14,8 @@ import ( "time" "github.com/go-kit/log" + "github.com/grafana/dskit/httpgrpc" + "github.com/grafana/dskit/user" "github.com/grafana/regexp" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" @@ -24,8 +26,6 @@ import ( "github.com/prometheus/prometheus/storage" v1 "github.com/prometheus/prometheus/web/api/v1" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/user" "github.com/grafana/mimir/pkg/util/validation" ) diff --git a/pkg/querier/querier_test.go b/pkg/querier/querier_test.go index e34cf31bf83..a8764209b99 100644 --- a/pkg/querier/querier_test.go +++ b/pkg/querier/querier_test.go @@ -13,6 +13,7 @@ import ( "github.com/go-kit/log" "github.com/grafana/dskit/flagext" + "github.com/grafana/dskit/user" "github.com/pkg/errors" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" @@ -24,7 +25,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "github.com/grafana/mimir/pkg/cardinality" "github.com/grafana/mimir/pkg/ingester/client" diff --git a/pkg/querier/stats/stats.go b/pkg/querier/stats/stats.go index 00c37477440..cbee2cf16ec 100644 --- a/pkg/querier/stats/stats.go +++ b/pkg/querier/stats/stats.go @@ -10,7 +10,7 @@ import ( "sync/atomic" //lint:ignore faillint we can't use go.uber.org/atomic with a protobuf struct without wrapping it. "time" - "github.com/weaveworks/common/httpgrpc" + "github.com/grafana/dskit/httpgrpc" ) type contextKey int diff --git a/pkg/querier/store_gateway_client_test.go b/pkg/querier/store_gateway_client_test.go index 121b35feb82..d0038dcf01c 100644 --- a/pkg/querier/store_gateway_client_test.go +++ b/pkg/querier/store_gateway_client_test.go @@ -12,11 +12,11 @@ import ( "github.com/grafana/dskit/flagext" "github.com/grafana/dskit/grpcclient" + "github.com/grafana/dskit/user" "github.com/prometheus/client_golang/prometheus" dto "github.com/prometheus/client_model/go" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "google.golang.org/grpc" "github.com/grafana/mimir/pkg/storegateway/storegatewaypb" diff --git a/pkg/querier/tenantfederation/merge_exemplar_queryable.go b/pkg/querier/tenantfederation/merge_exemplar_queryable.go index 31373007190..067cc09e3a1 100644 --- a/pkg/querier/tenantfederation/merge_exemplar_queryable.go +++ b/pkg/querier/tenantfederation/merge_exemplar_queryable.go @@ -9,10 +9,10 @@ import ( "github.com/go-kit/log" "github.com/grafana/dskit/concurrency" "github.com/grafana/dskit/tenant" + "github.com/grafana/dskit/user" "github.com/prometheus/prometheus/model/exemplar" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" - "github.com/weaveworks/common/user" "github.com/grafana/mimir/pkg/util/spanlogger" ) diff --git a/pkg/querier/tenantfederation/merge_exemplar_queryable_test.go b/pkg/querier/tenantfederation/merge_exemplar_queryable_test.go index 48e2a4470db..0f6df098d72 100644 --- a/pkg/querier/tenantfederation/merge_exemplar_queryable_test.go +++ b/pkg/querier/tenantfederation/merge_exemplar_queryable_test.go @@ -10,12 +10,12 @@ import ( "time" "github.com/grafana/dskit/tenant" + "github.com/grafana/dskit/user" "github.com/prometheus/prometheus/model/exemplar" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "github.com/grafana/mimir/pkg/util/test" ) diff --git a/pkg/querier/tenantfederation/merge_metadata.go b/pkg/querier/tenantfederation/merge_metadata.go index b9251afca53..e079d98a020 100644 --- a/pkg/querier/tenantfederation/merge_metadata.go +++ b/pkg/querier/tenantfederation/merge_metadata.go @@ -10,8 +10,8 @@ import ( "github.com/go-kit/log/level" "github.com/grafana/dskit/concurrency" "github.com/grafana/dskit/tenant" + "github.com/grafana/dskit/user" "github.com/prometheus/prometheus/scrape" - "github.com/weaveworks/common/user" "github.com/grafana/mimir/pkg/querier" "github.com/grafana/mimir/pkg/util/spanlogger" diff --git a/pkg/querier/tenantfederation/merge_metadata_test.go b/pkg/querier/tenantfederation/merge_metadata_test.go index d25e7d0c8fb..9cadf11708c 100644 --- a/pkg/querier/tenantfederation/merge_metadata_test.go +++ b/pkg/querier/tenantfederation/merge_metadata_test.go @@ -8,11 +8,11 @@ import ( "testing" "github.com/grafana/dskit/tenant" + "github.com/grafana/dskit/user" "github.com/prometheus/prometheus/model/textparse" "github.com/prometheus/prometheus/scrape" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "github.com/grafana/mimir/pkg/util/test" ) diff --git a/pkg/querier/tenantfederation/merge_queryable.go b/pkg/querier/tenantfederation/merge_queryable.go index 50647419d21..1a792c97925 100644 --- a/pkg/querier/tenantfederation/merge_queryable.go +++ b/pkg/querier/tenantfederation/merge_queryable.go @@ -13,12 +13,12 @@ import ( "github.com/go-kit/log" "github.com/grafana/dskit/concurrency" "github.com/grafana/dskit/tenant" + "github.com/grafana/dskit/user" "github.com/pkg/errors" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/tsdb/chunkenc" tsdb_errors "github.com/prometheus/prometheus/tsdb/errors" - "github.com/weaveworks/common/user" "golang.org/x/exp/slices" "github.com/grafana/mimir/pkg/util/spanlogger" diff --git a/pkg/querier/tenantfederation/merge_queryable_test.go b/pkg/querier/tenantfederation/merge_queryable_test.go index c11c8d16b74..c707b19e3fe 100644 --- a/pkg/querier/tenantfederation/merge_queryable_test.go +++ b/pkg/querier/tenantfederation/merge_queryable_test.go @@ -16,6 +16,7 @@ import ( "github.com/go-kit/log" "github.com/grafana/dskit/tenant" + "github.com/grafana/dskit/user" "github.com/opentracing/opentracing-go" "github.com/opentracing/opentracing-go/mocktracer" "github.com/prometheus/common/model" @@ -23,7 +24,6 @@ import ( "github.com/prometheus/prometheus/storage" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "golang.org/x/exp/slices" "github.com/grafana/mimir/pkg/storage/series" diff --git a/pkg/querier/worker/frontend_processor.go b/pkg/querier/worker/frontend_processor.go index 7d9bbc33604..f5ba58c8ed3 100644 --- a/pkg/querier/worker/frontend_processor.go +++ b/pkg/querier/worker/frontend_processor.go @@ -14,7 +14,7 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/grafana/dskit/backoff" - "github.com/weaveworks/common/httpgrpc" + "github.com/grafana/dskit/httpgrpc" "go.uber.org/atomic" "google.golang.org/grpc" diff --git a/pkg/querier/worker/frontend_processor_test.go b/pkg/querier/worker/frontend_processor_test.go index d5b1bcb770c..811afabf528 100644 --- a/pkg/querier/worker/frontend_processor_test.go +++ b/pkg/querier/worker/frontend_processor_test.go @@ -11,11 +11,11 @@ import ( "time" "github.com/go-kit/log" + "github.com/grafana/dskit/httpgrpc" "github.com/grafana/dskit/test" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/httpgrpc" "go.uber.org/atomic" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" diff --git a/pkg/querier/worker/scheduler_processor.go b/pkg/querier/worker/scheduler_processor.go index c7269a642c0..66b4b75e922 100644 --- a/pkg/querier/worker/scheduler_processor.go +++ b/pkg/querier/worker/scheduler_processor.go @@ -17,15 +17,15 @@ import ( "github.com/gogo/status" "github.com/grafana/dskit/backoff" "github.com/grafana/dskit/grpcclient" + "github.com/grafana/dskit/httpgrpc" + "github.com/grafana/dskit/middleware" "github.com/grafana/dskit/ring/client" "github.com/grafana/dskit/services" + "github.com/grafana/dskit/user" otgrpc "github.com/opentracing-contrib/go-grpc" "github.com/opentracing/opentracing-go" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/middleware" - "github.com/weaveworks/common/user" "go.uber.org/atomic" "google.golang.org/grpc" "google.golang.org/grpc/health/grpc_health_v1" diff --git a/pkg/querier/worker/scheduler_processor_test.go b/pkg/querier/worker/scheduler_processor_test.go index 48eb3a64854..007616c9313 100644 --- a/pkg/querier/worker/scheduler_processor_test.go +++ b/pkg/querier/worker/scheduler_processor_test.go @@ -10,10 +10,10 @@ import ( "github.com/go-kit/log" "github.com/gogo/status" "github.com/grafana/dskit/concurrency" + "github.com/grafana/dskit/httpgrpc" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/httpgrpc" "go.uber.org/atomic" "google.golang.org/grpc" "google.golang.org/grpc/codes" diff --git a/pkg/querier/worker/worker.go b/pkg/querier/worker/worker.go index 72998ed8368..81d89248b62 100644 --- a/pkg/querier/worker/worker.go +++ b/pkg/querier/worker/worker.go @@ -16,10 +16,10 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/grafana/dskit/grpcclient" + "github.com/grafana/dskit/httpgrpc" "github.com/grafana/dskit/services" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" - "github.com/weaveworks/common/httpgrpc" "google.golang.org/grpc" "github.com/grafana/mimir/pkg/scheduler/schedulerdiscovery" diff --git a/pkg/ruler/api.go b/pkg/ruler/api.go index 60ebabcbbd9..0baa84ecbdb 100644 --- a/pkg/ruler/api.go +++ b/pkg/ruler/api.go @@ -20,11 +20,11 @@ import ( "github.com/go-kit/log/level" "github.com/gorilla/mux" "github.com/grafana/dskit/tenant" + "github.com/grafana/dskit/user" "github.com/pkg/errors" v1 "github.com/prometheus/client_golang/api/prometheus/v1" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/rulefmt" - "github.com/weaveworks/common/user" "gopkg.in/yaml.v3" "github.com/grafana/mimir/pkg/mimirpb" diff --git a/pkg/ruler/api_test.go b/pkg/ruler/api_test.go index 6fc5529ab17..8f5b1df3a5b 100644 --- a/pkg/ruler/api_test.go +++ b/pkg/ruler/api_test.go @@ -22,12 +22,12 @@ import ( "github.com/gorilla/mux" "github.com/grafana/dskit/services" "github.com/grafana/dskit/test" + "github.com/grafana/dskit/user" v1 "github.com/prometheus/client_golang/api/prometheus/v1" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/model/rulefmt" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "gopkg.in/yaml.v3" "github.com/grafana/mimir/pkg/ruler/rulespb" diff --git a/pkg/ruler/client_pool_test.go b/pkg/ruler/client_pool_test.go index c0d6cf097a4..14eba5ea520 100644 --- a/pkg/ruler/client_pool_test.go +++ b/pkg/ruler/client_pool_test.go @@ -12,11 +12,11 @@ import ( "github.com/grafana/dskit/flagext" "github.com/grafana/dskit/grpcclient" + "github.com/grafana/dskit/user" "github.com/prometheus/client_golang/prometheus" dto "github.com/prometheus/client_model/go" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" "google.golang.org/grpc" ) diff --git a/pkg/ruler/compat.go b/pkg/ruler/compat.go index 63afba9c925..059194633d6 100644 --- a/pkg/ruler/compat.go +++ b/pkg/ruler/compat.go @@ -13,6 +13,8 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/gogo/status" + "github.com/grafana/dskit/httpgrpc" + "github.com/grafana/dskit/user" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/prometheus/model/exemplar" @@ -23,8 +25,6 @@ import ( "github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/rules" "github.com/prometheus/prometheus/storage" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/user" "github.com/grafana/mimir/pkg/mimirpb" "github.com/grafana/mimir/pkg/querier" diff --git a/pkg/ruler/compat_test.go b/pkg/ruler/compat_test.go index bff3934d435..285977f682a 100644 --- a/pkg/ruler/compat_test.go +++ b/pkg/ruler/compat_test.go @@ -14,6 +14,7 @@ import ( "time" "github.com/go-kit/log" + "github.com/grafana/dskit/httpgrpc" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/client_golang/prometheus/testutil" @@ -28,7 +29,6 @@ import ( "github.com/prometheus/prometheus/rules" "github.com/prometheus/prometheus/storage" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/httpgrpc" "github.com/grafana/mimir/pkg/mimirpb" "github.com/grafana/mimir/pkg/ruler/rulespb" diff --git a/pkg/ruler/manager.go b/pkg/ruler/manager.go index 637c9c068be..6c049af4976 100644 --- a/pkg/ruler/manager.go +++ b/pkg/ruler/manager.go @@ -15,6 +15,7 @@ import ( "github.com/go-kit/log/level" "github.com/grafana/dskit/cache" "github.com/grafana/dskit/concurrency" + "github.com/grafana/dskit/user" ot "github.com/opentracing/opentracing-go" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" @@ -24,7 +25,6 @@ import ( "github.com/prometheus/prometheus/model/rulefmt" "github.com/prometheus/prometheus/notifier" promRules "github.com/prometheus/prometheus/rules" - "github.com/weaveworks/common/user" "go.uber.org/atomic" "golang.org/x/net/context/ctxhttp" diff --git a/pkg/ruler/remotequerier.go b/pkg/ruler/remotequerier.go index 6162d263d78..8d4e59fbb2d 100644 --- a/pkg/ruler/remotequerier.go +++ b/pkg/ruler/remotequerier.go @@ -19,14 +19,14 @@ import ( "github.com/golang/snappy" "github.com/grafana/dskit/backoff" "github.com/grafana/dskit/grpcclient" + "github.com/grafana/dskit/httpgrpc" + "github.com/grafana/dskit/middleware" + "github.com/grafana/dskit/user" otgrpc "github.com/opentracing-contrib/go-grpc" "github.com/opentracing/opentracing-go" "github.com/pkg/errors" "github.com/prometheus/prometheus/prompb" "github.com/prometheus/prometheus/promql" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/middleware" - "github.com/weaveworks/common/user" "golang.org/x/exp/slices" "google.golang.org/grpc" diff --git a/pkg/ruler/remotequerier_test.go b/pkg/ruler/remotequerier_test.go index b8b581a0e8c..dd422a44935 100644 --- a/pkg/ruler/remotequerier_test.go +++ b/pkg/ruler/remotequerier_test.go @@ -15,12 +15,12 @@ import ( "github.com/gogo/protobuf/proto" "github.com/gogo/status" "github.com/golang/snappy" + "github.com/grafana/dskit/httpgrpc" "github.com/prometheus/prometheus/model/histogram" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/prompb" "github.com/prometheus/prometheus/promql" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/httpgrpc" "google.golang.org/grpc" "google.golang.org/grpc/codes" diff --git a/pkg/ruler/ruler.go b/pkg/ruler/ruler.go index dd52a634507..7c852f7fb25 100644 --- a/pkg/ruler/ruler.go +++ b/pkg/ruler/ruler.go @@ -27,12 +27,12 @@ import ( "github.com/grafana/dskit/ring" "github.com/grafana/dskit/services" "github.com/grafana/dskit/tenant" + "github.com/grafana/dskit/user" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/prometheus/model/rulefmt" promRules "github.com/prometheus/prometheus/rules" - "github.com/weaveworks/common/user" "golang.org/x/sync/errgroup" "github.com/grafana/mimir/pkg/mimirpb" diff --git a/pkg/ruler/ruler_test.go b/pkg/ruler/ruler_test.go index 7a979aff4ad..39b0bea1928 100644 --- a/pkg/ruler/ruler_test.go +++ b/pkg/ruler/ruler_test.go @@ -28,6 +28,7 @@ import ( "github.com/grafana/dskit/services" "github.com/grafana/dskit/tenant" "github.com/grafana/dskit/test" + "github.com/grafana/dskit/user" "github.com/prometheus/client_golang/prometheus" prom_testutil "github.com/prometheus/client_golang/prometheus/testutil" "github.com/prometheus/prometheus/model/labels" @@ -41,7 +42,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/thanos-io/objstore" - "github.com/weaveworks/common/user" "go.uber.org/atomic" "golang.org/x/exp/slices" "google.golang.org/grpc" diff --git a/pkg/ruler/tenant_federation.go b/pkg/ruler/tenant_federation.go index fb5fe1a7f17..6b99cced496 100644 --- a/pkg/ruler/tenant_federation.go +++ b/pkg/ruler/tenant_federation.go @@ -10,9 +10,9 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/grafana/dskit/tenant" + "github.com/grafana/dskit/user" "github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/rules" - "github.com/weaveworks/common/user" "github.com/grafana/mimir/pkg/ruler/rulespb" ) diff --git a/pkg/scheduler/scheduler.go b/pkg/scheduler/scheduler.go index 15197db648e..36b7b858717 100644 --- a/pkg/scheduler/scheduler.go +++ b/pkg/scheduler/scheduler.go @@ -16,17 +16,17 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/grafana/dskit/grpcclient" + "github.com/grafana/dskit/httpgrpc" + "github.com/grafana/dskit/middleware" "github.com/grafana/dskit/ring" "github.com/grafana/dskit/services" "github.com/grafana/dskit/tenant" + "github.com/grafana/dskit/user" otgrpc "github.com/opentracing-contrib/go-grpc" "github.com/opentracing/opentracing-go" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/middleware" - "github.com/weaveworks/common/user" "google.golang.org/grpc" "github.com/grafana/mimir/pkg/frontend/v2/frontendv2pb" diff --git a/pkg/scheduler/scheduler_test.go b/pkg/scheduler/scheduler_test.go index 248918b3d74..53f0a0be61c 100644 --- a/pkg/scheduler/scheduler_test.go +++ b/pkg/scheduler/scheduler_test.go @@ -17,6 +17,7 @@ import ( "github.com/go-kit/log" "github.com/grafana/dskit/flagext" + "github.com/grafana/dskit/httpgrpc" "github.com/grafana/dskit/services" "github.com/grafana/dskit/test" "github.com/opentracing/opentracing-go" @@ -24,7 +25,6 @@ import ( promtest "github.com/prometheus/client_golang/prometheus/testutil" "github.com/stretchr/testify/require" "github.com/uber/jaeger-client-go/config" - "github.com/weaveworks/common/httpgrpc" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" diff --git a/pkg/scheduler/schedulerpb/scheduler.pb.go b/pkg/scheduler/schedulerpb/scheduler.pb.go index d3288f95b39..32f9b510655 100644 --- a/pkg/scheduler/schedulerpb/scheduler.pb.go +++ b/pkg/scheduler/schedulerpb/scheduler.pb.go @@ -8,7 +8,7 @@ import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - httpgrpc "github.com/weaveworks/common/httpgrpc" + httpgrpc "github.com/grafana/dskit/httpgrpc" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -438,48 +438,47 @@ func init() { func init() { proto.RegisterFile("scheduler.proto", fileDescriptor_2b3fc28395a6d9c5) } var fileDescriptor_2b3fc28395a6d9c5 = []byte{ - // 644 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x4f, 0x4f, 0xdb, 0x4e, - 0x10, 0xf5, 0x86, 0x24, 0xc0, 0x84, 0xdf, 0x0f, 0x77, 0x81, 0x36, 0x8d, 0xe8, 0x12, 0x45, 0x55, - 0x95, 0x72, 0x48, 0xaa, 0xb4, 0x52, 0x7b, 0x40, 0x95, 0x52, 0x30, 0x25, 0x2a, 0x75, 0x60, 0xb3, - 0x51, 0xff, 0x5c, 0x22, 0x92, 0x2c, 0x09, 0x02, 0xbc, 0x66, 0x6d, 0x17, 0xe5, 0xd6, 0x63, 0x8f, - 0xfd, 0x18, 0xfd, 0x28, 0xbd, 0x54, 0xe2, 0xc8, 0xa1, 0x87, 0x62, 0x2e, 0x3d, 0xf2, 0x11, 0xaa, - 0x38, 0x76, 0xea, 0xa4, 0x0e, 0x70, 0x9b, 0x1d, 0xbf, 0xe7, 0x9d, 0xf7, 0x66, 0x66, 0x61, 0xde, - 0x6a, 0x75, 0x79, 0xdb, 0x39, 0xe2, 0xb2, 0x60, 0x4a, 0x61, 0x0b, 0x9c, 0x1a, 0x26, 0xcc, 0x66, - 0x66, 0xb1, 0x23, 0x3a, 0xc2, 0xcb, 0x17, 0xfb, 0xd1, 0x00, 0x92, 0x79, 0xd6, 0x39, 0xb0, 0xbb, - 0x4e, 0xb3, 0xd0, 0x12, 0xc7, 0xc5, 0x53, 0xbe, 0xf7, 0x89, 0x9f, 0x0a, 0x79, 0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21, 0xbf, 0x37, 0x85, 0x0c, 0x56, 0xa9, - 0x0e, 0x29, 0x3f, 0xdc, 0x16, 0xc2, 0xc4, 0x2b, 0x23, 0x76, 0xff, 0xbb, 0xaf, 0x99, 0x95, 0x49, - 0xfd, 0xf0, 0xb1, 0x39, 0x25, 0x8f, 0x9e, 0x20, 0x6c, 0xc0, 0x52, 0xa4, 0x65, 0xf8, 0xf1, 0x08, - 0xff, 0xba, 0xa6, 0x64, 0x56, 0x6f, 0x03, 0x1d, 0x74, 0xa0, 0x64, 0xc2, 0x62, 0x58, 0xdd, 0x70, - 0x9c, 0xde, 0xc3, 0x5c, 0x10, 0x7b, 0xfa, 0xb2, 0x37, 0xad, 0x56, 0x26, 0x7b, 0xd3, 0xc0, 0x0d, - 0x14, 0xbe, 0x2a, 0x9f, 0x5d, 0x10, 0xe5, 0xfc, 0x82, 0x28, 0x57, 0x17, 0x04, 0x7d, 0x76, 0x09, - 0xfa, 0xe6, 0x12, 0xf4, 0xdd, 0x25, 0xe8, 0xcc, 0x25, 0xe8, 0x97, 0x4b, 0xd0, 0x6f, 0x97, 0x28, - 0x57, 0x2e, 0x41, 0x5f, 0x2f, 0x89, 0x72, 0x76, 0x49, 0x94, 0xf3, 0x4b, 0xa2, 0x7c, 0x0c, 0xbf, - 0xae, 0xcd, 0xa4, 0xf7, 0x30, 0x3e, 0xfd, 0x13, 0x00, 0x00, 0xff, 0xff, 0x88, 0x0c, 0xfe, 0x56, - 0x84, 0x05, 0x00, 0x00, + // 640 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xcf, 0x4f, 0x1a, 0x41, + 0x14, 0xc7, 0x77, 0x10, 0x50, 0x1f, 0xb6, 0x6e, 0x47, 0x6d, 0x29, 0xb1, 0x23, 0x21, 0x4d, 0x43, + 0x3d, 0x80, 0xa1, 0x87, 0xf6, 0x60, 0x9a, 0x50, 0x5d, 0x2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 0x8f, 0xa0, 0x1f, + 0x1e, 0x41, 0xa7, 0x1e, 0x41, 0xbf, 0x3d, 0x82, 0xfe, 0x78, 0x44, 0xb9, 0xf4, 0x08, 0xfa, 0x76, + 0x41, 0x94, 0xd3, 0x0b, 0xa2, 0x9c, 0x5d, 0x10, 0xe5, 0x63, 0xf8, 0x65, 0x6d, 0x25, 0xfd, 0x87, + 0xf1, 0xd9, 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x67, 0xdc, 0x4e, 0xdc, 0x80, 0x05, 0x00, 0x00, } func (x FrontendToSchedulerType) String() string { diff --git a/pkg/scheduler/schedulerpb/scheduler.proto b/pkg/scheduler/schedulerpb/scheduler.proto index b1ce70d1340..f3bb8a4b24c 100644 --- a/pkg/scheduler/schedulerpb/scheduler.proto +++ b/pkg/scheduler/schedulerpb/scheduler.proto @@ -10,7 +10,7 @@ package schedulerpb; option go_package = "schedulerpb"; import "gogoproto/gogo.proto"; -import "github.com/weaveworks/common/httpgrpc/httpgrpc.proto"; +import "github.com/grafana/dskit/httpgrpc/httpgrpc.proto"; option (gogoproto.marshaler_all) = true; option (gogoproto.unmarshaler_all) = true; diff --git a/pkg/storegateway/gateway.go b/pkg/storegateway/gateway.go index 107870dc5fd..57947b4a4cb 100644 --- a/pkg/storegateway/gateway.go +++ b/pkg/storegateway/gateway.go @@ -16,11 +16,11 @@ import ( "github.com/grafana/dskit/kv" "github.com/grafana/dskit/ring" "github.com/grafana/dskit/services" + "github.com/grafana/dskit/tracing" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/thanos-io/objstore" - "github.com/weaveworks/common/tracing" "github.com/grafana/mimir/pkg/storage/bucket" mimir_tsdb "github.com/grafana/mimir/pkg/storage/tsdb" diff --git a/pkg/storegateway/limiter.go b/pkg/storegateway/limiter.go index ad01ac19759..116ac9bfd60 100644 --- a/pkg/storegateway/limiter.go +++ b/pkg/storegateway/limiter.go @@ -9,8 +9,8 @@ import ( "net/http" "sync" + "github.com/grafana/dskit/httpgrpc" "github.com/prometheus/client_golang/prometheus" - "github.com/weaveworks/common/httpgrpc" "go.uber.org/atomic" ) diff --git a/pkg/util/httpgrpcutil/carrier.go b/pkg/util/httpgrpcutil/carrier.go index 88f25bf2bc9..2aa5baf2fee 100644 --- a/pkg/util/httpgrpcutil/carrier.go +++ b/pkg/util/httpgrpcutil/carrier.go @@ -8,8 +8,8 @@ package httpgrpcutil import ( "errors" + "github.com/grafana/dskit/httpgrpc" "github.com/opentracing/opentracing-go" - "github.com/weaveworks/common/httpgrpc" ) // Used to transfer trace information from/to HTTP request. diff --git a/pkg/util/httpgrpcutil/errors.go b/pkg/util/httpgrpcutil/errors.go index 77bc63acb62..8be2f95383f 100644 --- a/pkg/util/httpgrpcutil/errors.go +++ b/pkg/util/httpgrpcutil/errors.go @@ -5,7 +5,7 @@ package httpgrpcutil import ( "net/http" - "github.com/weaveworks/common/httpgrpc" + "github.com/grafana/dskit/httpgrpc" ) // PrioritizeRecoverableErr checks whether in the given slice of errors there is a recoverable error, if yes then it will diff --git a/pkg/util/httpgrpcutil/errors_test.go b/pkg/util/httpgrpcutil/errors_test.go index fffe8fa2dca..f730e14b970 100644 --- a/pkg/util/httpgrpcutil/errors_test.go +++ b/pkg/util/httpgrpcutil/errors_test.go @@ -7,8 +7,8 @@ import ( "net/http" "testing" + "github.com/grafana/dskit/httpgrpc" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/httpgrpc" ) func TestPrioritizeRecoverableErr(t *testing.T) { diff --git a/pkg/util/instrumentation/tracer_transport_test.go b/pkg/util/instrumentation/tracer_transport_test.go index 409546b07a7..917ca5371eb 100644 --- a/pkg/util/instrumentation/tracer_transport_test.go +++ b/pkg/util/instrumentation/tracer_transport_test.go @@ -9,13 +9,13 @@ import ( "net/http/httptest" "testing" + "github.com/grafana/dskit/middleware" + "github.com/grafana/dskit/user" "github.com/opentracing/opentracing-go" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "github.com/uber/jaeger-client-go" "github.com/uber/jaeger-client-go/config" - "github.com/weaveworks/common/middleware" - "github.com/weaveworks/common/user" ) func TestTracerTransportPropagatesTrace(t *testing.T) { diff --git a/pkg/util/log/log.go b/pkg/util/log/log.go index d2910850d7a..fd31224da12 100644 --- a/pkg/util/log/log.go +++ b/pkg/util/log/log.go @@ -15,8 +15,7 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" dslog "github.com/grafana/dskit/log" - "github.com/weaveworks/common/logging" - "github.com/weaveworks/common/server" + "github.com/grafana/dskit/server" ) var ( @@ -38,10 +37,10 @@ func InitLogger(cfg *server.Config, buffered bool) { Logger = level.NewFilter(logger, cfg.LogLevel.Gokit) // cfg.Log wraps log function, skip 6 stack frames to get caller information. - cfg.Log = logging.GoKit(level.NewFilter(log.With(l, "caller", log.Caller(6)), cfg.LogLevel.Gokit)) + cfg.Log = dslog.GoKit(level.NewFilter(log.With(l, "caller", log.Caller(6)), cfg.LogLevel.Gokit)) } -func newBasicLogger(format logging.Format, buffered bool) log.Logger { +func newBasicLogger(format dslog.Format, buffered bool) log.Logger { var logger log.Logger var writer io.Writer = os.Stderr @@ -75,7 +74,7 @@ func newBasicLogger(format logging.Format, buffered bool) log.Logger { } // NewDefaultLogger creates a new gokit logger with the configured level and format -func NewDefaultLogger(l logging.Level, format logging.Format) log.Logger { +func NewDefaultLogger(l dslog.Level, format dslog.Format) log.Logger { logger := newBasicLogger(format, false) return level.NewFilter(log.With(logger, "ts", log.DefaultTimestampUTC), l.Gokit) } diff --git a/pkg/util/log/log_test.go b/pkg/util/log/log_test.go index a0ad75f9e2f..33a77d14b1d 100644 --- a/pkg/util/log/log_test.go +++ b/pkg/util/log/log_test.go @@ -9,7 +9,7 @@ import ( gokitlog "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/weaveworks/common/server" + "github.com/grafana/dskit/server" "github.com/grafana/mimir/pkg/util/log" ) diff --git a/pkg/util/log/wrappers.go b/pkg/util/log/wrappers.go index 13ac7bfb9c0..d51930df53a 100644 --- a/pkg/util/log/wrappers.go +++ b/pkg/util/log/wrappers.go @@ -10,7 +10,7 @@ import ( "github.com/go-kit/log" "github.com/grafana/dskit/tenant" - "github.com/weaveworks/common/tracing" + "github.com/grafana/dskit/tracing" ) // WithUserID returns a Logger that has information about the current user in diff --git a/pkg/util/noauth/no_auth.go b/pkg/util/noauth/no_auth.go index 16e6b7bde7f..0390f309701 100644 --- a/pkg/util/noauth/no_auth.go +++ b/pkg/util/noauth/no_auth.go @@ -11,9 +11,9 @@ import ( "context" "net/http" - "github.com/weaveworks/common/middleware" - "github.com/weaveworks/common/server" - "github.com/weaveworks/common/user" + "github.com/grafana/dskit/middleware" + "github.com/grafana/dskit/server" + "github.com/grafana/dskit/user" "google.golang.org/grpc" ) diff --git a/pkg/util/push/otel.go b/pkg/util/push/otel.go index 91f6109059b..5755fd433f0 100644 --- a/pkg/util/push/otel.go +++ b/pkg/util/push/otel.go @@ -12,13 +12,13 @@ import ( kitlog "github.com/go-kit/log" "github.com/go-kit/log/level" + "github.com/grafana/dskit/httpgrpc" + "github.com/grafana/dskit/middleware" "github.com/grafana/dskit/tenant" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheusremotewrite" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/prompb" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/middleware" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp" diff --git a/pkg/util/push/push.go b/pkg/util/push/push.go index d8ea90062ca..480410e7523 100644 --- a/pkg/util/push/push.go +++ b/pkg/util/push/push.go @@ -13,8 +13,8 @@ import ( "sync" "github.com/go-kit/log/level" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/middleware" + "github.com/grafana/dskit/httpgrpc" + "github.com/grafana/dskit/middleware" "github.com/grafana/mimir/pkg/mimirpb" "github.com/grafana/mimir/pkg/util" diff --git a/pkg/util/push/push_test.go b/pkg/util/push/push_test.go index c997af401aa..54bc9080642 100644 --- a/pkg/util/push/push_test.go +++ b/pkg/util/push/push_test.go @@ -17,14 +17,14 @@ import ( "time" "github.com/golang/snappy" + "github.com/grafana/dskit/httpgrpc" + "github.com/grafana/dskit/middleware" "github.com/grafana/dskit/tenant" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/prompb" "github.com/prometheus/prometheus/storage/remote" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/middleware" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/pmetric" "go.opentelemetry.io/collector/pdata/pmetric/pmetricotlp" diff --git a/pkg/util/time.go b/pkg/util/time.go index a0f27b14f2d..e01cab2f5f9 100644 --- a/pkg/util/time.go +++ b/pkg/util/time.go @@ -12,8 +12,8 @@ import ( "strconv" "time" + "github.com/grafana/dskit/httpgrpc" "github.com/prometheus/common/model" - "github.com/weaveworks/common/httpgrpc" ) func TimeToMillis(t time.Time) int64 { diff --git a/pkg/util/validation/user_limits_handler_test.go b/pkg/util/validation/user_limits_handler_test.go index 57f22a27e46..46c8d2803c8 100644 --- a/pkg/util/validation/user_limits_handler_test.go +++ b/pkg/util/validation/user_limits_handler_test.go @@ -9,9 +9,9 @@ import ( "net/http/httptest" "testing" + "github.com/grafana/dskit/user" "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/user" ) func TestUserLimitsHandler(t *testing.T) { diff --git a/tools/doc-generator/parse/parser.go b/tools/doc-generator/parse/parser.go index aa59437c87a..daea2889a44 100644 --- a/tools/doc-generator/parse/parser.go +++ b/tools/doc-generator/parse/parser.go @@ -16,11 +16,11 @@ import ( "github.com/go-kit/log" "github.com/grafana/dskit/flagext" + dslog "github.com/grafana/dskit/log" "github.com/grafana/regexp" "github.com/pkg/errors" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/relabel" - "github.com/weaveworks/common/logging" "github.com/grafana/mimir/pkg/ingester/activeseries" "github.com/grafana/mimir/pkg/storage/tsdb" @@ -491,7 +491,7 @@ func getFieldExample(fieldKey string, fieldType reflect.Type) *FieldExample { } func getCustomFieldEntry(cfg interface{}, field reflect.StructField, fieldValue reflect.Value, flags map[uintptr]*flag.Flag) (*ConfigEntry, error) { - if field.Type == reflect.TypeOf(logging.Level{}) || field.Type == reflect.TypeOf(logging.Format{}) { + if field.Type == reflect.TypeOf(dslog.Level{}) || field.Type == reflect.TypeOf(dslog.Format{}) { fieldFlag, err := getFieldFlag(field, fieldValue, flags) if err != nil || fieldFlag == nil { return nil, err diff --git a/tools/doc-generator/parse/root_blocks.go b/tools/doc-generator/parse/root_blocks.go index 6ae51280f10..04be4dcf06b 100644 --- a/tools/doc-generator/parse/root_blocks.go +++ b/tools/doc-generator/parse/root_blocks.go @@ -10,7 +10,7 @@ import ( "github.com/grafana/dskit/kv/consul" "github.com/grafana/dskit/kv/etcd" "github.com/grafana/dskit/kv/memberlist" - "github.com/weaveworks/common/server" + "github.com/grafana/dskit/server" "github.com/grafana/mimir/pkg/alertmanager" "github.com/grafana/mimir/pkg/alertmanager/alertstore" diff --git a/tools/querytee/proxy.go b/tools/querytee/proxy.go index 7217fa86ab4..9543d3d1451 100644 --- a/tools/querytee/proxy.go +++ b/tools/querytee/proxy.go @@ -18,9 +18,9 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" + "github.com/grafana/dskit/server" "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" - "github.com/weaveworks/common/server" ) var errMinBackends = errors.New("at least 1 backend is required") diff --git a/tools/querytee/proxy_test.go b/tools/querytee/proxy_test.go index 814eb4e5241..62a10416cec 100644 --- a/tools/querytee/proxy_test.go +++ b/tools/querytee/proxy_test.go @@ -18,11 +18,11 @@ import ( "github.com/go-kit/log" "github.com/gorilla/mux" + "github.com/grafana/dskit/httpgrpc" + "github.com/grafana/dskit/server" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/server" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" ) diff --git a/vendor/github.com/grafana/dskit/errors/error.go b/vendor/github.com/grafana/dskit/errors/error.go new file mode 100644 index 00000000000..1d36f7c39e7 --- /dev/null +++ b/vendor/github.com/grafana/dskit/errors/error.go @@ -0,0 +1,10 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/errors/error.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + +package errors + +// Error see https://dave.cheney.net/2016/04/07/constant-errors. +type Error string + +func (e Error) Error() string { return string(e) } diff --git a/vendor/github.com/grafana/dskit/grpcclient/instrumentation.go b/vendor/github.com/grafana/dskit/grpcclient/instrumentation.go index c8d3528895a..4a10ce48d27 100644 --- a/vendor/github.com/grafana/dskit/grpcclient/instrumentation.go +++ b/vendor/github.com/grafana/dskit/grpcclient/instrumentation.go @@ -4,8 +4,9 @@ import ( otgrpc "github.com/opentracing-contrib/go-grpc" "github.com/opentracing/opentracing-go" "github.com/prometheus/client_golang/prometheus" - "github.com/weaveworks/common/middleware" "google.golang.org/grpc" + + "github.com/grafana/dskit/middleware" ) func Instrument(requestDuration *prometheus.HistogramVec) ([]grpc.UnaryClientInterceptor, []grpc.StreamClientInterceptor) { diff --git a/vendor/github.com/weaveworks/common/grpc/cancel.go b/vendor/github.com/grafana/dskit/grpcutil/cancel.go similarity index 64% rename from vendor/github.com/weaveworks/common/grpc/cancel.go rename to vendor/github.com/grafana/dskit/grpcutil/cancel.go index c6ec96df9c1..b1d369d2a3e 100644 --- a/vendor/github.com/weaveworks/common/grpc/cancel.go +++ b/vendor/github.com/grafana/dskit/grpcutil/cancel.go @@ -1,4 +1,8 @@ -package grpc +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/grpc/cancel.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + +package grpcutil import ( "context" diff --git a/vendor/github.com/weaveworks/common/httpgrpc/README.md b/vendor/github.com/grafana/dskit/httpgrpc/README.md similarity index 100% rename from vendor/github.com/weaveworks/common/httpgrpc/README.md rename to vendor/github.com/grafana/dskit/httpgrpc/README.md diff --git a/vendor/github.com/weaveworks/common/httpgrpc/httpgrpc.go b/vendor/github.com/grafana/dskit/httpgrpc/httpgrpc.go similarity index 87% rename from vendor/github.com/weaveworks/common/httpgrpc/httpgrpc.go rename to vendor/github.com/grafana/dskit/httpgrpc/httpgrpc.go index db39d0c980a..050492dfcb1 100644 --- a/vendor/github.com/weaveworks/common/httpgrpc/httpgrpc.go +++ b/vendor/github.com/grafana/dskit/httpgrpc/httpgrpc.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/httpgrpc/httpgrpc.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package httpgrpc import ( diff --git a/vendor/github.com/weaveworks/common/httpgrpc/httpgrpc.pb.go b/vendor/github.com/grafana/dskit/httpgrpc/httpgrpc.pb.go similarity index 89% rename from vendor/github.com/weaveworks/common/httpgrpc/httpgrpc.pb.go rename to vendor/github.com/grafana/dskit/httpgrpc/httpgrpc.pb.go index 4b3f6ad9f72..bab0efd5362 100644 --- a/vendor/github.com/weaveworks/common/httpgrpc/httpgrpc.pb.go +++ b/vendor/github.com/grafana/dskit/httpgrpc/httpgrpc.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: httpgrpc/httpgrpc.proto +// source: httpgrpc.proto package httpgrpc @@ -40,7 +40,7 @@ type HTTPRequest struct { func (m *HTTPRequest) Reset() { *m = HTTPRequest{} } func (*HTTPRequest) ProtoMessage() {} func (*HTTPRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6670c8e151665986, []int{0} + return fileDescriptor_c50820dbc814fcdd, []int{0} } func (m *HTTPRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -106,7 +106,7 @@ type HTTPResponse struct { func (m *HTTPResponse) Reset() { *m = HTTPResponse{} } func (*HTTPResponse) ProtoMessage() {} func (*HTTPResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6670c8e151665986, []int{1} + return fileDescriptor_c50820dbc814fcdd, []int{1} } func (m *HTTPResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -164,7 +164,7 @@ type Header struct { func (m *Header) Reset() { *m = Header{} } func (*Header) ProtoMessage() {} func (*Header) Descriptor() ([]byte, []int) { - return fileDescriptor_6670c8e151665986, []int{2} + return fileDescriptor_c50820dbc814fcdd, []int{2} } func (m *Header) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -213,31 +213,29 @@ func init() { proto.RegisterType((*Header)(nil), "httpgrpc.Header") } -func init() { proto.RegisterFile("httpgrpc/httpgrpc.proto", fileDescriptor_6670c8e151665986) } +func init() { proto.RegisterFile("httpgrpc.proto", fileDescriptor_c50820dbc814fcdd) } -var fileDescriptor_6670c8e151665986 = []byte{ - // 322 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x3f, 0x4f, 0xc2, 0x40, - 0x14, 0xc0, 0x7b, 0x14, 0xab, 0x1c, 0x0c, 0xe4, 0xa2, 0xd8, 0x30, 0x5c, 0x08, 0x89, 0x09, 0x71, - 0xa0, 0x09, 0x4e, 0x8e, 0xea, 0xc2, 0xa6, 0xb9, 0x30, 0xb9, 0xb5, 0xf4, 0xa5, 0x35, 0x50, 0x5e, - 0x6d, 0xaf, 0x10, 0x36, 0x3f, 0x82, 0x1f, 0xc3, 0x8f, 0xe2, 0xc8, 0xc8, 0x28, 0xe5, 0x0b, 0xf8, - 0x11, 0xcc, 0x5d, 0x29, 0x36, 0x4e, 0x6e, 0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 0x3b, 0x4e, 0xde, 0x72, - 0x4e, 0x3e, 0x72, 0x4e, 0x3e, 0x73, 0x4e, 0x36, 0x39, 0x27, 0x5f, 0x39, 0x27, 0xef, 0x7b, 0x6e, - 0x6c, 0xf6, 0xdc, 0xd8, 0xee, 0xb9, 0xf1, 0x7c, 0x15, 0xbc, 0xc8, 0x30, 0xf3, 0x86, 0x53, 0x8c, - 0x9c, 0x15, 0xb8, 0x4b, 0x58, 0x61, 0x32, 0x4b, 0x9d, 0x29, 0x46, 0x11, 0x2e, 0x8e, 0xa7, 0xf4, - 0x2c, 0x7d, 0xab, 0x9b, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd8, 0xb5, 0xfe, 0x5d, 0xe6, 0x01, - 0x00, 0x00, +var fileDescriptor_c50820dbc814fcdd = []byte{ + // 301 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0xbd, 0x4e, 0xc3, 0x30, + 0x14, 0x85, 0xed, 0xa6, 0x04, 0xea, 0x56, 0xa8, 0xb2, 0xa0, 0x8a, 0x3a, 0x5c, 0x55, 0x99, 0x22, + 0x86, 0x22, 0x05, 0x16, 0x46, 0x60, 0xc9, 0x88, 0xac, 0xbe, 0x40, 0x42, 0xac, 0x44, 0x22, 0xd4, + 0x21, 0x3f, 0xa0, 0x6e, 0x3c, 0x02, 0x8f, 0xc1, 0xa3, 0x30, 0x66, 0xec, 0x48, 0x9c, 0x85, 0xb1, + 0x8f, 0x80, 0xec, 0xa4, 0x10, 0x31, 0xb1, 0x9d, 0x7b, 0xee, 0x51, 0xbe, 0x7b, 0x62, 0x72, 0x1c, + 0x17, 0x45, 0x1a, 0x65, 0xe9, 0xfd, 0x32, 0xcd, 0x44, 0x21, 0xe8, 0xd1, 0x7e, 0x9e, 0x9f, 0x44, + 0x22, 0x12, 0xda, 0x3c, 0x57, 0xaa, 0xdd, 0xdb, 0x2f, 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x1d, 0x00, 0x00, 0xff, 0xff, 0x44, 0x0e, 0x7c, 0xff, 0xc2, 0x01, 0x00, 0x00, } func (this *HTTPRequest) Equal(that interface{}) bool { @@ -471,7 +469,7 @@ var _HTTP_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "httpgrpc/httpgrpc.proto", + Metadata: "httpgrpc.proto", } func (m *HTTPRequest) Marshal() (dAtA []byte, err error) { @@ -1204,7 +1202,6 @@ func (m *Header) Unmarshal(dAtA []byte) error { func skipHttpgrpc(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 - depth := 0 for iNdEx < l { var wire uint64 for shift := uint(0); ; shift += 7 { @@ -1236,8 +1233,10 @@ func skipHttpgrpc(dAtA []byte) (n int, err error) { break } } + return iNdEx, nil case 1: iNdEx += 8 + return iNdEx, nil case 2: var length int for shift := uint(0); ; shift += 7 { @@ -1258,30 +1257,55 @@ func skipHttpgrpc(dAtA []byte) (n int, err error) { return 0, ErrInvalidLengthHttpgrpc } iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthHttpgrpc + } + return iNdEx, nil case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupHttpgrpc + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowHttpgrpc + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipHttpgrpc(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthHttpgrpc + } } - depth-- + return iNdEx, nil + case 4: + return iNdEx, nil case 5: iNdEx += 4 + return iNdEx, nil default: return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } - if iNdEx < 0 { - return 0, ErrInvalidLengthHttpgrpc - } - if depth == 0 { - return iNdEx, nil - } } - return 0, io.ErrUnexpectedEOF + panic("unreachable") } var ( - ErrInvalidLengthHttpgrpc = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowHttpgrpc = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupHttpgrpc = fmt.Errorf("proto: unexpected end of group") + ErrInvalidLengthHttpgrpc = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowHttpgrpc = fmt.Errorf("proto: integer overflow") ) diff --git a/vendor/github.com/weaveworks/common/httpgrpc/httpgrpc.proto b/vendor/github.com/grafana/dskit/httpgrpc/httpgrpc.proto similarity index 92% rename from vendor/github.com/weaveworks/common/httpgrpc/httpgrpc.proto rename to vendor/github.com/grafana/dskit/httpgrpc/httpgrpc.proto index 0313dbb625c..8f546330a52 100644 --- a/vendor/github.com/weaveworks/common/httpgrpc/httpgrpc.proto +++ b/vendor/github.com/grafana/dskit/httpgrpc/httpgrpc.proto @@ -11,7 +11,6 @@ option (gogoproto.goproto_stringer_all) = false; option (gogoproto.goproto_unkeyed_all) = false; option (gogoproto.goproto_unrecognized_all) = false; option (gogoproto.goproto_sizecache_all) = false; -option go_package = "github.com/weaveworks/common/httpgrpc"; service HTTP { rpc Handle(HTTPRequest) returns (HTTPResponse) {}; diff --git a/vendor/github.com/weaveworks/common/httpgrpc/server/server.go b/vendor/github.com/grafana/dskit/httpgrpc/server/server.go similarity index 91% rename from vendor/github.com/weaveworks/common/httpgrpc/server/server.go rename to vendor/github.com/grafana/dskit/httpgrpc/server/server.go index 25377cc5e7f..7b715bd5625 100644 --- a/vendor/github.com/weaveworks/common/httpgrpc/server/server.go +++ b/vendor/github.com/grafana/dskit/httpgrpc/server/server.go @@ -1,7 +1,12 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/httpgrpc/server/server.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package server import ( "bytes" + "context" "fmt" "io/ioutil" "net" @@ -13,13 +18,12 @@ import ( otgrpc "github.com/opentracing-contrib/go-grpc" "github.com/opentracing/opentracing-go" "github.com/sercand/kuberesolver/v4" - "golang.org/x/net/context" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/logging" - "github.com/weaveworks/common/middleware" + "github.com/grafana/dskit/httpgrpc" + "github.com/grafana/dskit/log" + "github.com/grafana/dskit/middleware" ) // Server implements HTTPServer. HTTPServer is a generated interface that gRPC @@ -102,9 +106,9 @@ func ParseURL(unparsed string) (string, error) { return "", err } parts := strings.SplitN(host, ".", 3) - service, namespace, domain := parts[0], "default", "" + service, domain := parts[0], "" if len(parts) > 1 { - namespace = parts[1] + namespace := parts[1] domain = "." + namespace } if len(parts) > 2 { @@ -174,7 +178,7 @@ func WriteResponse(w http.ResponseWriter, resp *httpgrpc.HTTPResponse) error { func WriteError(w http.ResponseWriter, err error) { resp, ok := httpgrpc.HTTPResponseFromError(err) if ok { - WriteResponse(w, resp) + _ = WriteResponse(w, resp) } else { http.Error(w, err.Error(), http.StatusInternalServerError) } @@ -185,7 +189,7 @@ func (c *Client) ServeHTTP(w http.ResponseWriter, r *http.Request) { if tracer := opentracing.GlobalTracer(); tracer != nil { if span := opentracing.SpanFromContext(r.Context()); span != nil { if err := tracer.Inject(span.Context(), opentracing.HTTPHeaders, opentracing.HTTPHeadersCarrier(r.Header)); err != nil { - logging.Global().Warnf("Failed to inject tracing headers into request: %v", err) + log.Global().Warnf("Failed to inject tracing headers into request: %v", err) } } } diff --git a/vendor/github.com/grafana/dskit/httpgrpc/tools.go b/vendor/github.com/grafana/dskit/httpgrpc/tools.go new file mode 100644 index 00000000000..9117d39b129 --- /dev/null +++ b/vendor/github.com/grafana/dskit/httpgrpc/tools.go @@ -0,0 +1,10 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/httpgrpc/tools.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + +package httpgrpc + +import ( + // This is a workaround for go mod which fails to download gogoproto otherwise + _ "github.com/gogo/protobuf/gogoproto" +) diff --git a/vendor/github.com/weaveworks/common/instrument/instrument.go b/vendor/github.com/grafana/dskit/instrument/instrument.go similarity index 79% rename from vendor/github.com/weaveworks/common/instrument/instrument.go rename to vendor/github.com/grafana/dskit/instrument/instrument.go index 07aa033c0c9..4ea480b29d6 100644 --- a/vendor/github.com/weaveworks/common/instrument/instrument.go +++ b/vendor/github.com/grafana/dskit/instrument/instrument.go @@ -1,3 +1,9 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/instrument/instrument.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + +//lint:file-ignore faillint Changing from prometheus to promauto package would be a breaking change for consumers + package instrument import ( @@ -8,11 +14,10 @@ import ( "github.com/opentracing/opentracing-go/ext" otlog "github.com/opentracing/opentracing-go/log" "github.com/prometheus/client_golang/prometheus" - oldcontext "golang.org/x/net/context" - "github.com/weaveworks/common/grpc" - "github.com/weaveworks/common/tracing" - "github.com/weaveworks/common/user" + "github.com/grafana/dskit/grpcutil" + "github.com/grafana/dskit/tracing" + "github.com/grafana/dskit/user" ) // DefBuckets are histogram buckets for the response time (in seconds) @@ -53,7 +58,7 @@ func (c *HistogramCollector) Register() { } // Before collects for the upcoming request. -func (c *HistogramCollector) Before(ctx context.Context, method string, start time.Time) { +func (c *HistogramCollector) Before(context.Context, string, time.Time) { } // After collects when the request is done. @@ -131,13 +136,13 @@ func (c *JobCollector) Register() { } // Before collects for the upcoming request. -func (c *JobCollector) Before(ctx context.Context, method string, start time.Time) { +func (c *JobCollector) Before(_ context.Context, method string, start time.Time) { c.start.WithLabelValues(method).Set(float64(start.UTC().Unix())) c.started.WithLabelValues(method).Inc() } // After collects when the request is done. -func (c *JobCollector) After(ctx context.Context, method, statusCode string, start time.Time) { +func (c *JobCollector) After(_ context.Context, method, statusCode string, start time.Time) { end := time.Now() c.end.WithLabelValues(method, statusCode).Set(float64(end.UTC().Unix())) c.duration.WithLabelValues(method, statusCode).Set(end.Sub(start).Seconds()) @@ -168,7 +173,7 @@ func CollectedRequest(ctx context.Context, method string, col Collector, toStatu col.After(newCtx, method, toStatusCode(err), start) if err != nil { - if !grpc.IsCanceled(err) { + if !grpcutil.IsCanceled(err) { ext.Error.Set(sp, true) } sp.LogFields(otlog.Error(err)) @@ -185,21 +190,3 @@ func ErrorCode(err error) string { } return "500" } - -// TimeRequestHistogram runs 'f' and records how long it took in the given Prometheus -// histogram metric. If 'f' returns successfully, record a "200". Otherwise, record -// "500". It will also emit an OpenTracing span if you have a global tracer configured. -// -// Deprecated: Use CollectedRequest() -func TimeRequestHistogram(ctx oldcontext.Context, method string, metric *prometheus.HistogramVec, f func(context.Context) error) error { - return CollectedRequest(ctx, method, NewHistogramCollector(metric), ErrorCode, f) -} - -// TimeRequestHistogramStatus runs 'f' and records how long it took in the given Prometheus -// histogram metric. If 'f' returns successfully, record a "200". Otherwise, record -// "500". It will also emit an OpenTracing span if you have a global tracer configured. -// -// Deprecated: Use CollectedRequest() -func TimeRequestHistogramStatus(ctx oldcontext.Context, method string, metric *prometheus.HistogramVec, toStatusCode func(error) string, f func(context.Context) error) error { - return CollectedRequest(ctx, method, NewHistogramCollector(metric), toStatusCode, f) -} diff --git a/vendor/github.com/grafana/dskit/kv/consul/client.go b/vendor/github.com/grafana/dskit/kv/consul/client.go index 861e03f5625..5501a67d894 100644 --- a/vendor/github.com/grafana/dskit/kv/consul/client.go +++ b/vendor/github.com/grafana/dskit/kv/consul/client.go @@ -14,9 +14,10 @@ import ( consul "github.com/hashicorp/consul/api" "github.com/hashicorp/go-cleanhttp" "github.com/prometheus/client_golang/prometheus" - "github.com/weaveworks/common/instrument" "golang.org/x/time/rate" + "github.com/grafana/dskit/instrument" + "github.com/grafana/dskit/backoff" "github.com/grafana/dskit/flagext" "github.com/grafana/dskit/kv/codec" diff --git a/vendor/github.com/grafana/dskit/kv/consul/metrics.go b/vendor/github.com/grafana/dskit/kv/consul/metrics.go index 52a1d4e843a..166e79bc98e 100644 --- a/vendor/github.com/grafana/dskit/kv/consul/metrics.go +++ b/vendor/github.com/grafana/dskit/kv/consul/metrics.go @@ -6,7 +6,8 @@ import ( consul "github.com/hashicorp/consul/api" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/weaveworks/common/instrument" + + "github.com/grafana/dskit/instrument" ) type consulInstrumentation struct { diff --git a/vendor/github.com/grafana/dskit/kv/metrics.go b/vendor/github.com/grafana/dskit/kv/metrics.go index 66fe9fa91be..7361b8c41c7 100644 --- a/vendor/github.com/grafana/dskit/kv/metrics.go +++ b/vendor/github.com/grafana/dskit/kv/metrics.go @@ -6,8 +6,9 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/instrument" + + "github.com/grafana/dskit/httpgrpc" + "github.com/grafana/dskit/instrument" ) // RegistererWithKVName wraps the provided Registerer with the KV name label. If a nil reg diff --git a/vendor/github.com/weaveworks/common/logging/format.go b/vendor/github.com/grafana/dskit/log/format.go similarity index 83% rename from vendor/github.com/weaveworks/common/logging/format.go rename to vendor/github.com/grafana/dskit/log/format.go index 701b32f5632..3925b3c14a4 100644 --- a/vendor/github.com/weaveworks/common/logging/format.go +++ b/vendor/github.com/grafana/dskit/log/format.go @@ -1,4 +1,8 @@ -package logging +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/logging/format.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + +package log import ( "flag" @@ -15,7 +19,7 @@ type Format struct { // RegisterFlags adds the log format flag to the provided flagset. func (f *Format) RegisterFlags(fs *flag.FlagSet) { - f.Set("logfmt") + _ = f.Set("logfmt") fs.Var(f, "log.format", "Output log messages in the given format. Valid formats: [logfmt, json]") } diff --git a/vendor/github.com/weaveworks/common/logging/global.go b/vendor/github.com/grafana/dskit/log/global.go similarity index 87% rename from vendor/github.com/weaveworks/common/logging/global.go rename to vendor/github.com/grafana/dskit/log/global.go index ed72daf739c..68131a156d5 100644 --- a/vendor/github.com/weaveworks/common/logging/global.go +++ b/vendor/github.com/grafana/dskit/log/global.go @@ -1,4 +1,8 @@ -package logging +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/logging/global.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + +package log var global = Noop() diff --git a/vendor/github.com/weaveworks/common/logging/gokit.go b/vendor/github.com/grafana/dskit/log/gokit.go similarity index 92% rename from vendor/github.com/weaveworks/common/logging/gokit.go rename to vendor/github.com/grafana/dskit/log/gokit.go index e4b6fdc032c..c956c677533 100644 --- a/vendor/github.com/weaveworks/common/logging/gokit.go +++ b/vendor/github.com/grafana/dskit/log/gokit.go @@ -1,4 +1,8 @@ -package logging +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/logging/gokit.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + +package log import ( "fmt" diff --git a/vendor/github.com/weaveworks/common/logging/interface.go b/vendor/github.com/grafana/dskit/log/interface.go similarity index 76% rename from vendor/github.com/weaveworks/common/logging/interface.go rename to vendor/github.com/grafana/dskit/log/interface.go index f4625e474f8..a074fef90b9 100644 --- a/vendor/github.com/weaveworks/common/logging/interface.go +++ b/vendor/github.com/grafana/dskit/log/interface.go @@ -1,4 +1,8 @@ -package logging +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/logging/interface.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + +package log // Interface 'unifies' gokit logging and logrus logging, such that // the middleware in this repo can be used in projects which use either diff --git a/vendor/github.com/weaveworks/common/logging/level.go b/vendor/github.com/grafana/dskit/log/level.go similarity index 90% rename from vendor/github.com/weaveworks/common/logging/level.go rename to vendor/github.com/grafana/dskit/log/level.go index d7b92eaaa10..f2b8db55b1f 100644 --- a/vendor/github.com/weaveworks/common/logging/level.go +++ b/vendor/github.com/grafana/dskit/log/level.go @@ -1,4 +1,8 @@ -package logging +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/logging/level.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + +package log // Copy-pasted from prometheus/common/promlog. // Copyright 2017 The Prometheus Authors @@ -32,7 +36,7 @@ type Level struct { // RegisterFlags adds the log level flag to the provided flagset. func (l *Level) RegisterFlags(f *flag.FlagSet) { - l.Set("info") + _ = l.Set("info") f.Var(l, "log.level", "Only log messages with the given severity or above. Valid levels: [debug, info, warn, error]") } diff --git a/vendor/github.com/weaveworks/common/logging/logging.go b/vendor/github.com/grafana/dskit/log/logging.go similarity index 76% rename from vendor/github.com/weaveworks/common/logging/logging.go rename to vendor/github.com/grafana/dskit/log/logging.go index f23db5f6630..5bb80dee293 100644 --- a/vendor/github.com/weaveworks/common/logging/logging.go +++ b/vendor/github.com/grafana/dskit/log/logging.go @@ -1,4 +1,8 @@ -package logging +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/logging/logging.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + +package log import ( "fmt" diff --git a/vendor/github.com/weaveworks/common/logging/logrus.go b/vendor/github.com/grafana/dskit/log/logrus.go similarity index 86% rename from vendor/github.com/weaveworks/common/logging/logrus.go rename to vendor/github.com/grafana/dskit/log/logrus.go index d302613f7b6..df0e1ae07e8 100644 --- a/vendor/github.com/weaveworks/common/logging/logrus.go +++ b/vendor/github.com/grafana/dskit/log/logrus.go @@ -1,4 +1,8 @@ -package logging +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/logging/logrus.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + +package log import ( "os" diff --git a/vendor/github.com/grafana/dskit/log/noop.go b/vendor/github.com/grafana/dskit/log/noop.go new file mode 100644 index 00000000000..89d437468d5 --- /dev/null +++ b/vendor/github.com/grafana/dskit/log/noop.go @@ -0,0 +1,27 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/logging/noop.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + +package log + +// Noop logger. +func Noop() Interface { + return noop{} +} + +type noop struct{} + +func (noop) Debugf(string, ...interface{}) {} +func (noop) Debugln(...interface{}) {} +func (noop) Infof(string, ...interface{}) {} +func (noop) Infoln(...interface{}) {} +func (noop) Warnf(string, ...interface{}) {} +func (noop) Warnln(...interface{}) {} +func (noop) Errorf(string, ...interface{}) {} +func (noop) Errorln(...interface{}) {} +func (noop) WithField(string, interface{}) Interface { + return noop{} +} +func (noop) WithFields(Fields) Interface { + return noop{} +} diff --git a/vendor/github.com/weaveworks/common/middleware/counting_listener.go b/vendor/github.com/grafana/dskit/middleware/counting_listener.go similarity index 82% rename from vendor/github.com/weaveworks/common/middleware/counting_listener.go rename to vendor/github.com/grafana/dskit/middleware/counting_listener.go index 1e8526288da..961f71a5125 100644 --- a/vendor/github.com/weaveworks/common/middleware/counting_listener.go +++ b/vendor/github.com/grafana/dskit/middleware/counting_listener.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/counting_listener.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( diff --git a/vendor/github.com/weaveworks/common/middleware/errorhandler.go b/vendor/github.com/grafana/dskit/middleware/errorhandler.go similarity index 92% rename from vendor/github.com/weaveworks/common/middleware/errorhandler.go rename to vendor/github.com/grafana/dskit/middleware/errorhandler.go index ab2354fa163..4a48c90c9ca 100644 --- a/vendor/github.com/weaveworks/common/middleware/errorhandler.go +++ b/vendor/github.com/grafana/dskit/middleware/errorhandler.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/errorhandler.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( diff --git a/vendor/github.com/weaveworks/common/middleware/grpc_auth.go b/vendor/github.com/grafana/dskit/middleware/grpc_auth.go similarity index 85% rename from vendor/github.com/weaveworks/common/middleware/grpc_auth.go rename to vendor/github.com/grafana/dskit/middleware/grpc_auth.go index 10be1f8d706..156ddaf10a1 100644 --- a/vendor/github.com/weaveworks/common/middleware/grpc_auth.go +++ b/vendor/github.com/grafana/dskit/middleware/grpc_auth.go @@ -1,10 +1,15 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/grpc_auth.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( - "golang.org/x/net/context" + "context" + "google.golang.org/grpc" - "github.com/weaveworks/common/user" + "github.com/grafana/dskit/user" ) // ClientUserHeaderInterceptor propagates the user ID from the context to gRPC metadata, which eventually ends up as a HTTP2 header. @@ -29,7 +34,7 @@ func StreamClientUserHeaderInterceptor(ctx context.Context, desc *grpc.StreamDes } // ServerUserHeaderInterceptor propagates the user ID from the gRPC metadata back to our context. -func ServerUserHeaderInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { +func ServerUserHeaderInterceptor(ctx context.Context, req interface{}, _ *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) { _, ctx, err := user.ExtractFromGRPCRequest(ctx) if err != nil { return nil, err diff --git a/vendor/github.com/weaveworks/common/middleware/grpc_instrumentation.go b/vendor/github.com/grafana/dskit/middleware/grpc_instrumentation.go similarity index 92% rename from vendor/github.com/weaveworks/common/middleware/grpc_instrumentation.go rename to vendor/github.com/grafana/dskit/middleware/grpc_instrumentation.go index 90c955f1e82..4a0899c25f9 100644 --- a/vendor/github.com/weaveworks/common/middleware/grpc_instrumentation.go +++ b/vendor/github.com/grafana/dskit/middleware/grpc_instrumentation.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/grpc_instrumentation.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( @@ -7,11 +11,12 @@ import ( "time" "github.com/prometheus/client_golang/prometheus" - grpcUtils "github.com/weaveworks/common/grpc" - "github.com/weaveworks/common/httpgrpc" - "github.com/weaveworks/common/instrument" "google.golang.org/grpc" "google.golang.org/grpc/metadata" + + grpcUtils "github.com/grafana/dskit/grpcutil" + "github.com/grafana/dskit/httpgrpc" + "github.com/grafana/dskit/instrument" ) func observe(ctx context.Context, hist *prometheus.HistogramVec, method string, err error, duration time.Duration) { diff --git a/vendor/github.com/weaveworks/common/middleware/grpc_logging.go b/vendor/github.com/grafana/dskit/middleware/grpc_logging.go similarity index 76% rename from vendor/github.com/weaveworks/common/middleware/grpc_logging.go rename to vendor/github.com/grafana/dskit/middleware/grpc_logging.go index 66aa8e22167..bb9c99571e9 100644 --- a/vendor/github.com/weaveworks/common/middleware/grpc_logging.go +++ b/vendor/github.com/grafana/dskit/middleware/grpc_logging.go @@ -1,15 +1,19 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/grpc_logging.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( + "context" "errors" "time" - "golang.org/x/net/context" "google.golang.org/grpc" - grpcUtils "github.com/weaveworks/common/grpc" - "github.com/weaveworks/common/logging" - "github.com/weaveworks/common/user" + grpcUtils "github.com/grafana/dskit/grpcutil" + "github.com/grafana/dskit/log" + "github.com/grafana/dskit/user" ) const ( @@ -24,7 +28,7 @@ type OptionalLogging interface { // GRPCServerLog logs grpc requests, errors, and latency. type GRPCServerLog struct { - Log logging.Interface + Log log.Interface // WithRequest will log the entire request rather than just the error WithRequest bool DisableRequestSuccessLog bool @@ -42,7 +46,7 @@ func (s GRPCServerLog) UnaryServerInterceptor(ctx context.Context, req interface return resp, err } - entry := user.LogWith(ctx, s.Log).WithFields(logging.Fields{"method": info.FullMethod, "duration": time.Since(begin)}) + entry := user.LogWith(ctx, s.Log).WithFields(log.Fields{"method": info.FullMethod, "duration": time.Since(begin)}) if err != nil { if s.WithRequest { entry = entry.WithField("request", req) @@ -66,7 +70,7 @@ func (s GRPCServerLog) StreamServerInterceptor(srv interface{}, ss grpc.ServerSt return nil } - entry := user.LogWith(ss.Context(), s.Log).WithFields(logging.Fields{"method": info.FullMethod, "duration": time.Since(begin)}) + entry := user.LogWith(ss.Context(), s.Log).WithFields(log.Fields{"method": info.FullMethod, "duration": time.Since(begin)}) if err != nil { if grpcUtils.IsCanceled(err) { entry.WithField(errorKey, err).Debugln(gRPC) diff --git a/vendor/github.com/weaveworks/common/middleware/grpc_stats.go b/vendor/github.com/grafana/dskit/middleware/grpc_stats.go similarity index 91% rename from vendor/github.com/weaveworks/common/middleware/grpc_stats.go rename to vendor/github.com/grafana/dskit/middleware/grpc_stats.go index 6c2581c4c2f..3d29d9baabb 100644 --- a/vendor/github.com/weaveworks/common/middleware/grpc_stats.go +++ b/vendor/github.com/grafana/dskit/middleware/grpc_stats.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/grpc_stats.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( diff --git a/vendor/github.com/weaveworks/common/middleware/header_adder.go b/vendor/github.com/grafana/dskit/middleware/header_adder.go similarity index 71% rename from vendor/github.com/weaveworks/common/middleware/header_adder.go rename to vendor/github.com/grafana/dskit/middleware/header_adder.go index ce7f07df578..ffd5cc8db0c 100644 --- a/vendor/github.com/weaveworks/common/middleware/header_adder.go +++ b/vendor/github.com/grafana/dskit/middleware/header_adder.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/header_adder.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( diff --git a/vendor/github.com/weaveworks/common/middleware/http_auth.go b/vendor/github.com/grafana/dskit/middleware/http_auth.go similarity index 66% rename from vendor/github.com/weaveworks/common/middleware/http_auth.go rename to vendor/github.com/grafana/dskit/middleware/http_auth.go index 704d1dab4e2..2b576a929b1 100644 --- a/vendor/github.com/weaveworks/common/middleware/http_auth.go +++ b/vendor/github.com/grafana/dskit/middleware/http_auth.go @@ -1,9 +1,13 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/http_auth.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( "net/http" - "github.com/weaveworks/common/user" + "github.com/grafana/dskit/user" ) // AuthenticateUser propagates the user ID from HTTP headers back to the request's context. diff --git a/vendor/github.com/weaveworks/common/middleware/http_tracing.go b/vendor/github.com/grafana/dskit/middleware/http_tracing.go similarity index 86% rename from vendor/github.com/weaveworks/common/middleware/http_tracing.go rename to vendor/github.com/grafana/dskit/middleware/http_tracing.go index 7b55557677e..e36bf436df1 100644 --- a/vendor/github.com/weaveworks/common/middleware/http_tracing.go +++ b/vendor/github.com/grafana/dskit/middleware/http_tracing.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/http_tracing.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( diff --git a/vendor/github.com/weaveworks/common/middleware/instrument.go b/vendor/github.com/grafana/dskit/middleware/instrument.go similarity index 87% rename from vendor/github.com/weaveworks/common/middleware/instrument.go rename to vendor/github.com/grafana/dskit/middleware/instrument.go index ac1f76f007c..e5ae9c53c98 100644 --- a/vendor/github.com/weaveworks/common/middleware/instrument.go +++ b/vendor/github.com/grafana/dskit/middleware/instrument.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/instrument.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( @@ -11,7 +15,7 @@ import ( "github.com/gorilla/mux" "github.com/prometheus/client_golang/prometheus" - "github.com/weaveworks/common/instrument" + "github.com/grafana/dskit/instrument" ) const mb = 1024 * 1024 @@ -78,11 +82,12 @@ func (i Instrument) Wrap(next http.Handler) http.Handler { } // Return a name identifier for ths request. There are three options: -// 1. The request matches a gorilla mux route, with a name. Use that. -// 2. The request matches an unamed gorilla mux router. Munge the path -// template such that templates like '/api/{org}/foo' come out as -// 'api_org_foo'. -// 3. The request doesn't match a mux route. Return "other" +// 1. The request matches a gorilla mux route, with a name. Use that. +// 2. The request matches an unamed gorilla mux router. Munge the path +// template such that templates like '/api/{org}/foo' come out as +// 'api_org_foo'. +// 3. The request doesn't match a mux route. Return "other" +// // We do all this as we do not wish to emit high cardinality labels to // prometheus. func (i Instrument) getRouteName(r *http.Request) string { diff --git a/vendor/github.com/weaveworks/common/middleware/logging.go b/vendor/github.com/grafana/dskit/middleware/logging.go similarity index 85% rename from vendor/github.com/weaveworks/common/middleware/logging.go rename to vendor/github.com/grafana/dskit/middleware/logging.go index fcb8453ffb7..ca13f330ed2 100644 --- a/vendor/github.com/weaveworks/common/middleware/logging.go +++ b/vendor/github.com/grafana/dskit/middleware/logging.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/logging.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( @@ -7,19 +11,19 @@ import ( "net/http" "time" - "github.com/weaveworks/common/logging" - "github.com/weaveworks/common/tracing" - "github.com/weaveworks/common/user" + "github.com/grafana/dskit/log" + "github.com/grafana/dskit/tracing" + "github.com/grafana/dskit/user" ) // Log middleware logs http requests type Log struct { - Log logging.Interface + Log log.Interface DisableRequestSuccessLog bool LogRequestHeaders bool // LogRequestHeaders true -> dump http headers at debug log level LogRequestAtInfoLevel bool // LogRequestAtInfoLevel true -> log requests at info log level SourceIPs *SourceIPExtractor - HttpHeadersToExclude map[string]bool + HTTPHeadersToExclude map[string]bool } var defaultExcludedHeaders = map[string]bool{ @@ -28,7 +32,7 @@ var defaultExcludedHeaders = map[string]bool{ "Authorization": true, } -func NewLogMiddleware(log logging.Interface, logRequestHeaders bool, logRequestAtInfoLevel bool, sourceIPs *SourceIPExtractor, headersList []string) Log { +func NewLogMiddleware(log log.Interface, logRequestHeaders bool, logRequestAtInfoLevel bool, sourceIPs *SourceIPExtractor, headersList []string) Log { httpHeadersToExclude := map[string]bool{} for header := range defaultExcludedHeaders { httpHeadersToExclude[header] = true @@ -42,12 +46,12 @@ func NewLogMiddleware(log logging.Interface, logRequestHeaders bool, logRequestA LogRequestHeaders: logRequestHeaders, LogRequestAtInfoLevel: logRequestAtInfoLevel, SourceIPs: sourceIPs, - HttpHeadersToExclude: httpHeadersToExclude, + HTTPHeadersToExclude: httpHeadersToExclude, } } // logWithRequest information from the request and context as fields. -func (l Log) logWithRequest(r *http.Request) logging.Interface { +func (l Log) logWithRequest(r *http.Request) log.Interface { localLog := l.Log traceID, ok := tracing.ExtractTraceID(r.Context()) if ok { @@ -71,7 +75,7 @@ func (l Log) Wrap(next http.Handler) http.Handler { uri := r.RequestURI // capture the URI before running next, as it may get rewritten requestLog := l.logWithRequest(r) // Log headers before running 'next' in case other interceptors change the data. - headers, err := dumpRequest(r, l.HttpHeadersToExclude) + headers, err := dumpRequest(r, l.HTTPHeadersToExclude) if err != nil { headers = nil requestLog.Errorf("Could not dump request headers: %v", err) @@ -125,7 +129,7 @@ func (l Log) Wrap(next http.Handler) http.Handler { // Logging middleware logs each HTTP request method, path, response code and // duration for all HTTP requests. var Logging = Log{ - Log: logging.Global(), + Log: log.Global(), } func dumpRequest(req *http.Request, httpHeadersToExclude map[string]bool) ([]byte, error) { diff --git a/vendor/github.com/weaveworks/common/middleware/middleware.go b/vendor/github.com/grafana/dskit/middleware/middleware.go similarity index 81% rename from vendor/github.com/weaveworks/common/middleware/middleware.go rename to vendor/github.com/grafana/dskit/middleware/middleware.go index ad8925ac868..79720b333f2 100644 --- a/vendor/github.com/weaveworks/common/middleware/middleware.go +++ b/vendor/github.com/grafana/dskit/middleware/middleware.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/middleware.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( diff --git a/vendor/github.com/weaveworks/common/middleware/path_rewrite.go b/vendor/github.com/grafana/dskit/middleware/path_rewrite.go similarity index 87% rename from vendor/github.com/weaveworks/common/middleware/path_rewrite.go rename to vendor/github.com/grafana/dskit/middleware/path_rewrite.go index 8250201a88c..c9e917a72b7 100644 --- a/vendor/github.com/weaveworks/common/middleware/path_rewrite.go +++ b/vendor/github.com/grafana/dskit/middleware/path_rewrite.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/path_rewrite.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( diff --git a/vendor/github.com/weaveworks/common/middleware/response.go b/vendor/github.com/grafana/dskit/middleware/response.go similarity index 90% rename from vendor/github.com/weaveworks/common/middleware/response.go rename to vendor/github.com/grafana/dskit/middleware/response.go index 2655003c88f..e2ce1d0a7ee 100644 --- a/vendor/github.com/weaveworks/common/middleware/response.go +++ b/vendor/github.com/grafana/dskit/middleware/response.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/response.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( @@ -108,12 +112,12 @@ func (b *nonFlushingBadResponseLoggingWriter) getWriteError() error { func (b *nonFlushingBadResponseLoggingWriter) captureResponseBody(data []byte) { if len(data) > b.bodyBytesLeft { - b.buffer.Write(data[:b.bodyBytesLeft]) - io.WriteString(b.buffer, "...") + _, _ = b.buffer.Write(data[:b.bodyBytesLeft]) + _, _ = io.WriteString(b.buffer, "...") b.bodyBytesLeft = 0 b.logBody = false } else { - b.buffer.Write(data) + _, _ = b.buffer.Write(data) b.bodyBytesLeft -= len(data) } } diff --git a/vendor/github.com/weaveworks/common/middleware/source_ips.go b/vendor/github.com/grafana/dskit/middleware/source_ips.go similarity index 95% rename from vendor/github.com/weaveworks/common/middleware/source_ips.go rename to vendor/github.com/grafana/dskit/middleware/source_ips.go index 17178d427dd..7c035ddbf47 100644 --- a/vendor/github.com/weaveworks/common/middleware/source_ips.go +++ b/vendor/github.com/grafana/dskit/middleware/source_ips.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/middleware/source_ips.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package middleware import ( diff --git a/vendor/github.com/weaveworks/common/mtime/mtime.go b/vendor/github.com/grafana/dskit/mtime/mtime.go similarity index 64% rename from vendor/github.com/weaveworks/common/mtime/mtime.go rename to vendor/github.com/grafana/dskit/mtime/mtime.go index dd1fc87ca04..2b490f0a8c1 100644 --- a/vendor/github.com/weaveworks/common/mtime/mtime.go +++ b/vendor/github.com/grafana/dskit/mtime/mtime.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/mtime/mtime.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package mtime import "time" diff --git a/vendor/github.com/grafana/dskit/ring/client/pool.go b/vendor/github.com/grafana/dskit/ring/client/pool.go index ee9d06b6b39..5e21e69c339 100644 --- a/vendor/github.com/grafana/dskit/ring/client/pool.go +++ b/vendor/github.com/grafana/dskit/ring/client/pool.go @@ -10,12 +10,12 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" - "github.com/weaveworks/common/user" "google.golang.org/grpc/health/grpc_health_v1" "github.com/grafana/dskit/concurrency" "github.com/grafana/dskit/internal/slices" "github.com/grafana/dskit/services" + "github.com/grafana/dskit/user" ) // PoolClient is the interface that should be implemented by a diff --git a/vendor/github.com/weaveworks/common/server/fake_server.pb.go b/vendor/github.com/grafana/dskit/server/fake_server.pb.go similarity index 53% rename from vendor/github.com/weaveworks/common/server/fake_server.pb.go rename to vendor/github.com/grafana/dskit/server/fake_server.pb.go index 4fafbb2f32d..75ee6b0a14e 100644 --- a/vendor/github.com/weaveworks/common/server/fake_server.pb.go +++ b/vendor/github.com/grafana/dskit/server/fake_server.pb.go @@ -1,17 +1,21 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: server/fake_server.proto +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: fake_server.proto package server import ( context "context" fmt "fmt" - proto "github.com/golang/protobuf/proto" + proto "github.com/gogo/protobuf/proto" empty "github.com/golang/protobuf/ptypes/empty" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" + io "io" math "math" + math_bits "math/bits" + reflect "reflect" + strings "strings" ) // Reference imports to suppress errors if they are not otherwise used. @@ -23,33 +27,37 @@ var _ = math.Inf // is compatible with the proto package it is being compiled against. // A compilation error at this line likely means your copy of the // proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type FailWithHTTPErrorRequest struct { - Code int32 `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Code int32 `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"` } -func (m *FailWithHTTPErrorRequest) Reset() { *m = FailWithHTTPErrorRequest{} } -func (m *FailWithHTTPErrorRequest) String() string { return proto.CompactTextString(m) } -func (*FailWithHTTPErrorRequest) ProtoMessage() {} +func (m *FailWithHTTPErrorRequest) Reset() { *m = FailWithHTTPErrorRequest{} } +func (*FailWithHTTPErrorRequest) ProtoMessage() {} func (*FailWithHTTPErrorRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_2267b95bf2c64cdc, []int{0} + return fileDescriptor_a932e7b7b9f5c118, []int{0} } - func (m *FailWithHTTPErrorRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FailWithHTTPErrorRequest.Unmarshal(m, b) + return m.Unmarshal(b) } func (m *FailWithHTTPErrorRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FailWithHTTPErrorRequest.Marshal(b, m, deterministic) + if deterministic { + return xxx_messageInfo_FailWithHTTPErrorRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } } func (m *FailWithHTTPErrorRequest) XXX_Merge(src proto.Message) { xxx_messageInfo_FailWithHTTPErrorRequest.Merge(m, src) } func (m *FailWithHTTPErrorRequest) XXX_Size() int { - return xxx_messageInfo_FailWithHTTPErrorRequest.Size(m) + return m.Size() } func (m *FailWithHTTPErrorRequest) XXX_DiscardUnknown() { xxx_messageInfo_FailWithHTTPErrorRequest.DiscardUnknown(m) @@ -68,26 +76,70 @@ func init() { proto.RegisterType((*FailWithHTTPErrorRequest)(nil), "server.FailWithHTTPErrorRequest") } -func init() { proto.RegisterFile("server/fake_server.proto", fileDescriptor_2267b95bf2c64cdc) } - -var fileDescriptor_2267b95bf2c64cdc = []byte{ - // 246 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x28, 0x4e, 0x2d, 0x2a, - 0x4b, 0x2d, 0xd2, 0x4f, 0x4b, 0xcc, 0x4e, 0x8d, 0x87, 0xb0, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, - 0x85, 0xd8, 0x20, 0x3c, 0x29, 0xe9, 0xf4, 0xfc, 0xfc, 0xf4, 0x9c, 0x54, 0x7d, 0xb0, 0x68, 0x52, - 0x69, 0x9a, 0x7e, 0x6a, 0x6e, 0x41, 0x49, 0x25, 0x44, 0x91, 0x92, 0x1e, 0x97, 0x84, 0x5b, 0x62, - 0x66, 0x4e, 0x78, 0x66, 0x49, 0x86, 0x47, 0x48, 0x48, 0x80, 0x6b, 0x51, 0x51, 0x7e, 0x51, 0x50, - 0x6a, 0x61, 0x69, 0x6a, 0x71, 0x89, 0x90, 0x10, 0x17, 0x8b, 0x73, 0x7e, 0x4a, 0xaa, 0x04, 0xa3, - 0x02, 0xa3, 0x06, 0x6b, 0x10, 0x98, 0x6d, 0x74, 0x9b, 0x89, 0x8b, 0xcb, 0x2d, 0x31, 0x3b, 0x35, - 0x18, 0x6c, 0xb6, 0x90, 0x35, 0x17, 0x7b, 0x70, 0x69, 0x72, 0x72, 0x6a, 0x6a, 0x8a, 0x90, 0x98, - 0x1e, 0xc4, 0x1e, 0x3d, 0x98, 0x3d, 0x7a, 0xae, 0x20, 0x7b, 0xa4, 0x70, 0x88, 0x2b, 0x31, 0x08, - 0x39, 0x72, 0xf1, 0xc2, 0xec, 0x06, 0xdb, 0x4b, 0x86, 0x11, 0xfe, 0x5c, 0x82, 0x18, 0xce, 0x17, - 0x52, 0xd0, 0x83, 0x86, 0x03, 0x2e, 0x9f, 0xe1, 0x31, 0xd0, 0x92, 0x8b, 0x35, 0x38, 0x27, 0x35, - 0xb5, 0x80, 0x2c, 0xef, 0x70, 0x07, 0x97, 0x14, 0xa5, 0x26, 0xe6, 0x92, 0x69, 0x80, 0x01, 0xa3, - 0x93, 0x6a, 0x94, 0x72, 0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x79, - 0x6a, 0x62, 0x59, 0x6a, 0x79, 0x7e, 0x51, 0x76, 0xb1, 0x7e, 0x72, 0x7e, 0x6e, 0x6e, 0x7e, 0x9e, - 0x3e, 0xc4, 0x5f, 0x49, 0x6c, 0x60, 0xad, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf9, 0xcd, - 0xa4, 0xf9, 0xfc, 0x01, 0x00, 0x00, +func init() { proto.RegisterFile("fake_server.proto", fileDescriptor_a932e7b7b9f5c118) } + +var fileDescriptor_a932e7b7b9f5c118 = []byte{ + // 265 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4c, 0x4b, 0xcc, 0x4e, + 0x8d, 0x2f, 0x4e, 0x2d, 0x2a, 0x4b, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, + 0xf0, 0xa4, 0xa4, 0xd3, 0xf3, 0xf3, 0xd3, 0x73, 0x52, 0xf5, 0xc1, 0xa2, 0x49, 0xa5, 0x69, 0xfa, + 0xa9, 0xb9, 0x05, 0x25, 0x95, 0x10, 0x45, 0x4a, 0x7a, 0x5c, 0x12, 0x6e, 0x89, 0x99, 0x39, 0xe1, + 0x99, 0x25, 0x19, 0x1e, 0x21, 0x21, 0x01, 0xae, 0x45, 0x45, 0xf9, 0x45, 0x41, 0xa9, 0x85, 0xa5, + 0xa9, 0xc5, 0x25, 0x42, 0x42, 0x5c, 0x2c, 0xce, 0xf9, 0x29, 0xa9, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, + 0xac, 0x41, 0x60, 0xb6, 0xd1, 0x6d, 0x26, 0x2e, 0x2e, 0xb7, 0xc4, 0xec, 0xd4, 0x60, 0xb0, 0xd9, + 0x42, 0xd6, 0x5c, 0xec, 0xc1, 0xa5, 0xc9, 0xc9, 0xa9, 0xa9, 0x29, 0x42, 0x62, 0x7a, 0x10, 0x7b, + 0xf4, 0x60, 0xf6, 0xe8, 0xb9, 0x82, 0xec, 0x91, 0xc2, 0x21, 0xae, 0xc4, 0x20, 0xe4, 0xc8, 0xc5, + 0x0b, 0xb3, 0x1b, 0x6c, 0x2f, 0x19, 0x46, 0xf8, 0x73, 0x09, 0x62, 0x38, 0x5f, 0x48, 0x41, 0x0f, + 0x1a, 0x0e, 0xb8, 0x7c, 0x86, 0xc7, 0x40, 0x4b, 0x2e, 0xd6, 0xe0, 0x9c, 0xd4, 0xd4, 0x02, 0xb2, + 0xbc, 0xc3, 0x1d, 0x5c, 0x52, 0x94, 0x9a, 0x98, 0x4b, 0xa6, 0x01, 0x06, 0x8c, 0x4e, 0x26, 0x17, + 0x1e, 0xca, 0x31, 0xdc, 0x78, 0x28, 0xc7, 0xf0, 0xe1, 0xa1, 0x1c, 0x63, 0xc3, 0x23, 0x39, 0xc6, + 0x15, 0x8f, 0xe4, 0x18, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, + 0xc6, 0x17, 0x8f, 0xe4, 0x18, 0x3e, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, + 0x39, 0x86, 0x1b, 0x8f, 0xe5, 0x18, 0x92, 0xd8, 0xc0, 0x26, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, + 0xff, 0x43, 0x2b, 0x71, 0x6d, 0x04, 0x02, 0x00, 0x00, +} + +func (this *FailWithHTTPErrorRequest) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*FailWithHTTPErrorRequest) + if !ok { + that2, ok := that.(FailWithHTTPErrorRequest) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Code != that1.Code { + return false + } + return true +} +func (this *FailWithHTTPErrorRequest) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&server.FailWithHTTPErrorRequest{") + s = append(s, "Code: "+fmt.Sprintf("%#v", this.Code)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringFakeServer(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) } // Reference imports to suppress errors if they are not otherwise used. @@ -339,5 +391,263 @@ var _FakeServer_serviceDesc = grpc.ServiceDesc{ ServerStreams: true, }, }, - Metadata: "server/fake_server.proto", + Metadata: "fake_server.proto", +} + +func (m *FailWithHTTPErrorRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FailWithHTTPErrorRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FailWithHTTPErrorRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Code != 0 { + i = encodeVarintFakeServer(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintFakeServer(dAtA []byte, offset int, v uint64) int { + offset -= sovFakeServer(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *FailWithHTTPErrorRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovFakeServer(uint64(m.Code)) + } + return n +} + +func sovFakeServer(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozFakeServer(x uint64) (n int) { + return sovFakeServer(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (this *FailWithHTTPErrorRequest) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FailWithHTTPErrorRequest{`, + `Code:` + fmt.Sprintf("%v", this.Code) + `,`, + `}`, + }, "") + return s +} +func valueToStringFakeServer(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *FailWithHTTPErrorRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFakeServer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FailWithHTTPErrorRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FailWithHTTPErrorRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFakeServer + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipFakeServer(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthFakeServer + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthFakeServer + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipFakeServer(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFakeServer + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFakeServer + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFakeServer + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthFakeServer + } + iNdEx += length + if iNdEx < 0 { + return 0, ErrInvalidLengthFakeServer + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowFakeServer + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipFakeServer(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + if iNdEx < 0 { + return 0, ErrInvalidLengthFakeServer + } + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthFakeServer = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowFakeServer = fmt.Errorf("proto: integer overflow") +) diff --git a/vendor/github.com/weaveworks/common/server/fake_server.proto b/vendor/github.com/grafana/dskit/server/fake_server.proto similarity index 90% rename from vendor/github.com/weaveworks/common/server/fake_server.proto rename to vendor/github.com/grafana/dskit/server/fake_server.proto index bbf39381af5..248a6f244bd 100644 --- a/vendor/github.com/weaveworks/common/server/fake_server.proto +++ b/vendor/github.com/grafana/dskit/server/fake_server.proto @@ -2,8 +2,6 @@ syntax = "proto3"; package server; -option go_package = "github.com/weaveworks/common/server"; - import "google/protobuf/empty.proto"; service FakeServer { diff --git a/vendor/github.com/weaveworks/common/server/metrics.go b/vendor/github.com/grafana/dskit/server/metrics.go similarity index 68% rename from vendor/github.com/weaveworks/common/server/metrics.go rename to vendor/github.com/grafana/dskit/server/metrics.go index 2e2272e3d3d..aa1c3e53aef 100644 --- a/vendor/github.com/weaveworks/common/server/metrics.go +++ b/vendor/github.com/grafana/dskit/server/metrics.go @@ -1,15 +1,22 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/server/metrics.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package server import ( - "github.com/prometheus/client_golang/prometheus" - "github.com/weaveworks/common/instrument" - "github.com/weaveworks/common/middleware" "time" + + "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/promauto" + + "github.com/grafana/dskit/instrument" + "github.com/grafana/dskit/middleware" ) type Metrics struct { - TcpConnections *prometheus.GaugeVec - TcpConnectionsLimit *prometheus.GaugeVec + TCPConnections *prometheus.GaugeVec + TCPConnectionsLimit *prometheus.GaugeVec RequestDuration *prometheus.HistogramVec ReceivedMessageSize *prometheus.HistogramVec SentMessageSize *prometheus.HistogramVec @@ -17,18 +24,20 @@ type Metrics struct { } func NewServerMetrics(cfg Config) *Metrics { + reg := promauto.With(cfg.registererOrDefault()) + return &Metrics{ - TcpConnections: prometheus.NewGaugeVec(prometheus.GaugeOpts{ + TCPConnections: reg.NewGaugeVec(prometheus.GaugeOpts{ Namespace: cfg.MetricsNamespace, Name: "tcp_connections", Help: "Current number of accepted TCP connections.", }, []string{"protocol"}), - TcpConnectionsLimit: prometheus.NewGaugeVec(prometheus.GaugeOpts{ + TCPConnectionsLimit: reg.NewGaugeVec(prometheus.GaugeOpts{ Namespace: cfg.MetricsNamespace, Name: "tcp_connections_limit", Help: "The max number of TCP connections that can be accepted (0 means no limit).", }, []string{"protocol"}), - RequestDuration: prometheus.NewHistogramVec(prometheus.HistogramOpts{ + RequestDuration: reg.NewHistogramVec(prometheus.HistogramOpts{ Namespace: cfg.MetricsNamespace, Name: "request_duration_seconds", Help: "Time (in seconds) spent serving HTTP requests.", @@ -37,33 +46,22 @@ func NewServerMetrics(cfg Config) *Metrics { NativeHistogramMaxBucketNumber: 100, NativeHistogramMinResetDuration: time.Hour, }, []string{"method", "route", "status_code", "ws"}), - ReceivedMessageSize: prometheus.NewHistogramVec(prometheus.HistogramOpts{ + ReceivedMessageSize: reg.NewHistogramVec(prometheus.HistogramOpts{ Namespace: cfg.MetricsNamespace, Name: "request_message_bytes", Help: "Size (in bytes) of messages received in the request.", Buckets: middleware.BodySizeBuckets, }, []string{"method", "route"}), - SentMessageSize: prometheus.NewHistogramVec(prometheus.HistogramOpts{ + SentMessageSize: reg.NewHistogramVec(prometheus.HistogramOpts{ Namespace: cfg.MetricsNamespace, Name: "response_message_bytes", Help: "Size (in bytes) of messages sent in response.", Buckets: middleware.BodySizeBuckets, }, []string{"method", "route"}), - InflightRequests: prometheus.NewGaugeVec(prometheus.GaugeOpts{ + InflightRequests: reg.NewGaugeVec(prometheus.GaugeOpts{ Namespace: cfg.MetricsNamespace, Name: "inflight_requests", Help: "Current number of inflight requests.", }, []string{"method", "route"}), } } - -func (s *Metrics) MustRegister(registerer prometheus.Registerer) { - registerer.MustRegister( - s.TcpConnections, - s.TcpConnectionsLimit, - s.RequestDuration, - s.ReceivedMessageSize, - s.SentMessageSize, - s.InflightRequests, - ) -} diff --git a/vendor/github.com/weaveworks/common/server/server.go b/vendor/github.com/grafana/dskit/server/server.go similarity index 92% rename from vendor/github.com/weaveworks/common/server/server.go rename to vendor/github.com/grafana/dskit/server/server.go index 26eed4eaf6f..9275637cf7e 100644 --- a/vendor/github.com/weaveworks/common/server/server.go +++ b/vendor/github.com/grafana/dskit/server/server.go @@ -1,6 +1,11 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/server/server.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package server import ( + "context" "crypto/tls" "flag" "fmt" @@ -18,17 +23,16 @@ import ( "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/exporter-toolkit/web" "github.com/soheilhy/cmux" - "golang.org/x/net/context" "golang.org/x/net/netutil" "google.golang.org/grpc" "google.golang.org/grpc/credentials" "google.golang.org/grpc/keepalive" - "github.com/weaveworks/common/httpgrpc" - httpgrpc_server "github.com/weaveworks/common/httpgrpc/server" - "github.com/weaveworks/common/logging" - "github.com/weaveworks/common/middleware" - "github.com/weaveworks/common/signals" + "github.com/grafana/dskit/httpgrpc" + httpgrpc_server "github.com/grafana/dskit/httpgrpc/server" + "github.com/grafana/dskit/log" + "github.com/grafana/dskit/middleware" + "github.com/grafana/dskit/signals" ) // Listen on the named network @@ -109,15 +113,15 @@ type Config struct { GRPCServerMinTimeBetweenPings time.Duration `yaml:"grpc_server_min_time_between_pings"` GRPCServerPingWithoutStreamAllowed bool `yaml:"grpc_server_ping_without_stream_allowed"` - LogFormat logging.Format `yaml:"log_format"` - LogLevel logging.Level `yaml:"log_level"` - Log logging.Interface `yaml:"-"` - LogSourceIPs bool `yaml:"log_source_ips_enabled"` - LogSourceIPsHeader string `yaml:"log_source_ips_header"` - LogSourceIPsRegex string `yaml:"log_source_ips_regex"` - LogRequestHeaders bool `yaml:"log_request_headers"` - LogRequestAtInfoLevel bool `yaml:"log_request_at_info_level_enabled"` - LogRequestExcludeHeadersList string `yaml:"log_request_exclude_headers_list"` + LogFormat log.Format `yaml:"log_format"` + LogLevel log.Level `yaml:"log_level"` + Log log.Interface `yaml:"-"` + LogSourceIPs bool `yaml:"log_source_ips_enabled"` + LogSourceIPsHeader string `yaml:"log_source_ips_header"` + LogSourceIPsRegex string `yaml:"log_source_ips_regex"` + LogRequestHeaders bool `yaml:"log_request_headers"` + LogRequestAtInfoLevel bool `yaml:"log_request_at_info_level_enabled"` + LogRequestExcludeHeadersList string `yaml:"log_request_exclude_headers_list"` // If not set, default signal handler is used. SignalHandler SignalHandler `yaml:"-"` @@ -204,7 +208,7 @@ type Server struct { HTTP *mux.Router HTTPServer *http.Server GRPC *grpc.Server - Log logging.Interface + Log log.Interface Registerer prometheus.Registerer Gatherer prometheus.Gatherer } @@ -212,7 +216,6 @@ type Server struct { // New makes a new Server. It will panic if the metrics cannot be registered. func New(cfg Config) (*Server, error) { metrics := NewServerMetrics(cfg) - metrics.MustRegister(cfg.registererOrDefault()) return newServer(cfg, metrics) } @@ -225,9 +228,9 @@ func NewWithMetrics(cfg Config, metrics *Metrics) (*Server, error) { func newServer(cfg Config, metrics *Metrics) (*Server, error) { // If user doesn't supply a logging implementation, by default instantiate // logrus. - log := cfg.Log - if log == nil { - log = logging.NewLogrus(cfg.LogLevel) + logger := cfg.Log + if logger == nil { + logger = log.NewLogrus(cfg.LogLevel) } gatherer := cfg.Gatherer @@ -244,9 +247,9 @@ func newServer(cfg Config, metrics *Metrics) (*Server, error) { if err != nil { return nil, err } - httpListener = middleware.CountingListener(httpListener, metrics.TcpConnections.WithLabelValues("http")) + httpListener = middleware.CountingListener(httpListener, metrics.TCPConnections.WithLabelValues("http")) - metrics.TcpConnectionsLimit.WithLabelValues("http").Set(float64(cfg.HTTPConnLimit)) + metrics.TCPConnectionsLimit.WithLabelValues("http").Set(float64(cfg.HTTPConnLimit)) if cfg.HTTPConnLimit > 0 { httpListener = netutil.LimitListener(httpListener, cfg.HTTPConnLimit) } @@ -268,9 +271,9 @@ func newServer(cfg Config, metrics *Metrics) (*Server, error) { if err != nil { return nil, err } - grpcListener = middleware.CountingListener(grpcListener, metrics.TcpConnections.WithLabelValues("grpc")) + grpcListener = middleware.CountingListener(grpcListener, metrics.TCPConnections.WithLabelValues("grpc")) - metrics.TcpConnectionsLimit.WithLabelValues("grpc").Set(float64(cfg.GRPCConnLimit)) + metrics.TCPConnectionsLimit.WithLabelValues("grpc").Set(float64(cfg.GRPCConnLimit)) if cfg.GRPCConnLimit > 0 { grpcListener = netutil.LimitListener(grpcListener, cfg.GRPCConnLimit) } @@ -316,11 +319,11 @@ func newServer(cfg Config, metrics *Metrics) (*Server, error) { } } - log.WithField("http", httpListener.Addr()).WithField("grpc", grpcListener.Addr()).Infof("server listening on addresses") + logger.WithField("http", httpListener.Addr()).WithField("grpc", grpcListener.Addr()).Infof("server listening on addresses") // Setup gRPC server serverLog := middleware.GRPCServerLog{ - Log: log, + Log: logger, WithRequest: !cfg.ExcludeRequestInLog, DisableRequestSuccessLog: cfg.DisableRequestSuccessLog, } @@ -371,7 +374,7 @@ func newServer(cfg Config, metrics *Metrics) (*Server, error) { grpcOptions = append(grpcOptions, grpc.Creds(grpcCreds)) } grpcServer := grpc.NewServer(grpcOptions...) - grpcOnHttpServer := grpc.NewServer(grpcOptions...) + grpcOnHTTPServer := grpc.NewServer(grpcOptions...) // Setup HTTP server var router *mux.Router @@ -397,7 +400,7 @@ func newServer(cfg Config, metrics *Metrics) (*Server, error) { } } - defaultLogMiddleware := middleware.NewLogMiddleware(log, cfg.LogRequestHeaders, cfg.LogRequestAtInfoLevel, sourceIPs, strings.Split(cfg.LogRequestExcludeHeadersList, ",")) + defaultLogMiddleware := middleware.NewLogMiddleware(logger, cfg.LogRequestHeaders, cfg.LogRequestAtInfoLevel, sourceIPs, strings.Split(cfg.LogRequestExcludeHeadersList, ",")) defaultLogMiddleware.DisableRequestSuccessLog = cfg.DisableRequestSuccessLog defaultHTTPMiddleware := []middleware.Interface{ @@ -433,7 +436,7 @@ func newServer(cfg Config, metrics *Metrics) (*Server, error) { handler := cfg.SignalHandler if handler == nil { - handler = signals.NewHandler(log) + handler = signals.NewHandler(logger) } return &Server{ @@ -447,8 +450,8 @@ func newServer(cfg Config, metrics *Metrics) (*Server, error) { HTTP: router, HTTPServer: httpServer, GRPC: grpcServer, - GRPCOnHTTPServer: grpcOnHttpServer, - Log: log, + GRPCOnHTTPServer: grpcOnHTTPServer, + Log: logger, Registerer: cfg.registererOrDefault(), Gatherer: gatherer, }, nil @@ -555,6 +558,6 @@ func (s *Server) Shutdown() { ctx, cancel := context.WithTimeout(context.Background(), s.cfg.ServerGracefulShutdownTimeout) defer cancel() // releases resources if httpServer.Shutdown completes before timeout elapses - s.HTTPServer.Shutdown(ctx) + _ = s.HTTPServer.Shutdown(ctx) s.GRPC.GracefulStop() } diff --git a/vendor/github.com/weaveworks/common/server/tls_config.go b/vendor/github.com/grafana/dskit/server/tls_config.go similarity index 87% rename from vendor/github.com/weaveworks/common/server/tls_config.go rename to vendor/github.com/grafana/dskit/server/tls_config.go index b374a67c41b..128c6d04f05 100644 --- a/vendor/github.com/weaveworks/common/server/tls_config.go +++ b/vendor/github.com/grafana/dskit/server/tls_config.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/server/tls_config.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package server import ( diff --git a/vendor/github.com/weaveworks/common/signals/signals.go b/vendor/github.com/grafana/dskit/signals/signals.go similarity index 78% rename from vendor/github.com/weaveworks/common/signals/signals.go rename to vendor/github.com/grafana/dskit/signals/signals.go index 29d45fc8980..75609a745e6 100644 --- a/vendor/github.com/weaveworks/common/signals/signals.go +++ b/vendor/github.com/grafana/dskit/signals/signals.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/signals/signals.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package signals import ( @@ -6,7 +10,7 @@ import ( "runtime" "syscall" - "github.com/weaveworks/common/logging" + "github.com/grafana/dskit/log" ) // SignalReceiver represents a subsystem/server/... that can be stopped or @@ -19,13 +23,13 @@ type SignalReceiver interface { // On SIGINT or SIGTERM it will exit, on SIGQUIT it // will dump goroutine stacks to the Logger. type Handler struct { - log logging.Interface + log log.Interface receivers []SignalReceiver quit chan struct{} } // NewHandler makes a new Handler. -func NewHandler(log logging.Interface, receivers ...SignalReceiver) *Handler { +func NewHandler(log log.Interface, receivers ...SignalReceiver) *Handler { return &Handler{ log: log, receivers: receivers, @@ -54,7 +58,7 @@ func (h *Handler) Loop() { case syscall.SIGINT, syscall.SIGTERM: h.log.Infof("=== received SIGINT/SIGTERM ===\n*** exiting") for _, subsystem := range h.receivers { - subsystem.Stop() + _ = subsystem.Stop() } return case syscall.SIGQUIT: @@ -68,6 +72,6 @@ func (h *Handler) Loop() { // SignalHandlerLoop blocks until it receives a SIGINT, SIGTERM or SIGQUIT. // For SIGINT and SIGTERM, it exits; for SIGQUIT is print a goroutine stack // dump. -func SignalHandlerLoop(log logging.Interface, ss ...SignalReceiver) { +func SignalHandlerLoop(log log.Interface, ss ...SignalReceiver) { NewHandler(log, ss...).Loop() } diff --git a/vendor/github.com/grafana/dskit/spanlogger/spanlogger.go b/vendor/github.com/grafana/dskit/spanlogger/spanlogger.go index 7a7a4fb75b5..9a063e0a4dc 100644 --- a/vendor/github.com/grafana/dskit/spanlogger/spanlogger.go +++ b/vendor/github.com/grafana/dskit/spanlogger/spanlogger.go @@ -8,7 +8,8 @@ import ( opentracing "github.com/opentracing/opentracing-go" "github.com/opentracing/opentracing-go/ext" otlog "github.com/opentracing/opentracing-go/log" - "github.com/weaveworks/common/tracing" + + "github.com/grafana/dskit/tracing" ) type loggerCtxMarker struct{} diff --git a/vendor/github.com/grafana/dskit/tenant/resolver.go b/vendor/github.com/grafana/dskit/tenant/resolver.go index f0fd8abfea7..aa19d75bb4a 100644 --- a/vendor/github.com/grafana/dskit/tenant/resolver.go +++ b/vendor/github.com/grafana/dskit/tenant/resolver.go @@ -6,7 +6,7 @@ import ( "net/http" "strings" - "github.com/weaveworks/common/user" + "github.com/grafana/dskit/user" ) var defaultResolver Resolver = NewSingleResolver() diff --git a/vendor/github.com/grafana/dskit/tenant/tenant.go b/vendor/github.com/grafana/dskit/tenant/tenant.go index c7c772648c5..a5807500e52 100644 --- a/vendor/github.com/grafana/dskit/tenant/tenant.go +++ b/vendor/github.com/grafana/dskit/tenant/tenant.go @@ -7,7 +7,7 @@ import ( "sort" "strings" - "github.com/weaveworks/common/user" + "github.com/grafana/dskit/user" ) var ( diff --git a/vendor/github.com/weaveworks/common/tracing/tracing.go b/vendor/github.com/grafana/dskit/tracing/tracing.go similarity index 92% rename from vendor/github.com/weaveworks/common/tracing/tracing.go rename to vendor/github.com/grafana/dskit/tracing/tracing.go index 55fdfde972f..66b3a3cef4c 100644 --- a/vendor/github.com/weaveworks/common/tracing/tracing.go +++ b/vendor/github.com/grafana/dskit/tracing/tracing.go @@ -1,3 +1,7 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/tracing/tracing.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package tracing import ( diff --git a/vendor/github.com/weaveworks/common/user/grpc.go b/vendor/github.com/grafana/dskit/user/grpc.go similarity index 85% rename from vendor/github.com/weaveworks/common/user/grpc.go rename to vendor/github.com/grafana/dskit/user/grpc.go index 64f0491a85b..201b835eeab 100644 --- a/vendor/github.com/weaveworks/common/user/grpc.go +++ b/vendor/github.com/grafana/dskit/user/grpc.go @@ -1,7 +1,12 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/user/grpc.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package user import ( - "golang.org/x/net/context" + "context" + "google.golang.org/grpc/metadata" ) diff --git a/vendor/github.com/weaveworks/common/user/http.go b/vendor/github.com/grafana/dskit/user/http.go similarity index 91% rename from vendor/github.com/weaveworks/common/user/http.go rename to vendor/github.com/grafana/dskit/user/http.go index c15fd4106d5..ca015b36de3 100644 --- a/vendor/github.com/weaveworks/common/user/http.go +++ b/vendor/github.com/grafana/dskit/user/http.go @@ -1,9 +1,12 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/user/http.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package user import ( + "context" "net/http" - - "golang.org/x/net/context" ) const ( diff --git a/vendor/github.com/weaveworks/common/user/id.go b/vendor/github.com/grafana/dskit/user/id.go similarity index 86% rename from vendor/github.com/weaveworks/common/user/id.go rename to vendor/github.com/grafana/dskit/user/id.go index a1f91f0c1f0..2396787c28c 100644 --- a/vendor/github.com/weaveworks/common/user/id.go +++ b/vendor/github.com/grafana/dskit/user/id.go @@ -1,9 +1,13 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/user/id.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package user import ( - "golang.org/x/net/context" + "context" - "github.com/weaveworks/common/errors" + "github.com/grafana/dskit/errors" ) type contextKey int diff --git a/vendor/github.com/weaveworks/common/user/logging.go b/vendor/github.com/grafana/dskit/user/logging.go similarity index 50% rename from vendor/github.com/weaveworks/common/user/logging.go rename to vendor/github.com/grafana/dskit/user/logging.go index b873945be36..0db1946c864 100644 --- a/vendor/github.com/weaveworks/common/user/logging.go +++ b/vendor/github.com/grafana/dskit/user/logging.go @@ -1,13 +1,17 @@ +// Provenance-includes-location: https://github.com/weaveworks/common/blob/main/user/logging.go +// Provenance-includes-license: Apache-2.0 +// Provenance-includes-copyright: Weaveworks Ltd. + package user import ( - "golang.org/x/net/context" + "context" - "github.com/weaveworks/common/logging" + "github.com/grafana/dskit/log" ) // LogWith returns user and org information from the context as log fields. -func LogWith(ctx context.Context, log logging.Interface) logging.Interface { +func LogWith(ctx context.Context, log log.Interface) log.Interface { userID, err := ExtractUserID(ctx) if err == nil { log = log.WithField("userID", userID) diff --git a/vendor/github.com/weaveworks/common/COPYING.LGPL-3 b/vendor/github.com/weaveworks/common/COPYING.LGPL-3 deleted file mode 100644 index 89c7d69ec7c..00000000000 --- a/vendor/github.com/weaveworks/common/COPYING.LGPL-3 +++ /dev/null @@ -1,175 +0,0 @@ -./tools/integration/assert.sh is a copy of - - https://github.com/lehmannro/assert.sh/blob/master/assert.sh - -Since it was imported from its original source, it has only received -cosmetic modifications. As it is licensed under the LGPL-3, here's the -license text in its entirety: - - - - GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - - This version of the GNU Lesser General Public License incorporates -the terms and conditions of version 3 of the GNU General Public -License, supplemented by the additional permissions listed below. - - 0. Additional Definitions. - - As used herein, "this License" refers to version 3 of the GNU Lesser -General Public License, and the "GNU GPL" refers to version 3 of the GNU -General Public License. - - "The Library" refers to a covered work governed by this License, -other than an Application or a Combined Work as defined below. - - An "Application" is any work that makes use of an interface provided -by the Library, but which is not otherwise based on the Library. -Defining a subclass of a class defined by the Library is deemed a mode -of using an interface provided by the Library. - - A "Combined Work" is a work produced by combining or linking an -Application with the Library. The particular version of the Library -with which the Combined Work was made is also called the "Linked -Version". - - The "Minimal Corresponding Source" for a Combined Work means the -Corresponding Source for the Combined Work, excluding any source code -for portions of the Combined Work that, considered in isolation, are -based on the Application, and not on the Linked Version. - - The "Corresponding Application Code" for a Combined Work means the -object code and/or source code for the Application, including any data -and utility programs needed for reproducing the Combined Work from the -Application, but excluding the System Libraries of the Combined Work. - - 1. Exception to Section 3 of the GNU GPL. - - You may convey a covered work under sections 3 and 4 of this License -without being bound by section 3 of the GNU GPL. - - 2. Conveying Modified Versions. - - If you modify a copy of the Library, and, in your modifications, a -facility refers to a function or data to be supplied by an Application -that uses the facility (other than as an argument passed when the -facility is invoked), then you may convey a copy of the modified -version: - - a) under this License, provided that you make a good faith effort to - ensure that, in the event an Application does not supply the - function or data, the facility still operates, and performs - whatever part of its purpose remains meaningful, or - - b) under the GNU GPL, with none of the additional permissions of - this License applicable to that copy. - - 3. Object Code Incorporating Material from Library Header Files. - - The object code form of an Application may incorporate material from -a header file that is part of the Library. You may convey such object -code under terms of your choice, provided that, if the incorporated -material is not limited to numerical parameters, data structure -layouts and accessors, or small macros, inline functions and templates -(ten or fewer lines in length), you do both of the following: - - a) Give prominent notice with each copy of the object code that the - Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the object code with a copy of the GNU GPL and this license - document. - - 4. Combined Works. - - You may convey a Combined Work under terms of your choice that, -taken together, effectively do not restrict modification of the -portions of the Library contained in the Combined Work and reverse -engineering for debugging such modifications, if you also do each of -the following: - - a) Give prominent notice with each copy of the Combined Work that - the Library is used in it and that the Library and its use are - covered by this License. - - b) Accompany the Combined Work with a copy of the GNU GPL and this license - document. - - c) For a Combined Work that displays copyright notices during - execution, include the copyright notice for the Library among - these notices, as well as a reference directing the user to the - copies of the GNU GPL and this license document. - - d) Do one of the following: - - 0) Convey the Minimal Corresponding Source under the terms of this - License, and the Corresponding Application Code in a form - suitable for, and under terms that permit, the user to - recombine or relink the Application with a modified version of - the Linked Version to produce a modified Combined Work, in the - manner specified by section 6 of the GNU GPL for conveying - Corresponding Source. - - 1) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (a) uses at run time - a copy of the Library already present on the user's computer - system, and (b) will operate properly with a modified version - of the Library that is interface-compatible with the Linked - Version. - - e) Provide Installation Information, but only if you would otherwise - be required to provide such information under section 6 of the - GNU GPL, and only to the extent that such information is - necessary to install and execute a modified version of the - Combined Work produced by recombining or relinking the - Application with a modified version of the Linked Version. (If - you use option 4d0, the Installation Information must accompany - the Minimal Corresponding Source and Corresponding Application - Code. If you use option 4d1, you must provide the Installation - Information in the manner specified by section 6 of the GNU GPL - for conveying Corresponding Source.) - - 5. Combined Libraries. - - You may place library facilities that are a work based on the -Library side by side in a single library together with other library -facilities that are not Applications and are not covered by this -License, and convey such a combined library under terms of your -choice, if you do both of the following: - - a) Accompany the combined library with a copy of the same work based - on the Library, uncombined with any other library facilities, - conveyed under the terms of this License. - - b) Give prominent notice with the combined library that part of it - is a work based on the Library, and explaining where to find the - accompanying uncombined form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - - The Free Software Foundation may publish revised and/or new versions -of the GNU Lesser General Public License from time to time. Such new -versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the -Library as you received it specifies that a certain numbered version -of the GNU Lesser General Public License "or any later version" -applies to it, you have the option of following the terms and -conditions either of that published version or of any later version -published by the Free Software Foundation. If the Library as you -received it does not specify a version number of the GNU Lesser -General Public License, you may choose any version of the GNU Lesser -General Public License ever published by the Free Software Foundation. - - If the Library as you received it specifies that a proxy can decide -whether future versions of the GNU Lesser General Public License shall -apply, that proxy's public statement of acceptance of any version is -permanent authorization for you to choose that version for the -Library. diff --git a/vendor/github.com/weaveworks/common/LICENSE b/vendor/github.com/weaveworks/common/LICENSE deleted file mode 100644 index a710357f3b0..00000000000 --- a/vendor/github.com/weaveworks/common/LICENSE +++ /dev/null @@ -1,191 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - Copyright 2014-2016 Weaveworks Ltd. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/github.com/weaveworks/common/NOTICE b/vendor/github.com/weaveworks/common/NOTICE deleted file mode 100644 index 4c34873a360..00000000000 --- a/vendor/github.com/weaveworks/common/NOTICE +++ /dev/null @@ -1,3 +0,0 @@ -Weave -Copyright 2016 Weaveworks Ltd. -This product includes software developed at Weaveworks Ltd. diff --git a/vendor/github.com/weaveworks/common/errors/error.go b/vendor/github.com/weaveworks/common/errors/error.go deleted file mode 100644 index 6d1f9799553..00000000000 --- a/vendor/github.com/weaveworks/common/errors/error.go +++ /dev/null @@ -1,6 +0,0 @@ -package errors - -// Error see https://dave.cheney.net/2016/04/07/constant-errors. -type Error string - -func (e Error) Error() string { return string(e) } diff --git a/vendor/github.com/weaveworks/common/httpgrpc/tools.go b/vendor/github.com/weaveworks/common/httpgrpc/tools.go deleted file mode 100644 index 866af4b6975..00000000000 --- a/vendor/github.com/weaveworks/common/httpgrpc/tools.go +++ /dev/null @@ -1,6 +0,0 @@ -package httpgrpc - -import ( - // This is a workaround for go mod which fails to download gogoproto otherwise - _ "github.com/gogo/protobuf/gogoproto" -) diff --git a/vendor/github.com/weaveworks/common/logging/noop.go b/vendor/github.com/weaveworks/common/logging/noop.go deleted file mode 100644 index 8b7201ca948..00000000000 --- a/vendor/github.com/weaveworks/common/logging/noop.go +++ /dev/null @@ -1,23 +0,0 @@ -package logging - -// Noop logger. -func Noop() Interface { - return noop{} -} - -type noop struct{} - -func (noop) Debugf(format string, args ...interface{}) {} -func (noop) Debugln(args ...interface{}) {} -func (noop) Infof(format string, args ...interface{}) {} -func (noop) Infoln(args ...interface{}) {} -func (noop) Warnf(format string, args ...interface{}) {} -func (noop) Warnln(args ...interface{}) {} -func (noop) Errorf(format string, args ...interface{}) {} -func (noop) Errorln(args ...interface{}) {} -func (noop) WithField(key string, value interface{}) Interface { - return noop{} -} -func (noop) WithFields(Fields) Interface { - return noop{} -} diff --git a/vendor/modules.txt b/vendor/modules.txt index 427c500180a..5c36d9bd743 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -556,7 +556,7 @@ github.com/gosimple/slug # github.com/grafana-tools/sdk v0.0.0-20211220201350-966b3088eec9 ## explicit; go 1.13 github.com/grafana-tools/sdk -# github.com/grafana/dskit v0.0.0-20230731140248-b62b4b2ca7b2 +# github.com/grafana/dskit v0.0.0-20230804003603-740f56bd2934 ## explicit; go 1.18 github.com/grafana/dskit/backoff github.com/grafana/dskit/cache @@ -565,11 +565,15 @@ github.com/grafana/dskit/crypto/tls github.com/grafana/dskit/dns github.com/grafana/dskit/dns/godns github.com/grafana/dskit/dns/miekgdns +github.com/grafana/dskit/errors github.com/grafana/dskit/flagext github.com/grafana/dskit/gate github.com/grafana/dskit/grpcclient github.com/grafana/dskit/grpcencoding/snappy github.com/grafana/dskit/grpcutil +github.com/grafana/dskit/httpgrpc +github.com/grafana/dskit/httpgrpc/server +github.com/grafana/dskit/instrument github.com/grafana/dskit/internal/math github.com/grafana/dskit/internal/slices github.com/grafana/dskit/kv @@ -581,7 +585,9 @@ github.com/grafana/dskit/limiter github.com/grafana/dskit/log github.com/grafana/dskit/loser github.com/grafana/dskit/metrics +github.com/grafana/dskit/middleware github.com/grafana/dskit/modules +github.com/grafana/dskit/mtime github.com/grafana/dskit/multierror github.com/grafana/dskit/netutil github.com/grafana/dskit/promregistry @@ -590,10 +596,14 @@ github.com/grafana/dskit/ring/client github.com/grafana/dskit/ring/shard github.com/grafana/dskit/runtimeconfig github.com/grafana/dskit/runutil +github.com/grafana/dskit/server github.com/grafana/dskit/services +github.com/grafana/dskit/signals github.com/grafana/dskit/spanlogger github.com/grafana/dskit/tenant github.com/grafana/dskit/test +github.com/grafana/dskit/tracing +github.com/grafana/dskit/user # github.com/grafana/e2e v0.1.1-0.20230221201045-21ebba73580b ## explicit; go 1.17 github.com/grafana/e2e @@ -1025,20 +1035,6 @@ github.com/uber/jaeger-client-go/utils ## explicit github.com/uber/jaeger-lib/metrics github.com/uber/jaeger-lib/metrics/prometheus -# github.com/weaveworks/common v0.0.0-20230728070032-dd9e68f319d5 -## explicit; go 1.14 -github.com/weaveworks/common/errors -github.com/weaveworks/common/grpc -github.com/weaveworks/common/httpgrpc -github.com/weaveworks/common/httpgrpc/server -github.com/weaveworks/common/instrument -github.com/weaveworks/common/logging -github.com/weaveworks/common/middleware -github.com/weaveworks/common/mtime -github.com/weaveworks/common/server -github.com/weaveworks/common/signals -github.com/weaveworks/common/tracing -github.com/weaveworks/common/user # github.com/weaveworks/promrus v1.2.0 ## explicit github.com/weaveworks/promrus