-
Notifications
You must be signed in to change notification settings - Fork 548
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 to latest mimir-prometheus #9508
Conversation
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.
Lets wait for the grafana/mimir-prometheus#705 to merge
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.
pre-approve to unblock
// We currently omit checking the annotations due to a difference between the engines. | ||
// This can be re-enabled once https://github.com/prometheus/prometheus/pull/14910 is vendored. | ||
testutils.RequireEqualResults(t, expr, expectedResults, mimirResults, false) | ||
testutils.RequireEqualResults(t, expr, expectedResults, mimirResults) |
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 personally prefer to remove/tidy these kind of things in followups to keep vendor commits as close to just updating the vendored code as possible (of course there are times where we need to make changes to be compatible etc))
// See https://github.com/prometheus/prometheus/pull/14821 for more discussion of this. | ||
for i := range seriesData.Histograms { | ||
if i > 0 && seriesData.Histograms[i].H == seriesData.Histograms[i-1].H { | ||
// Previous point shares the same histogram instance, which we've already negated, so don't negate it again. |
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.
(Not for now, but I'm more and more thinking we should copy histograms for lookbacks. Seems so risky that we'll miss something 😬)
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.
Or rather than all lookbacks, perhaps copy histograms if they're used for successive points? Would be interesting to try and see the performance impact.
@@ -15,16 +15,14 @@ import ( | |||
|
|||
// Why do we do this rather than require.Equal(t, expected, actual)? | |||
// It's possible that floating point values are slightly different due to imprecision, but require.Equal doesn't allow us to set an allowable difference. | |||
func RequireEqualResults(t testing.TB, expr string, expected, actual *promql.Result, checkAnnotations bool) { | |||
func RequireEqualResults(t testing.TB, expr string, expected, actual *promql.Result) { |
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 had intended to keep checkAnnotations in case we needed it for other cases, but it's easy enough to add back in.
Co-authored-by: George Krajcsovits <[email protected]>
e50f7fe
to
ab018ff
Compare
What this PR does
This brings in five changes:
Which issue(s) this PR fixes or relates to
(none)
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.