-
Notifications
You must be signed in to change notification settings - Fork 549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update mimir-prometheus to d162bb51b6ef
#4759
Conversation
7682390
to
1010392
Compare
894f657c
21131bf6ad8b
1010392
to
dff7206
Compare
21131bf6ad8b
d162bb51b6ef
{fn: "histogram_fraction", tpl: `(<fn>(0,0.5,bar1{}))`}, | ||
{fn: "histogram_quantile", tpl: `(<fn>(0.5,bar1{}))`}, | ||
}) | ||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be good to add a note about why this is commented out
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually don't think this should be commented out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think @beorn7 made functions more strict in what they return when the input is a histogram. So actually the documentation at https://prometheus.io/docs/prometheus/latest/querying/functions/ might need an update, because now it says: "Functions that do not explicitly mention native histograms in their documentation (see below) effectively treat a native histogram as a float sample of value 0. (This is confusing and will change before native histograms become a stable feature.)" But according to the tests it returns empty set now? Need to verify and probably separate float tests vs histograms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separated tests for floats and histograms.
// FromPointsToSamples converts []promql.Point to []Sample. | ||
func FromPointsToSamples(points []promql.Point) []Sample { | ||
// FromFPointsToSamples converts []promql.FPoint to []Sample. | ||
func FromFPointsToSamples(points []promql.FPoint) []Sample { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
note: As a next step (different PR) we could return to casting between promql.FPoint and our Sample type. But I'd also rename mimirpb.Sample to mimirpb.FPoint and also it's members so we can have a unit test that checks the compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would revive #3738
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// FromPointsToHistograms converts []promql.Point to []FloatHistogramPair. | ||
func FromPointsToHistograms(points []promql.Point) []FloatHistogramPair { | ||
// FromHPointsToHistograms converts []promql.HPoint to []FloatHistogramPair. | ||
func FromHPointsToHistograms(points []promql.HPoint) []FloatHistogramPair { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above, we have a chance to make this zero copy by aligning the types fully.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, ruler changes LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The native histograms related changes LGTM
What this PR does
Updates mimir-prometheus.
See: grafana/mimir-prometheus#480 and grafana/mimir-prometheus#485
Which issue(s) this PR fixes or relates to
N/A
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]