JanLi-air opened a new issue #2833:
URL: https://github.com/apache/apisix/issues/2833


   ### Issue description
   config.yaml is used to override those configurations in config-default.yaml.
   
   The problem is that some configurations are too niche to be included in 
config-default.yaml. Such as proxy_protocol.
   
   But if you override something not in config-default.yaml, you will get an 
error when you init apisix.
   
   ### Environment
   
   * apisix version (cmd: `apisix version`): 2.0
   * OS: Mac
   
   ### Minimal test code / Steps to reproduce the issue
   1. Add proxy protocol in config.yaml
   2. Run make init
   
   
   ### What's the actual result? (including assertion message & call stack if 
applicable)
   You will get this error:
   ```
   lua: ./bin/apisix:808: attempt to index a nil value (local 'base')
   stack traceback:
           ./bin/apisix:808: in upvalue 'merge_conf'
           ./bin/apisix:805: in upvalue 'merge_conf'
           ./bin/apisix:805: in upvalue 'merge_conf'
           ./bin/apisix:849: in upvalue 'read_yaml_conf'
           ./bin/apisix:1015: in field '?'
           ./bin/apisix:1355: in main chunk
           [C]: in ?
   make: *** [init] Error 1
   ```
   
   ### What's the expected result?
   make init should be able to handle this case: when a config is not defined 
in config-default.yaml, but defined in config.yaml


----------------------------------------------------------------
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.

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


Reply via email to