nic-6443 opened a new issue, #11216:
URL: https://github.com/apache/apisix/issues/11216

   ### Current Behavior
   
   # Part 1
   We created an etcd client to handle plugin metadata in:
   
https://github.com/apache/apisix/blob/64b81c48ed3bf4ed1bf5b2edbd4bcdea5137123c/apisix/plugin.lua#L816-L821
   in `check_plugin_metadata` function, we need a `item.id`(expectation is the 
plugin name) to check metadata schema of specific plugin.
   
https://github.com/apache/apisix/blob/64b81c48ed3bf4ed1bf5b2edbd4bcdea5137123c/apisix/plugin.lua#L1040-L1042
   but plugin metadata don't have a id field in our admin api, so when apisix 
startup with a exist plugin metadata, the checker will be triggered in 
`config_etcd:load_full_data`
   
https://github.com/apache/apisix/blob/64b81c48ed3bf4ed1bf5b2edbd4bcdea5137123c/apisix/core/config_etcd.lua#L489-L495
   and then checker failed with this log:
   <img width="1270" alt="image" 
src="https://github.com/apache/apisix/assets/22141303/b82f1352-4c73-4967-b17c-dddc6b5da61d";>
   
   # Part 2
   When watch a new data from etcd, `config_etcd.lua` only check configuration 
that has configure with a `item_schema`
   
https://github.com/apache/apisix/blob/64b81c48ed3bf4ed1bf5b2edbd4bcdea5137123c/apisix/core/config_etcd.lua#L667-L685
   because `plugin_metadata` only set `checker` field without `item_schema`, so 
the new plugin metadata watch from etcd don't validate by schema too.
   
   
   ### Expected Behavior
   
   _No response_
   
   ### Error Logs
   
   _No response_
   
   ### Steps to Reproduce
   
   /
   
   ### Environment
   
   /


-- 
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-unsubscr...@apisix.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to