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

Bug 1926598: pkg/rules: fix deduplication of equal alerts with different labels #51

Merged
merged 1 commit into from
Mar 30, 2021

Commits on Mar 30, 2021

  1. pkg/rules: fix deduplication of equal alerts with different labels

    Currently, if an alerting rule having the same name with different
    severity labels is being returned from different replicas then they
    are being treated as separate alerts.
    
    Given the following alerts a1,a2 with severities s1,s2 returned from
    replicas r1,2:
    
    a1[s1,r1]
    a1[s2,r1]
    a1[s1,r2]
    a1[s2,r2]
    
    Then, currently, the algorithm deduplicates to:
    
    a1[s1]
    a1[s2]
    a1[s1]
    a1[s2]
    
    Instead of the intendet result:
    
    a1[s1]
    a1[s2]
    
    This fixes it by removing replica labels before sorting labels for
    deduplication.
    
    Signed-off-by: Sergiusz Urbaniak <sergiusz.urbaniak@gmail.com>
    s-urbaniak committed Mar 30, 2021
    Configuration menu
    Copy the full SHA
    06e14f9 View commit details
    Browse the repository at this point in the history