Skip to content

[fix] Fix notice rule label matching against grouped alerts#4191

Merged
Aias00 merged 3 commits into
apache:masterfrom
Duansg:fix-3852
Jul 12, 2026
Merged

[fix] Fix notice rule label matching against grouped alerts#4191
Aias00 merged 3 commits into
apache:masterfrom
Duansg:fix-3852

Conversation

@Duansg

@Duansg Duansg commented Jul 10, 2026

Copy link
Copy Markdown
Member

What's changed?

close #3852

The issue is that the rule label routing matches GroupAlert.commonLabels, which is the intersection of all alert labels in that group. Since there are only grouped rules and the alert labels within the group do not match, labels are excluded from this intersection. As a result, the notification policy for that label will never match, and only the “Forward All” rule will be triggered.

This PR changes the matching logic to check the alerts at the bottom of the group: the rule is matched when any alert in the group contains all the tags specified in the rule.

Checklist

  • I have read the Contributing Guide
  • I have written the necessary doc or comment.
  • I have added the necessary unit tests and all cases have passed.

Add or update API

  • I have added the necessary e2e tests and all cases have passed.

Step1

capcap-260710-173741

Step2

capcap-260710-174426

Step3

capcap-260710-174112

Step4

capcap-260710-175749

Preview

capcap-260710-175804

@Aias00 Aias00 merged commit 4cf968a into apache:master Jul 12, 2026
5 checks passed
@Duansg Duansg deleted the fix-3852 branch July 12, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] The message notification for matching tags was not sent successfully.

2 participants