You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/11/16 08:36:02 UTC
[GitHub] [apisix] spacewander commented on a change in pull request #5529: fix(plugin): check plugin metadata when have new conf
spacewander commented on a change in pull request #5529:
URL: https://github.com/apache/apisix/pull/5529#discussion_r750030408
##########
File path: apisix/plugin.lua
##########
@@ -556,7 +556,14 @@ function _M.init_worker()
end
local plugin_metadatas, err = core.config.new("/plugin_metadata",
- {automatic = true}
+ {
Review comment:
Could you add a test for it?
You can use
```
local etcd = require("apisix.core.etcd")
assert(etcd.set("/ab", "ab"))
```
to set etcd directly.
##########
File path: apisix/core/config_etcd.lua
##########
@@ -186,7 +186,7 @@ local function load_full_data(self, dir_res, headers)
end
if data_valid and self.checker then
- data_valid, err = self.checker(item.value)
+ data_valid, err = self.checker(item.value, item.key)
Review comment:
We should also update `config_yaml.lua` & add a test in https://github.com/apache/apisix/blob/master/t/config-center-yaml/plugin-metadata.t
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org