Skip to content

[improve] add group convergence strategy name validation#4050

Merged
tomsun28 merged 9 commits intoapache:masterfrom
Duansg:improve-group
Mar 4, 2026
Merged

[improve] add group convergence strategy name validation#4050
tomsun28 merged 9 commits intoapache:masterfrom
Duansg:improve-group

Conversation

@Duansg
Copy link
Member

@Duansg Duansg commented Mar 1, 2026

What's changed?

This PR addresses potential issues currently present in group convergence.

  1. Display of empty tags in the current grouping convergence strategy; once saved successfully, they can also participate in the determination.
Snipaste_2026-02-27_19-00-50
// verification code
private boolean hasRequiredLabels(Map<String, String> labels, List<String> requiredLabels) {
    return requiredLabels.stream().allMatch(labels::containsKey);
}
  1. Input prompts and restriction information overlap.
Snipaste_2026-02-27_19-09-43
  1. Multiple strategies save invalidation issue.
// Store using the policy name as the key
public void refreshGroupDefines(List<AlertGroupConverge> groupDefines) {
    this.groupDefines.clear();
    groupDefines.forEach(define -> this.groupDefines.put(define.getName(), define));
}
  1. Styling issue with excessively long Group Labels
Snipaste_2026-02-27_22-45-51

Modification details

  • Optimize the display and validation of empty tags.
  • Simplify input prompts to prevent style conflicts.
  • Optimize the display style of tags on list pages.
  • Added test cases and passed successfully.

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.

Copy link
Member

@tomsun28 tomsun28 left a comment

Choose a reason for hiding this comment

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

lgtm!

@tomsun28 tomsun28 merged commit 40c842b into apache:master Mar 4, 2026
4 checks passed
@Duansg Duansg deleted the improve-group branch March 5, 2026 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants