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

Fixes #15022: NON STABLE POLICY ON NODE warning when the same directive is used in two rules #2240

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,10 @@ final object MergePolicyService {
val keep = samePriority.head

//only one log for all discard draft
if(samePriority.size > 1) {
//we don't want to warn when the directive is the same but applied to two rules. In that case,
//it's actually stable, it's just that we want to make appear the override in rules
val differentDirectives = samePriority.groupBy(_.id.directiveId)
if(differentDirectives.size > 1) {
PolicyLogger.warn(s"Unicity check: NON STABLE POLICY ON NODE '${nodeInfo.hostname}' for mono-instance (unique) technique "+
s"'${keep.technique.id}'. Several directives with same priority '${keep.priority}' are applied. "+
s"Keeping (ruleId@@directiveId) '${keep.id.ruleId.value}@@${keep.id.directiveId.value}' (order: ${keep.ruleOrder.value}/"+
Expand Down