Skip to content
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

Merged
merged 8 commits into from
Oct 4, 2024
Merged

Conversation

@charleskorn charleskorn marked this pull request as ready for review October 3, 2024 07:01
@charleskorn charleskorn requested review from stevesg, grafanabot and a team as code owners October 3, 2024 07:01
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@jhesketh jhesketh left a 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

Copy link
Contributor

@krajorama krajorama left a 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

@charleskorn charleskorn requested a review from jhesketh October 3, 2024 23:58
// 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)
Copy link
Contributor

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.
Copy link
Contributor

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 😬)

Copy link
Contributor Author

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) {
Copy link
Contributor

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.

@charleskorn charleskorn enabled auto-merge (squash) October 4, 2024 01:25
@charleskorn charleskorn force-pushed the charleskorn/update-prometheus branch from e50f7fe to ab018ff Compare October 4, 2024 01:44
@charleskorn charleskorn merged commit 9a03bb5 into main Oct 4, 2024
29 checks passed
@charleskorn charleskorn deleted the charleskorn/update-prometheus branch October 4, 2024 02:06
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.

3 participants