Skip to content

chore: backport Prometheus v0.311.3 dependency upgrade (#7298) to release-v2.9 - #7338

Merged
zhxiaogg merged 6 commits into
grafana:release-v2.9from
zhxiaogg:backport-7298-to-release-v2.9
Jun 1, 2026
Merged

chore: backport Prometheus v0.311.3 dependency upgrade (#7298) to release-v2.9#7338
zhxiaogg merged 6 commits into
grafana:release-v2.9from
zhxiaogg:backport-7298-to-release-v2.9

Conversation

@zhxiaogg

@zhxiaogg zhxiaogg commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

What this PR does:

Backports the Prometheus v0.311.3 / OpenTelemetry dependency upgrade (PR #7298, the release-v2.10 backport of #7096) to release-v2.9.

release-v2.9 was 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):

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:

Which issue(s) this PR fixes:
N/A — dependency backport.

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

dependabot Bot and others added 5 commits June 1, 2026 10:09
…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
zhxiaogg force-pushed the backport-7298-to-release-v2.9 branch 5 times, most recently from e628232 to aba3e5d Compare June 1, 2026 18:30
…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
zhxiaogg force-pushed the backport-7298-to-release-v2.9 branch from aba3e5d to 3158619 Compare June 1, 2026 19:08
@zhxiaogg
zhxiaogg marked this pull request as ready for review June 1, 2026 19:55
@zhxiaogg zhxiaogg changed the title chore!: backport Prometheus v0.311.3 dependency upgrade (#7298) to release-v2.9 chore: backport Prometheus v0.311.3 dependency upgrade (#7298) to release-v2.9 Jun 1, 2026
@zhxiaogg
zhxiaogg merged commit a6365b4 into grafana:release-v2.9 Jun 1, 2026
26 checks passed
@zhxiaogg
zhxiaogg deleted the backport-7298-to-release-v2.9 branch June 1, 2026 20:12
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.

4 participants