Skip to content

ruler: Fix QueryOffset being ignored when recording xor alerting rule evaluation is disabled #11647

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

Merged
merged 3 commits into from
Jun 6, 2025

Conversation

alexweav
Copy link
Contributor

@alexweav alexweav commented Jun 5, 2025

What this PR does

When evaluation of one rule type is disabled but the other is enabled, the sync logic makes a filtered copy of each rule group. The copy logic ignores newly added fields QueryOffset and AlignEvaluationTimeOnInterval. We then sync these groups with the fields blapped.

This PR changes the copy + tests to consider all fields as of today, and also be tolerant of newly added fields so it doesn't break again in the future.

Which issue(s) this PR fixes or relates to

n/a

Checklist

  • Tests updated.
  • Documentation added.
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX].
  • about-versioning.md updated with experimental features.

@alexweav alexweav marked this pull request as ready for review June 5, 2025 18:56
@alexweav alexweav requested review from a team as code owners June 5, 2025 18:56
CHANGELOG.md Outdated
@@ -79,6 +79,7 @@
* [BUGFIX] Querier and query-frontend: Fix issue where aggregation functions like `topk` and `quantile` could return incorrect results if the scalar parameter is not a constant and Prometheus' query engine is in use. #11548
* [BUGFIX] Querier and query-frontend: Fix issue where range vector selectors could incorrectly ignore samples at the beginning of the range. #11548
* [BUGFIX] Querier: Fix rare panic if a query is canceled while a request to ingesters or store-gateways has just begun. #11613
* [BUGFIX] Ruler: Fix QueryOffset and AlignEvaluationTimeOnInterval being ignored when recording xor alerting rule evaluation is disabled. #11647
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

recording xor alerting rule evaluation

What does the "xor" refer to here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Exclusive or," the bug only happens when you have recording disabled and alerting enabled, or vice versa, it does not happen when both are disabled. I'll improve the wording a bit before merging it

@alexweav alexweav merged commit d05fd7a into main Jun 6, 2025
30 checks passed
@alexweav alexweav deleted the alexweav/ruler-field-loss-on-filter branch June 6, 2025 16:44
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