Bump prometheus/prometheus to v0.312.0 and cascading dependencies#395
Merged
Conversation
okankoAMZ
previously approved these changes
Jul 6, 2026
e891531 to
725a985
Compare
- 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.
725a985 to
1af7bb8
Compare
musa-asad
approved these changes
Jul 7, 2026
okankoAMZ
approved these changes
Jul 7, 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.
Description of changes
Bumps
github.com/prometheus/prometheusfrom v0.311.3 to v0.312.0, along with the cascading dependency bumps required for it to compile.github.com/prometheus/prometheusgithub.com/prometheus-operator/prometheus-operator(+pkg/apis/monitoring,pkg/client)k8s.io/{api, apiextensions-apiserver, apimachinery, client-go, component-base, kubectl}sigs.k8s.io/controller-runtimeprometheus-operatorv0.92.0 is required because Prometheus v0.312.0 added a*slog.Loggerparameter torulefmt.Parsewhich older prometheus-operator releases don't pass. Everything else cascades from there.Source changes
Prometheus v0.312.0 changed the
discovery.NewManagersignature:NewManager(ctx, logger, registry, sdMetrics map[string]DiscovererMetrics)—nilacceptedNewManager(ctx, logger, registry, sdMetrics *SDMetrics)—nilpanics at runtimeUpdated four call sites (main.go, three sites in
target/discovery_test.go) to construct and pass*SDMetricsviadiscovery.CreateAndRegisterSDMetrics(registry), matching the upstream otel-allocator pattern.Note on regenerated files
Running
make manifestsagainst the newercontroller-runtimeandk8s.iodeps produces cosmetic reformatting inconfig/rbac/role.yaml(rules with identical verbs consolidated into one block) and inapis/v*/zz_generated.deepcopy.go(import alias formatting).Testing
go vet ./...— cleango build ./...— cleanmake manager— manager binary buildstarget/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.