Current Behavior
This bug was discovered by @juzhiyuan and confirmed by @nic-6443. Thanks for their keen observations!
When APISIX is initially started, it loads the full configuration from etcd, and when there are any changes to the configuration in etcd, APISIX will get a change event to update its memory cache.
When loading full configuration and processing change events, APISIX will check the correctness of configuration entries to weed out configurations that do not conform to the schema specification.
When checking for change events, if an event in the event set does not pass the check, it will issue an error and interrupt subsequent event processing, so some configuration changes will not be loaded and applied to the data plane.
This is wrong, it should just issue the log and skip this event and move on to the others. When the user fixes the configuration, it will go through the check and apply it in a new event.
Expected Behavior
Only incorrect events should be skipped and the correct configuration that follows should be applied correctly.
Error Logs
No logging, logging is interrupted when an error is triggered.
Steps to Reproduce
- Modify multiple resources and introduce some error entries in them.
- you will find that there are correct configurations that should be applied that are not loaded correctly.
Environment
- APISIX version (run
apisix version): at least 2.0 to latest
- Operating system (run
uname -a): independent
- OpenResty / Nginx version (run
openresty -V or nginx -V): independent
- etcd version, if relevant (run
curl http://127.0.0.1:9090/v1/server_info): independent
- APISIX Dashboard version, if relevant: independent
- Plugin runner version, for issues related to plugin runners: independent
- LuaRocks version, for installation issues (run
luarocks --version): independent
Current Behavior
When APISIX is initially started, it loads the full configuration from etcd, and when there are any changes to the configuration in etcd, APISIX will get a change event to update its memory cache.
When loading full configuration and processing change events, APISIX will check the correctness of configuration entries to weed out configurations that do not conform to the schema specification.
When checking for change events, if an event in the event set does not pass the check, it will issue an error and interrupt subsequent event processing, so some configuration changes will not be loaded and applied to the data plane.
This is wrong, it should just issue the log and skip this event and move on to the others. When the user fixes the configuration, it will go through the check and apply it in a new event.
Expected Behavior
Only incorrect events should be skipped and the correct configuration that follows should be applied correctly.
Error Logs
No logging, logging is interrupted when an error is triggered.
Steps to Reproduce
Environment
apisix version): at least 2.0 to latestuname -a): independentopenresty -Vornginx -V): independentcurl http://127.0.0.1:9090/v1/server_info): independentluarocks --version): independent