Skip to content

Update Prometheus to v0.316.0 - #7943

Draft
alanprot wants to merge 3 commits into
cortexproject:masterfrom
alanprot:bump-prometheus-v0.316.0
Draft

alanprot wants to merge 3 commits into
cortexproject:masterfrom
alanprot:bump-prometheus-v0.316.0

Conversation

@alanprot

@alanprot alanprot commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

What this PR does:

Updates github.com/prometheus/prometheus from v0.309.1 to v0.316.0. Among other things this brings in early compaction of stale head series (prometheus/prometheus#16929, DB.CompactStaleHead), which we want to evaluate for ingesters separately.

Draft: Thanos, promql-engine and parquet-common don't build against v0.316.0 yet, so go.mod temporarily pins them to forks:

Module Upstream PR
github.com/thanos-io/promql-engine thanos-io/promql-engine#756
github.com/thanos-io/thanos thanos-io/thanos#9153 (on top of thanos-io/thanos#9143)
github.com/prometheus-community/parquet-common chunkenc.Appender start-timestamp arguments (PR to follow)

These replace directives will be removed once those merge.

Code changes

  • Parser: the package-level parser options and parser.ParseExpr/ParseMetricSelector are gone. pkg/parser keeps the experimental-functions setting itself and adds NewEngineParser(), which also includes the Thanos xrate/xincrease/xdelta functions (promql-engine no longer registers them globally). Used by the engines, the query API, the query analyzer, distributed query planning and rule validation.
  • Thanos engine: engine.Opts no longer embeds promql.EngineOpts; options are mapped explicitly.
  • Ruler: rules.ManagerOptions takes an AppendableV2; PusherAppendable now implements it (RejectOutOfOrder maps to the existing DiscardOutOfOrder). The local rule store uses a new local.FileLoader, because a zero-value rules.FileLoader{} now panics when parsing expressions. Discovery metrics use *discovery.SDMetrics.
  • OTLP: the translator now writes to a storage.AppenderV2; collectingAppender implements it, and now also records float histograms.
  • Querier: AtST() for the batch and compatible-chunk iterators (no start timestamps, returns 0).
  • Misc: tsdb/errors was removed → pkg/util/multierror; relabel.Process → ProcessBuilder; NewActiveQueryTracker now returns an error (we keep failing at startup, as before); v1.NewAPI, NewPrometheusQueryOpts, rulefmt.Parse and chunk appender signatures; client_golang Query* return an extra value.

User-visible changes

  • OTLP translation errors are joined with a newline instead of ; (from the upstream translator).
  • prometheus_notifications_dropped_total in the ruler now has an alertmanager label.

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]
  • docs/configuration/v1-guarantees.md updated if this PR introduces experimental flags

Testing

  • go build, go test -run '^$' (including ./integration/... with all integration tags) and golangci-lint run (0 issues) with -tags "netgo slicelabels" and -mod=vendor.
  • go test ./pkg/... ./cmd/... ./tools/...: all packages pass. pkg/ring/kv/memberlist TestPage failed once on a port clash with a parallel package (bind: address already in use) and passes on its own.
  • Integration tests not run locally.

Update Prometheus to v0.316.0, with Thanos, promql-engine and
parquet-common pinned to forks until their upstream PRs merge:
thanos-io/thanos#9153, thanos-io/promql-engine#756 and the
parquet-common bump.

Signed-off-by: Alan Protasio <alanprot@gmail.com>
Signed-off-by: Alan Protasio <alanprot@gmail.com>
Signed-off-by: Alan Protasio <alanprot@gmail.com>

This branch has not been deployed

No deployments
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