promql: Check 1st histogram's CRH in sum_over_time#17331
Merged
Conversation
avg_over_time already correctly checked the counter reset hint fo all histograms, but in sum_over_time, the 1st histogram was missed in the loop. This commit exposes the bug in a test. Signed-off-by: beorn7 <beorn@grafana.com>
avg_over_time already correctly checked the counter reset hint fo all histograms, but in sum_over_time, the 1st histogram was missed. In both cases, the 1st histogram is processed outside the loop. Signed-off-by: beorn7 <beorn@grafana.com>
charleskorn
approved these changes
Oct 13, 2025
Contributor
charleskorn
left a comment
There was a problem hiding this comment.
LGTM, thanks for fixing this
krajorama
approved these changes
Oct 14, 2025
Member
krajorama
left a comment
There was a problem hiding this comment.
Nice catch, I knew something was off, but didn't catch it :( https://github.com/prometheus/prometheus/pull/17312/files#r2417329551
Member
Author
|
Thanks everyone. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
avg_over_time already correctly checked the counter reset hint fo all
histograms, but in sum_over_time, the 1st histogram was missed. In
both cases, the 1st histogram is processed outside the loop.
Thanks to @charleskorn for spotting this.
Does this PR introduce a user-facing change?
(This does fix a bug, but this bug is in the fix of #17312, which is not yet released yet. So adding another line in the release notes for the fix of the fix would be weird.)