-
Notifications
You must be signed in to change notification settings - Fork 2.7k
change: disallow creating duplicate plugins in global rules #12800
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
base: master
Are you sure you want to change the base?
change: disallow creating duplicate plugins in global rules #12800
Conversation
Signed-off-by: Abhishek Choudhary <[email protected]>
Signed-off-by: Abhishek Choudhary <[email protected]>
Signed-off-by: Abhishek Choudhary <[email protected]>
Signed-off-by: Abhishek Choudhary <[email protected]>
Signed-off-by: Abhishek Choudhary <[email protected]>
Signed-off-by: Abhishek Choudhary <[email protected]>
4df44ed
Signed-off-by: Abhishek Choudhary <[email protected]>
|
|
||
| -- remove duplicate plugins | ||
| for plugin_name, _ in pairs(duplicate_plugins) do | ||
| all_plugins[plugin_name] = nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should warn which plugins are not working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are right, thanks. I pushed a new commit that contains:
core.log.warn("found ", plugin_name, " configured across different global rules ",
" it won't get executed")There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think duplicate_plugins are redundant.
Can we merge three loops into one?
Signed-off-by: Abhishek Choudhary <[email protected]>
Description
When the same plugin is configured across different global rules, there will be no guarantee on which plugin config will be executed first. Additionally, the current architecture does not guarantee plugin execution order according to the priority.
We address this problem by disallowing configuring same plugin across multiple global_rules and sorting the plugins to their priority and executing in order.
Fixes: #12704
Checklist