Skip to content

Commit 91e5fb1

Browse files
Update to latest mimir-prometheus (#10400)
* Update to latest mimir-prometheus Also implement new rule concurrency interface from prometheus/prometheus#15681 * MQE: Pull new functions test and fix _over_time functions Same fix as prometheus/prometheus#15711 and similar to what was done during the last sync: #10383 * Linting * MQE: Use `.Any()` as suggested in PR * Add CHANGELOG * Remove sequentialRules, not needed A nil slice will run rules sequentially * Address PR comments * Add test to check that group isn't mutated
1 parent 6c186ae commit 91e5fb1

31 files changed

+1104
-303
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* [ENHANCEMENT] Ingester: More efficient CPU/memory utilization-based read request limiting. #10325
1717
* [ENHANCEMENT] Dashboards: Add Query-Scheduler <-> Querier Inflight Requests row to Query Reads and Remote Ruler reads dashboards. #10290
1818
* [ENHANCEMENT] OTLP: In addition to the flag `-distributor.otel-created-timestamp-zero-ingestion-enabled` there is now `-distributor.otel-start-time-quiet-zero` to convert OTel start timestamps to Prometheus QuietZeroNaNs. This flag is to make the change rollout safe between Ingesters and Distributors. #10238
19+
* [ENHANCEMENT] Ruler: When rule concurrency is enabled for a rule group, its rules will now be reordered and run in batches based on their dependencies. This increases the number of rules that can potentially run concurrently. Note that the global and tenant-specific limits still apply #10400
1920
* [BUGFIX] Distributor: Use a boolean to track changes while merging the ReplicaDesc components, rather than comparing the objects directly. #10185
2021
* [BUGFIX] Querier: fix timeout responding to query-frontend when response size is very close to `-querier.frontend-client.grpc-max-send-msg-size`. #10154
2122
* [BUGFIX] Query-frontend and querier: show warning/info annotations in some cases where they were missing (if a lazy querier was used). #10277
@@ -25,6 +26,8 @@
2526
* [BUGFIX] Mimirtool: `remote-read` commands will now return data. #10286
2627
* [BUGFIX] PromQL: Fix deriv, predict_linear and double_exponential_smoothing with histograms https://github.com/prometheus/prometheus/pull/15686 #10383
2728
* [BUGFIX] MQE: Fix deriv with histograms #10383
29+
* [BUGFIX] PromQL: Fix <aggr_over_time> functions with histograms https://github.com/prometheus/prometheus/pull/15711 #10400
30+
* [BUGFIX] MQE: Fix <aggr_over_time> functions with histograms #10400
2831

2932
### Mixin
3033

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ require (
287287
sigs.k8s.io/yaml v1.4.0 // indirect
288288
)
289289

290-
replace github.com/prometheus/prometheus => github.com/grafana/mimir-prometheus v0.0.0-20250109135143-114aaaadc203
290+
replace github.com/prometheus/prometheus => github.com/grafana/mimir-prometheus v0.0.0-20250110020350-a1e2bcf4a615
291291

292292
// Replace memberlist with our fork which includes some fixes that haven't been
293293
// merged upstream yet:

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -1283,8 +1283,8 @@ github.com/grafana/gomemcache v0.0.0-20241016125027-0a5bcc5aef40 h1:1TeKhyS+pvzO
12831283
github.com/grafana/gomemcache v0.0.0-20241016125027-0a5bcc5aef40/go.mod h1:IGRj8oOoxwJbHBYl1+OhS9UjQR0dv6SQOep7HqmtyFU=
12841284
github.com/grafana/memberlist v0.3.1-0.20220714140823-09ffed8adbbe h1:yIXAAbLswn7VNWBIvM71O2QsgfgW9fRXZNR0DXe6pDU=
12851285
github.com/grafana/memberlist v0.3.1-0.20220714140823-09ffed8adbbe/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=
1286-
github.com/grafana/mimir-prometheus v0.0.0-20250109135143-114aaaadc203 h1:gCU3GO2mZUzsLAa/JRRDJpKbYhkXy7caWnzfNqbgDig=
1287-
github.com/grafana/mimir-prometheus v0.0.0-20250109135143-114aaaadc203/go.mod h1:KfyZCeyGxf5gvl6VZbrQsd400nJjGw+ygMEtDVZKIT4=
1286+
github.com/grafana/mimir-prometheus v0.0.0-20250110020350-a1e2bcf4a615 h1:lr3wUcXU0mScCDn/4NXc0CYglZJfy5l35sOJFar9qE0=
1287+
github.com/grafana/mimir-prometheus v0.0.0-20250110020350-a1e2bcf4a615/go.mod h1:KfyZCeyGxf5gvl6VZbrQsd400nJjGw+ygMEtDVZKIT4=
12881288
github.com/grafana/opentracing-contrib-go-stdlib v0.0.0-20230509071955-f410e79da956 h1:em1oddjXL8c1tL0iFdtVtPloq2hRPen2MJQKoAWpxu0=
12891289
github.com/grafana/opentracing-contrib-go-stdlib v0.0.0-20230509071955-f410e79da956/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU=
12901290
github.com/grafana/prometheus-alertmanager v0.25.1-0.20240930132144-b5e64e81e8d3 h1:6D2gGAwyQBElSrp3E+9lSr7k8gLuP3Aiy20rweLWeBw=

pkg/ruler/fixtures/rules_chain.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
groups:
2+
- name: chain
3+
rules:
4+
# Evaluated concurrently, no dependencies
5+
- record: job:http_requests:rate1m
6+
expr: sum by (job)(rate(http_requests_total[1m]))
7+
- record: job:http_requests:rate5m
8+
expr: sum by (job)(rate(http_requests_total[1m]))
9+
10+
# Evaluated sequentially, dependents and dependencies
11+
- record: job1:http_requests:rate1m
12+
expr: job:http_requests:rate1m{job="job1"}
13+
- record: job1_cluster1:http_requests:rate1m
14+
expr: job1:http_requests:rate1m{cluster="cluster1"}
15+
16+
# Evaluated concurrently, no dependents
17+
- record: job1_cluster2:http_requests:rate1m
18+
expr: job1:http_requests:rate1m{cluster="cluster2"}
19+
- record: job1_cluster1_namespace1:http_requests:rate1m
20+
expr: job1_cluster1:http_requests:rate1m{namespace="namespace1"}
21+
- record: job1_cluster1_namespace2:http_requests:rate1m
22+
expr: job1_cluster1:http_requests:rate1m{namespace="namespace2"}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
groups:
2+
- name: indeterminate
3+
rules:
4+
# This shouldn't run in parallel because of the open matcher
5+
- record: job:http_requests:rate1m
6+
expr: sum by (job)(rate(http_requests_total[1m]))
7+
- record: job:http_requests:rate5m
8+
expr: sum by (job)(rate(http_requests_total[5m]))
9+
- record: job:http_requests:rate15m
10+
expr: sum by (job)(rate(http_requests_total[15m]))
11+
- record: job:http_requests:rate30m
12+
expr: sum by (job)(rate(http_requests_total[30m]))
13+
- record: job:http_requests:rate1h
14+
expr: sum by (job)(rate(http_requests_total[1h]))
15+
- record: job:http_requests:rate2h
16+
expr: sum by (job)(rate(http_requests_total[2h]))
17+
- record: matcher
18+
expr: '{job="job1"}'
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
groups:
2+
- name: independents
3+
rules:
4+
- record: job:http_requests:rate1m
5+
expr: sum by (job)(rate(http_requests_total[1m]))
6+
- record: job:http_requests:rate5m
7+
expr: sum by (job)(rate(http_requests_total[5m]))
8+
- record: job:http_requests:rate15m
9+
expr: sum by (job)(rate(http_requests_total[15m]))
10+
- record: job:http_requests:rate30m
11+
expr: sum by (job)(rate(http_requests_total[30m]))
12+
- record: job:http_requests:rate1h
13+
expr: sum by (job)(rate(http_requests_total[1h]))
14+
- record: job:http_requests:rate2h
15+
expr: sum by (job)(rate(http_requests_total[2h]))

0 commit comments

Comments
 (0)