-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
fix(sharding): use without() grouping when merging avg_over_time
shard results
#12176
Conversation
7775f65
to
68e92b9
Compare
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.
Wow. That one is one me. Incredible that it took so long. Could you add another test that's checking the output. Eg the equivalence test?
68e92b9
to
8fc47db
Compare
This PR must be merged before a backport PR will be created. |
1 similar comment
This PR must be merged before a backport PR will be created. |
It seems that the fix was not included in latest release.
Is there any workaround, either by modifying the query, or downgrade the server to a previous version? |
What this PR does / why we need it:
avg_over_time
expression that uses eitherkeep
orlabel_format
stage without any aggregation fails on main with the following error:aggregation operator '"sum"' without grouping
Given these expressions contain stages that could reduce the labelset, sharding converts it to the following form
sum (sum_over_time()) / sum(count_over_time())
, but vector aggregation expr evaluator always expects a grouping. This pr updates theavg_over_time
shard mapper to usewithout()
grouping for generating vector agg expr when it is not explicitly set.example query to reproduce this error:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Checklist
CONTRIBUTING.md
guide (required)CHANGELOG.md
updatedadd-to-release-notes
labeldocs/sources/setup/upgrade/_index.md
production/helm/loki/Chart.yaml
and updateproduction/helm/loki/CHANGELOG.md
andproduction/helm/loki/README.md
. Example PRdeprecated-config.yaml
anddeleted-config.yaml
files respectively in thetools/deprecated-config-checker
directory. Example PR