bzp2010 opened a new issue, #12170: URL: https://github.com/apache/apisix/issues/12170
### Current Behavior APISIX generates and writes a configuration file when the Admin API key is empty, which causes the configuration file to be exported from memory and encoded in YAML and then written. https://github.com/apache/apisix/blob/master/apisix/core/id.lua#L124-L133 During this process, comments in the configuration file will be lost, and some will be generated containing `...` ending, which will result in an error on the next startup. ### Expected Behavior Configuration files should not be rewritten in any way. If the Admin API key is empty, we need to write it to the logs and also warn the user there that you need to configure your own key, otherwise every reboot will cause the key to change. ### Error Logs No need ### Steps to Reproduce 1. Set `deployment.admin.admin_key` in the configuration file to the empty string 2. Start APISIX 3. Check config.yaml ### Environment - APISIX version (run `apisix version`): master - Operating system (run `uname -a`): unrelated - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): unrelated - etcd version, if relevant (run `curl http://127.0.0.1:9090/v1/server_info`): unrelated - APISIX Dashboard version, if relevant: unrelated - Plugin runner version, for issues related to plugin runners: unrelated - LuaRocks version, for installation issues (run `luarocks --version`): unrelated -- 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]
