Skip to content

Fix: Add parentheses around labels merge operation#4

Open
ShivaniBanke wants to merge 1 commit intobase-14:mainfrom
ShivaniBanke:fix/merging-alerts-lables
Open

Fix: Add parentheses around labels merge operation#4
ShivaniBanke wants to merge 1 commit intobase-14:mainfrom
ShivaniBanke:fix/merging-alerts-lables

Conversation

@ShivaniBanke
Copy link
Copy Markdown
Contributor

@ShivaniBanke ShivaniBanke commented Oct 30, 2025

Current State

The label merging logic has an incorrect operator precedence, which could lead to unexpected behavior when combining team and alert rule-specific labels. The addition operator (+) for merging label objects was being evaluated before the conditional expressions.

Changes

  • Added explicit parentheses around the first operand in the labels merge operation
  • Ensured proper evaluation order when combining team and rule-specific labels

Notes

  • This is a non-breaking change that improves the reliability of label merging
  • The fix ensures consistent behavior across different label configurations

@ShivaniBanke ShivaniBanke changed the title fix: Add parentheses around labels merge operation Fix: Add parentheses around labels merge operation Oct 30, 2025
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.

1 participant