Skip to content

fix(config-reloader): bump reloader to the streaming version. - #2278

Draft
bwplotka wants to merge 2 commits into
mainfrom
bump-thanos-2
Draft

fix(config-reloader): bump reloader to the streaming version.#2278
bwplotka wants to merge 2 commits into
mainfrom
bump-thanos-2

Conversation

@bwplotka

@bwplotka bwplotka commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Fixes: b/483390013

Pulls: thanos-io/thanos#9014

Benchmarks so far:

benchstat reloader.txt reloader-v2.txt                         
goos: darwin
goarch: arm64
pkg: github.com/GoogleCloudPlatform/prometheus-engine/cmd/config-reloader
cpu: Apple M4 Pro
                                                  │ reloader.txt  │           reloader-v2.txt           │
                                                  │    sec/op     │    sec/op     vs base               │
ConfigReloader_ReloadingWithoutChange/jobs=10-2     314.5µ ± 101%   302.6µ ± 70%        ~ (p=0.394 n=6)
ConfigReloader_ReloadingWithoutChange/jobs=100-2    660.3µ ±   5%   695.6µ ±  7%        ~ (p=0.093 n=6)
ConfigReloader_ReloadingWithoutChange/jobs=1000-2   5.216m ±  23%   4.506m ± 36%        ~ (p=0.394 n=6)
ConfigReloader_ReloadingWithoutChange/jobs=8500-2   29.04m ±  85%   21.92m ±  5%  -24.51% (p=0.002 n=6)
geomean                                             2.368m          2.135m         -9.83%

                                                  │         reloader.txt         │                   reloader-v2.txt                    │
                                                  │ compressed-config-size-bytes │ compressed-config-size-bytes  vs base                │
ConfigReloader_ReloadingWithoutChange/jobs=10-2                     1.864Ki ± 0%                   1.864Ki ± 0%       ~ (p=1.000 n=6) ¹
ConfigReloader_ReloadingWithoutChange/jobs=100-2                    12.09Ki ± 0%                   12.09Ki ± 0%       ~ (p=1.000 n=6) ¹
ConfigReloader_ReloadingWithoutChange/jobs=1000-2                   113.8Ki ± 0%                   113.8Ki ± 0%       ~ (p=1.000 n=6) ¹
ConfigReloader_ReloadingWithoutChange/jobs=8500-2                   961.7Ki ± 0%                   961.7Ki ± 0%       ~ (p=1.000 n=6) ¹
geomean                                                             39.63Ki                        39.63Ki       +0.00%
¹ all samples are equal

                                                  │   reloader.txt    │              reloader-v2.txt              │
                                                  │ config-size-bytes │ config-size-bytes  vs base                │
ConfigReloader_ReloadingWithoutChange/jobs=10-2          34.46Ki ± 0%        34.46Ki ± 0%       ~ (p=1.000 n=6) ¹
ConfigReloader_ReloadingWithoutChange/jobs=100-2         342.7Ki ± 0%        342.7Ki ± 0%       ~ (p=1.000 n=6) ¹
ConfigReloader_ReloadingWithoutChange/jobs=1000-2        3.345Mi ± 0%        3.345Mi ± 0%       ~ (p=1.000 n=6) ¹
ConfigReloader_ReloadingWithoutChange/jobs=8500-2        28.43Mi ± 0%        28.43Mi ± 0%       ~ (p=1.000 n=6) ¹
geomean                                                  1.017Mi             1.017Mi       +0.00%
¹ all samples are equal

                                                  │ reloader.txt │           reloader-v2.txt           │
                                                  │ scrape-jobs  │ scrape-jobs  vs base                │
ConfigReloader_ReloadingWithoutChange/jobs=10-2       10.00 ± 0%    10.00 ± 0%       ~ (p=1.000 n=6) ¹
ConfigReloader_ReloadingWithoutChange/jobs=100-2      100.0 ± 0%    100.0 ± 0%       ~ (p=1.000 n=6) ¹
ConfigReloader_ReloadingWithoutChange/jobs=1000-2    1.000k ± 0%   1.000k ± 0%       ~ (p=1.000 n=6) ¹
ConfigReloader_ReloadingWithoutChange/jobs=8500-2    8.500k ± 0%   8.500k ± 0%       ~ (p=1.000 n=6) ¹
geomean                                               303.6         303.6       +0.00%
¹ all samples are equal

                                                  │  reloader.txt   │           reloader-v2.txt           │
                                                  │      B/op       │     B/op      vs base               │
ConfigReloader_ReloadingWithoutChange/jobs=10-2        207.0Ki ± 0%   217.9Ki ± 0%   +5.31% (p=0.002 n=6)
ConfigReloader_ReloadingWithoutChange/jobs=100-2      1139.5Ki ± 0%   218.8Ki ± 0%  -80.80% (p=0.002 n=6)
ConfigReloader_ReloadingWithoutChange/jobs=1000-2    10859.0Ki ± 0%   219.0Ki ± 0%  -97.98% (p=0.002 n=6)
ConfigReloader_ReloadingWithoutChange/jobs=8500-2   101950.0Ki ± 0%   220.7Ki ± 0%  -99.78% (p=0.002 n=6)
geomean                                                3.925Mi        219.1Ki       -94.55%

                                                  │ reloader.txt │          reloader-v2.txt          │
                                                  │  allocs/op   │ allocs/op   vs base               │
ConfigReloader_ReloadingWithoutChange/jobs=10-2       88.00 ± 0%   74.00 ± 0%  -15.91% (p=0.002 n=6)
ConfigReloader_ReloadingWithoutChange/jobs=100-2      99.50 ± 1%   80.00 ± 0%  -19.60% (p=0.002 n=6)
ConfigReloader_ReloadingWithoutChange/jobs=1000-2    112.00 ± 0%   80.00 ± 0%  -28.57% (p=0.002 n=6)
ConfigReloader_ReloadingWithoutChange/jobs=8500-2     203.0 ± 0%   164.0 ± 0%  -19.21% (p=0.002 n=6)
geomean                                               118.8        93.88       -20.97%

Context: b/483390013
Signed-off-by: bwplotka <bwplotka@google.com>
Signed-off-by: bwplotka <bwplotka@google.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Go version to 1.26.0 and upgrades multiple dependencies in go.mod and go.sum, including Kubernetes libraries, Prometheus components, and AWS SDKs. Feedback on the changes highlights an issue where the upgrade of github.com/prometheus/client_golang to v1.23.2 is negated by a replace directive pinning it to v1.23.0, which should be updated to match the upgraded version.

Comment thread go.mod
Comment on lines +210 to +211
// client_golang has to be pinned due to common pinning.
github.com/prometheus/client_golang => github.com/prometheus/client_golang v1.23.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The replace directive pins github.com/prometheus/client_golang to v1.23.0, which overrides and negates the upgrade to v1.23.2 specified in the require block (line 21). To ensure the upgraded version is actually used, the replace directive should be updated to v1.23.2 (or removed if the pin is no longer necessary).

	// client_golang has to be pinned due to common pinning.
	github.com/prometheus/client_golang => github.com/prometheus/client_golang v1.23.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant