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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to