-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[WIP] bugfix: check plugin schema when sync data #1875
Conversation
-- check plugins schema | ||
local plugins_conf = item.plugins | ||
if plugins_conf then | ||
for name, plugin_conf in pairs(plugins_conf) do |
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.
check the plugin conf
in this way, it is not a good way.
config_etcd.lua is a basic component, it should not know the plugin.
I think we can export a new option when creating new config_etcd
object, then we can add more check logic in filter_func
.
Example:
core.config.new("/routes", {
automatic = true,
item_schema = core.schema.route,
filter_func = function ()
-- your code
end
filter = filter,
})
@wrl96 please rebase your branch and fix the failed test cases. |
@wrl96 ping |
What this PR does:
Fix #1604
Pre-submission checklist: