-
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
fix: validate plugin configuration in the DP #2856
Conversation
wow, That is a nice PR |
@spacewander Please update the checklist |
@spacewander you can continue this issue |
9f24c92
to
2308af8
Compare
8ce4c12
to
0e00766
Compare
apisix/core/config_etcd.lua
Outdated
data_valid, err = self.checker(item.value) | ||
if not data_valid then | ||
log.error("failed to check item data of [", self.key, | ||
"] err:", err, " ,val: ", json.delay_encode(item.value)) |
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.
Bad indentation.
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.
Updated.
apisix/plugin.lua
Outdated
@@ -498,4 +498,102 @@ function _M.get(name) | |||
end | |||
|
|||
|
|||
local function check_schema(plugins_conf, schema_type, skip_disabled_plugin) | |||
for name, plugin_conf in pairs(plugins_conf) do | |||
core.log.info("check plugin scheme, name: ", name, ", configurations: ", |
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.
Typo: scheme
=> schema
.
apisix/plugin.lua
Outdated
|
||
local function stream_check_schema(plugins_conf, schema_type, skip_disabled_plugin) | ||
for name, plugin_conf in pairs(plugins_conf) do | ||
core.log.info("check stream plugin scheme, name: ", name, |
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.
Ditto.
Fix #2834
What this PR does / why we need it:
Pre-submission checklist: