From c046c08792ff16001877c97001b9935a40496cee Mon Sep 17 00:00:00 2001 From: Andrew Seigner Date: Tue, 7 Dec 2021 11:41:03 -0800 Subject: [PATCH 1/3] bjstore/azure: Only create an http client once (#4928) `getContainerURL` was creating a new `http.Client` within `HTTPSender`. This increased memory pressure on components making requests to Azure. Move `http.Client` creation out of `HTTPSender`, only creating it once per call to `getContainerURL`. Signed-off-by: Andrew Seigner --- CHANGELOG.md | 1 + pkg/objstore/azure/helpers.go | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6548c3636..b05c8b0c67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re - [#4777](https://github.com/thanos-io/thanos/pull/4777) Query: Fix data race in exemplars server. - [#4811](https://github.com/thanos-io/thanos/pull/4811) Query: Fix data race in metadata, rules, and targets servers. - [#4795](https://github.com/thanos-io/thanos/pull/4795) Query: Fix deadlock in endpointset. +- [#4928](https://github.com/thanos-io/thanos/pull/4928) Azure: Only create an http client once, to conserve memory. ### Changed diff --git a/pkg/objstore/azure/helpers.go b/pkg/objstore/azure/helpers.go index ce24564241..0edd448ada 100644 --- a/pkg/objstore/azure/helpers.go +++ b/pkg/objstore/azure/helpers.go @@ -104,6 +104,10 @@ func getContainerURL(ctx context.Context, logger log.Logger, conf Config) (blob. retryOptions.TryTimeout = time.Until(deadline) } + client := http.Client{ + Transport: DefaultTransport(conf), + } + p := blob.NewPipeline(credentials, blob.PipelineOptions{ Retry: retryOptions, Telemetry: blob.TelemetryOptions{Value: "Thanos"}, @@ -117,10 +121,6 @@ func getContainerURL(ctx context.Context, logger log.Logger, conf Config) (blob. }, HTTPSender: pipeline.FactoryFunc(func(next pipeline.Policy, po *pipeline.PolicyOptions) pipeline.PolicyFunc { return func(ctx context.Context, request pipeline.Request) (pipeline.Response, error) { - client := http.Client{ - Transport: DefaultTransport(conf), - } - resp, err := client.Do(request.WithContext(ctx)) return pipeline.NewHTTPResponse(resp), err From 74a30094cc37cf3ce51f2f347dcffcd6f124d49b Mon Sep 17 00:00:00 2001 From: Bartlomiej Plotka Date: Wed, 8 Dec 2021 21:56:07 +0100 Subject: [PATCH 2/3] Updated busybox. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bartlomiej Plotka Signed-off-by: Lucas Servén Marín --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index c01c3e4e4e..9f4ceb6030 100644 --- a/Makefile +++ b/Makefile @@ -11,13 +11,13 @@ arch = $(shell uname -m) # Run `DOCKER_CLI_EXPERIMENTAL=enabled docker manifest inspect quay.io/prometheus/busybox:latest` to get SHA or # just visit https://quay.io/repository/prometheus/busybox?tag=latest&tab=tags. # TODO(bwplotka): Pinning is important but somehow quay kills the old images, so make sure to update regularly. -# Update at 2021.6.07 +# Update at 2021.12.08 ifeq ($(arch), x86_64) # amd64 - BASE_DOCKER_SHA="de4af55df1f648a334e16437c550a2907e0aed4f0b0edf454b0b215a9349bdbb" + BASE_DOCKER_SHA="97a9aacc097e5dbdec33b0d671adea0785e76d26ff2b979ee28570baf6a9155d" else ifeq ($(arch), armv8) # arm64 - BASE_DOCKER_SHA="5591971699f6cf8abf6776495385e9d62751111a8cba56bf4946cf1d0de425ed" + BASE_DOCKER_SHA="5feb736d32e5b57f4944691d00b581f1f9192b3732cab03e3b6034cf0d1c8f2c" else echo >&2 "only support amd64 or arm64 arch" && exit 1 endif From 65eef5eb29e2792c728eb3ffb64709219b74f3da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucas=20Serv=C3=A9n=20Mar=C3=ADn?= Date: Thu, 9 Dec 2021 00:51:48 +0100 Subject: [PATCH 3/3] cut 0.24.0-rc.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lucas Servén Marín --- CHANGELOG.md | 4 +++- VERSION | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b05c8b0c67..23fa84af16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,12 +12,13 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re ## v0.24.0 - In Progress -## [v0.24.0-rc.0](https://github.com/thanos-io/thanos/tree/release-0.24) - 2021.11.28 +## [v0.24.0-rc.1](https://github.com/thanos-io/thanos/tree/release-0.24) - 2021.12.09 ### Added - [#4228](https://github.com/thanos-io/thanos/pull/4228) Tools `thanos bucket inspect`: Add flag `--output` to provide output method (table,csv,tsv). - [#4282](https://github.com/thanos-io/thanos/pull/4282) Query: *breaking :warning:* Add `--endpoint` flag to the querier. The `--store` flag will eventually be replaced. +- [#4636](https://github.com/thanos-io/thanos/pull/4636) Azure: Support authentication using user-assigned managed identity - [#4680](https://github.com/thanos-io/thanos/pull/4680) Query: Add `exemplar.partial-response` flag to control partial response. - [#4679](https://github.com/thanos-io/thanos/pull/4679) Query: Add `enable-feature` flag to enable negative offsets and `@` modifier, similar to Prometheus. - [#4696](https://github.com/thanos-io/thanos/pull/4696) Query: Add cache name to tracing spans. @@ -30,6 +31,7 @@ We use *breaking :warning:* to mark changes that are not backward compatible (re - [#4731](https://github.com/thanos-io/thanos/pull/4731) Rule: Add stateless mode to ruler. - [#4612](https://github.com/thanos-io/thanos/pull/4612) Sidecar: Add `--prometheus.http-client` and `--prometheus.http-client-file` flag for sidecar to connect to Prometheus with basic auth or TLS. - [#4847](https://github.com/thanos-io/thanos/pull/4847) Query: Add `--alert.query-url` which is used in the UI for rules/alerts pages. By default the HTTP listen address is used for this URL. +- [#4848](https://github.com/thanos-io/thanos/pull/4848) Compactor: added Prometheus metric for tracking the progress of retention. - [#4856](https://github.com/thanos-io/thanos/pull/4856) Mixin: Add Query Frontend to Grafana dashboard. - [#4874](https://github.com/thanos-io/thanos/pull/4874) Query: Add `--endpoint-strict` flag to statically configure Thanos API server endpoints. It is similar to `--store-strict` but supports passing any Thanos gRPC APIs: StoreAPI, MetadataAPI, RulesAPI, TargetsAPI and ExemplarsAPI. - [#4868](https://github.com/thanos-io/thanos/pull/4868) Rule: Support ruleGroup limit introduced by Prometheus v2.31.0. diff --git a/VERSION b/VERSION index d8a268eea8..96e0a313b7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.24.0-rc.0 +0.24.0-rc.1