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

Cherry-pick three fixes from upstream #705

Merged
merged 4 commits into from
Oct 3, 2024

Conversation

beorn7 and others added 3 commits October 1, 2024 14:32
…-division

promql: correctly handle unary negation of native histograms and add tests for multiplication and division of native histograms by negative scalars
Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
* Make rate possible non-counter annotation consistent

Previously a PossibleNonCounterInfo annotation would be left in cases
where a range-vector selects 1 float data point, even if no more points
are selected in order to calculate a rate.

This change ensures an output float exists before emitting such an
annotation.

This fixes an inconsistency where a series with mixed data (ie, a float
and a native histogram) would emit an annotation without any points.

For example,

```

load 1m
series{label="a"} 1 {{schema:1 sum:10 count:5 buckets:[1 2 3]}}

eval instant at 1m rate(series[1m1s])

```

Would have a PossibleNonCounterInfo annotation.

Wheras

```

load 1m
series{label="a"} {{schema:1 sum:10 count:5 buckets:[1 2 3]}} {{schema:1 sum:15 count:10 buckets:[1 2 3]}}

eval instant at 1m rate(series[1m1s])

```

Would not.

---------

Signed-off-by: Joshua Hesketh <josh@nitrotech.org>
# Conflicts:
#	CHANGELOG.md
…m-format

promqltest: use test expression format for histograms in assertion failure messages and include reset hint in the test expression
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.

Changes look good. I'm not sure how complicated the cherry-picking will ultimately make merging in main, so this perhaps need weighing against that. However, given the current situation this lgtm.

@charleskorn charleskorn merged commit 24c9a62 into main Oct 3, 2024
9 checks passed
@charleskorn charleskorn deleted the charleskorn/cherry-pick-fixes branch October 3, 2024 07:25
charleskorn added a commit to grafana/mimir that referenced this pull request Oct 3, 2024
charleskorn added a commit to grafana/mimir that referenced this pull request Oct 4, 2024
charleskorn added a commit to grafana/mimir that referenced this pull request Oct 4, 2024
* Update to latest mimir-prometheus

* Add changelog entries

* Address PR feedback: improve changelog entries

Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>

* Fix breaking change

* Bring in grafana/mimir-prometheus#705 too

* Adjust behaviour to match prometheus/prometheus#14821

* Re-enable tests now that we have prometheus/prometheus#14910

* Add more changelog entries

---------

Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
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