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

pkg/rules: consider group name and file for deduplication #3024

Merged
merged 1 commit into from
Aug 13, 2020

Conversation

s-urbaniak
Copy link
Contributor

@s-urbaniak s-urbaniak commented Aug 12, 2020

  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Fixes #3017

Changes

Currently only the group name is considered for group deduplication.
However prometheus uses also the group file according to [1].

This fixes it.

[1] https://github.com/prometheus/prometheus/blob/ce838ad6fcbd14b0cf9971a4d093ad672e1469fe/rules/manager.go#L1047-L1055

Verification

Tests have been modified

@s-urbaniak
Copy link
Contributor Author

s-urbaniak commented Aug 12, 2020

Copy link
Contributor

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

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

LGTM

pkg/rules/rulespb/custom.go Outdated Show resolved Hide resolved
@s-urbaniak
Copy link
Contributor Author

I am not sure why this fails 🤔

make: *** [Makefile:208: test] Terminated

Too long with no output (exceeded 10m0s): context deadline exceeded

Copy link
Member

@kakkoyun kakkoyun left a comment

Choose a reason for hiding this comment

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

🥇 LGTM. Thanks a lot.

@s-urbaniak
Copy link
Contributor Author

ha, somebody was faster, let me rebase on the newest changelog ;-)

Currently only the group name is considered for group deduplication.
However prometheus uses also the group file according to [1].

This fixes it.

[1] https://github.com/prometheus/prometheus/blob/ce838ad6fcbd14b0cf9971a4d093ad672e1469fe/rules/manager.go#L1047-L1055

Signed-off-by: Sergiusz Urbaniak <sergiusz.urbaniak@gmail.com>
@brancz brancz merged commit e8962b7 into thanos-io:master Aug 13, 2020
@s-urbaniak s-urbaniak deleted the rules-fix branch August 13, 2020 06:31
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.

Thanos Querier Rules API merges rules with the same name but different fields
4 participants