chore: backport Prometheus v0.311.3 dependency upgrade (#7298) to release-v2.9 - #7338
Merged
zhxiaogg merged 6 commits intoJun 1, 2026
Merged
Conversation
…a#5671) * Bump github.com/prometheus/prometheus from 0.304.2 to 0.306.0 Bumps [github.com/prometheus/prometheus](https://github.com/prometheus/prometheus) from 0.304.2 to 0.306.0. - [Release notes](https://github.com/prometheus/prometheus/releases) - [Changelog](https://github.com/prometheus/prometheus/blob/main/CHANGELOG.md) - [Commits](prometheus/prometheus@v0.304.2...v0.306.0) --- updated-dependencies: - dependency-name: github.com/prometheus/prometheus dependency-version: 0.306.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * fix label handling * cleanup --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: javiermolinar <javimolina@fastmail.com> (cherry picked from commit 3c9b138)
…el to v1.44.0 (grafana#5810) * Update Prometheus to v0.307.2 * Update otel collector * Update OTel collector (cherry picked from commit 6f38295)
* chore: update otel deps to v1.52 * return empty map for getExtensions * add otelProtomesage to gogocodec * revert changes in the tools module caused by Codex (cherry picked from commit 8b16fbe)
… [security] (main) (grafana#6954) * fix(deps): update module github.com/prometheus/prometheus to v0.311.2 [security] | datasource | package | from | to | | ---------- | -------------------------------- | -------- | -------- | | go | github.com/prometheus/prometheus | v0.307.3 | v0.311.2 | Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com> * fix: sync vendor for prometheus v0.311.2 security update - Run go mod vendor to sync vendor directory with new prometheus version - Fix modules/generator/storage/instance.go: replace removed tsdb/errors.NewMulti with stdlib errors.Join - Fix modules/generator/registry/errors.go: remove ErrOutOfOrderCT and ErrCTNewerThanSample which were removed in prometheus v0.311.2 - Update grafana/e2e to v0.1.2-0.20260309174126-b5393d4e610f (removes tsdb/errors dependency) - Upgrade go-openapi/swag ecosystem to v0.26.0 for testify/v2 compat - Several indirect dep bumps pulled in by the above updates Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: add promqltest testdata files excluded by .gitignore The root .gitignore has *.test which caused go mod vendor's promqltest/testdata/*.test files to be omitted from the commit. These files are needed at compile time by //go:embed testdata in promqltest/test.go. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix test API breaks from prometheus v0.311.2 upgrade - Replace removed relabel.Process with relabel.ProcessBuilder in config_util_test.go - Update TestShouldMemoize expectation for .*bar.*foo.*: prometheus v0.311.2 now uses a stringMatcher for this pattern, so shouldMemoize correctly returns false Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix: implement AppendSTZeroSample/AppendHistogramSTZeroSample in test appenders New methods added to storage.Appender interface in prometheus v0.311.2. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> --------- Signed-off-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com> Co-authored-by: renovate-sh-app[bot] <219655108+renovate-sh-app[bot]@users.noreply.github.com> Co-authored-by: Zach Leslie <zach.leslie@grafana.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> (cherry picked from commit 6f3d617)
The update is large because v0.311.3 contains a breaking change in the removal of tsdb/errors, which required updating dskit and other transitive dependencies as well. (cherry picked from commit 133ebb2)
zhxiaogg
force-pushed
the
backport-7298-to-release-v2.9
branch
5 times, most recently
from
June 1, 2026 18:30
e628232 to
aba3e5d
Compare
…v0.311.3 Pins the Prometheus/OTel cluster on the v2.9 baseline (unrelated deps and v2.9 security versions kept), and applies the API adaptations the upgrade requires that the v2.9 line never received: - integration/util: configoptional QueueConfig; drop v2.10-only harness file - modules/cache: use go-kit/log/level (drop removed statsd_exporter/pkg/level) - migrate github.com/uber-go/atomic -> go.uber.org/atomic - pin willf/bitset to v1.1.11 (newer versions renamed the module path) - regenerate manifest.md, add CHANGELOG entry
zhxiaogg
force-pushed
the
backport-7298-to-release-v2.9
branch
from
June 1, 2026 19:08
aba3e5d to
3158619
Compare
zhxiaogg
marked this pull request as ready for review
June 1, 2026 19:55
zhxiaogg
requested review from
carles-grafana,
electron0zero,
ie-pham,
javiermolinar,
joe-elliott,
knylander-grafana,
mapno,
mattdurham,
mdisibio,
ruslan-mikhailov,
stoewer,
yvrhdn and
zalegrala
as code owners
June 1, 2026 19:55
ie-pham
approved these changes
Jun 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does:
Backports the Prometheus v0.311.3 / OpenTelemetry dependency upgrade (PR #7298, the
release-v2.10backport of #7096) torelease-v2.9.release-v2.9was several Prometheus minor versions behind (v0.304.2), so a direct backport of #7096 alone does not build — it depends on the upstream chain that the v2.10 line already had. This PR bundles that chain, plus the prerequisite adaptations the v2.9 line never received.Dependency-upgrade chain (cherry-picked, one commit each):
labels.Labelsslice→struct migration)gogocodecadaptations)Prerequisite adaptations (folded into the final reconciliation commit), which pin the Prometheus/OTel cluster on the v2.9 baseline (keeping unrelated deps and v2.9 security versions) and apply upstream fixes the v2.9 line never received:
storage.Config.Validate()initializesNameValidationSchemeon relabel configs +watchOverridesretry fixstatsd_exporterdependency (usego-kit/log/level)github.com/uber-go/atomic→go.uber.org/atomicexpfmt.NewTextParser(model.UTF8Validation)(applied minimally)configoptionalqueue config, awillf/bitsetpin, and a regeneratedmanifest.mdWhich issue(s) this PR fixes:
N/A — dependency backport.
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]