Skip to content

Commit

Permalink
Update mimir-prometheus vendor 20240703 (#8592)
Browse files Browse the repository at this point in the history
* sync mimir-prometheus 5131622acfee927142b4123bf7f0e40069532cf2

* fix build error

* run `make generate-otlp` to fix lint

* update streamingpromql test case

* update mimirpb with new custom values field

* Temporarily disable any streaming promql tests with annotations

* remove new custom_values field from the remote write struct

---------

Co-authored-by: Joshua Hesketh <joshua.hesketh@grafana.com>
  • Loading branch information
zenador and jhesketh authored Jul 5, 2024
1 parent 6b0b900 commit fefc1d5
Show file tree
Hide file tree
Showing 46 changed files with 2,411 additions and 1,009 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ require (
)

// Using a fork of Prometheus with Mimir-specific changes.
replace github.com/prometheus/prometheus => github.com/grafana/mimir-prometheus v0.0.0-20240625230403-ab397a980d39
replace github.com/prometheus/prometheus => github.com/grafana/mimir-prometheus v0.0.0-20240703103907-5131622acfee

// Replace memberlist with our fork which includes some fixes that haven't been
// merged upstream yet:
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,8 @@ github.com/grafana/gomemcache v0.0.0-20240229205252-cd6a66d6fb56 h1:X8IKQ0wu40wp
github.com/grafana/gomemcache v0.0.0-20240229205252-cd6a66d6fb56/go.mod h1:PGk3RjYHpxMM8HFPhKKo+vve3DdlPUELZLSDEFehPuU=
github.com/grafana/memberlist v0.3.1-0.20220714140823-09ffed8adbbe h1:yIXAAbLswn7VNWBIvM71O2QsgfgW9fRXZNR0DXe6pDU=
github.com/grafana/memberlist v0.3.1-0.20220714140823-09ffed8adbbe/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=
github.com/grafana/mimir-prometheus v0.0.0-20240625230403-ab397a980d39 h1:jxS8YGQsB7Bp8/KMyUk4r9mnavRdeLOOjAXpffRAlz0=
github.com/grafana/mimir-prometheus v0.0.0-20240625230403-ab397a980d39/go.mod h1:ZrBwbXc+KqeAQT4QXHKfi68+7vaOzoSdrkk90RRgdkE=
github.com/grafana/mimir-prometheus v0.0.0-20240703103907-5131622acfee h1:H6XAHAr8YzO61zZvmGmSWt8QFgkWHbXTWwxqCHf5Wy8=
github.com/grafana/mimir-prometheus v0.0.0-20240703103907-5131622acfee/go.mod h1:DjC1WWVnO+kFTzxrvJ6uS3SvbtoRiW4/lgLFUd49OPg=
github.com/grafana/opentracing-contrib-go-stdlib v0.0.0-20230509071955-f410e79da956 h1:em1oddjXL8c1tL0iFdtVtPloq2hRPen2MJQKoAWpxu0=
github.com/grafana/opentracing-contrib-go-stdlib v0.0.0-20230509071955-f410e79da956/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU=
github.com/grafana/prometheus-alertmanager v0.25.1-0.20240625192351-66ec17e3aa45 h1:AJKOtDKAOg8XNFnIZSmqqqutoTSxVlRs6vekL2p2KEY=
Expand Down
14 changes: 11 additions & 3 deletions pkg/distributor/otlp/helper_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 10 additions & 7 deletions pkg/distributor/otlp/histograms_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

346 changes: 217 additions & 129 deletions pkg/mimirpb/mimir.pb.go

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pkg/mimirpb/mimir.proto
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ message FloatHistogram {
repeated BucketSpan negative_spans = 8 [(gogoproto.nullable) = false];
repeated double positive_buckets = 13;
repeated double negative_buckets = 10;
repeated double custom_values = 16;
}

// A BucketSpan defines a number of consecutive buckets with their
Expand Down
5 changes: 4 additions & 1 deletion pkg/streamingpromql/operators/aggregation.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,10 @@ func (a *Aggregation) accumulateSeriesIntoGroup(s types.InstantVectorSeriesData,
// of needing to loop again later like we do for floats.
seriesGroup.histogramPointCount++
} else {
seriesGroup.histogramSums[idx] = seriesGroup.histogramSums[idx].Add(p.H)
seriesGroup.histogramSums[idx], err = seriesGroup.histogramSums[idx].Add(p.H)
if err != nil {
return err
}
}
}

Expand Down
6 changes: 4 additions & 2 deletions pkg/streamingpromql/testdata/ours/aggregators.test
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ load 1m
single_histogram{label="value2"} {{sum:5 count:5 buckets:[1 3 1]}}

# "If either operator has to aggregate a mix of histogram samples and float samples, the corresponding vector element is removed from the output vector entirely."
eval instant at 1m sum(single_histogram)
# TODO(jhesketh): Re-enable once we support annotations
# eval_warn instant at 1m sum(single_histogram)

clear

Expand All @@ -100,6 +101,7 @@ load 1m
single_histogram{label="value2"} 3

# "If either operator has to aggregate a mix of histogram samples and float samples, the corresponding vector element is removed from the output vector entirely."
eval instant at 1m sum(single_histogram)
# TODO(jhesketh): Re-enable once we support annotations
# eval_warn instant at 1m sum(single_histogram)

clear
Loading

0 comments on commit fefc1d5

Please sign in to comment.