Skip to content

Bump prometheus/prometheus to v0.312.0 and cascading dependencies#395

Merged
sky333999 merged 1 commit into
mainfrom
sky333999/bump-prometheus-v0.312
Jul 8, 2026
Merged

Bump prometheus/prometheus to v0.312.0 and cascading dependencies#395
sky333999 merged 1 commit into
mainfrom
sky333999/bump-prometheus-v0.312

Conversation

@sky333999

@sky333999 sky333999 commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Description of changes

Bumps github.com/prometheus/prometheus from v0.311.3 to v0.312.0, along with the cascading dependency bumps required for it to compile.

Dep From To
github.com/prometheus/prometheus v0.311.3 v0.312.0
github.com/prometheus-operator/prometheus-operator (+ pkg/apis/monitoring, pkg/client) v0.91.0 v0.92.0
k8s.io/{api, apiextensions-apiserver, apimachinery, client-go, component-base, kubectl} v0.35.4 v0.36.2
sigs.k8s.io/controller-runtime v0.23.3 v0.24.1

prometheus-operator v0.92.0 is required because Prometheus v0.312.0 added a *slog.Logger parameter to rulefmt.Parse which older prometheus-operator releases don't pass. Everything else cascades from there.

Source changes

Prometheus v0.312.0 changed the discovery.NewManager signature:

  • Before: NewManager(ctx, logger, registry, sdMetrics map[string]DiscovererMetrics)nil accepted
  • After: NewManager(ctx, logger, registry, sdMetrics *SDMetrics)nil panics at runtime

Updated four call sites (main.go, three sites in target/discovery_test.go) to construct and pass *SDMetrics via discovery.CreateAndRegisterSDMetrics(registry), matching the upstream otel-allocator pattern.

Note on regenerated files

Running make manifests against the newer controller-runtime and k8s.io deps produces cosmetic reformatting in config/rbac/role.yaml (rules with identical verbs consolidated into one block) and in apis/v*/zz_generated.deepcopy.go (import alias formatting).

Testing

  • go vet ./... — clean
  • go build ./... — clean
  • make manager — manager binary builds
  • Unit tests: all target/ tests pass (previously would have nil-panicked without the source fix)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

okankoAMZ
okankoAMZ previously approved these changes Jul 6, 2026
@sky333999 sky333999 force-pushed the sky333999/bump-prometheus-v0.312 branch 2 times, most recently from e891531 to 725a985 Compare July 6, 2026 18:44
- github.com/prometheus/prometheus                          v0.311.3 -> v0.312.0
- github.com/prometheus-operator/prometheus-operator        v0.91.0  -> v0.92.0
  (including pkg/apis/monitoring and pkg/client submodules)
- k8s.io/{api,apiextensions-apiserver,apimachinery,client-go,
         component-base,kubectl}                            v0.35.4  -> v0.36.2
- sigs.k8s.io/controller-runtime                            v0.23.3  -> v0.24.1

prometheus/prometheus v0.312.0 changed the discovery.NewManager
signature to take a *SDMetrics instead of map[string]DiscovererMetrics.
Update main.go and discovery_test.go call sites to construct and pass
SDMetrics via discovery.CreateAndRegisterSDMetrics, matching the
upstream otel-allocator pattern.
@sky333999 sky333999 force-pushed the sky333999/bump-prometheus-v0.312 branch from 725a985 to 1af7bb8 Compare July 6, 2026 19:08
@sky333999 sky333999 merged commit ccbe45b into main Jul 8, 2026
11 of 12 checks passed
@sky333999 sky333999 deleted the sky333999/bump-prometheus-v0.312 branch July 8, 2026 17:19
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.

3 participants