pronchakov opened a new pull request, #12885: URL: https://github.com/apache/apisix/pull/12885
### Description There is a little bug in function `local function resolve_conf_var(conf)` in `cli/file.lua` `conf.key = nil` deletes entry from conf with name "key" but after variable substitution, old entry with name contained in variable `key` should be removed. so it needs to be rewritten to `conf[key] = nil` `conf.key = nil` results in adding entry with resolved variable to conf, but doesn't remove entry with unresolved variable name. In case of using it in routes->upstream->nodes it results in two node entries. one is correct and one with unresolved variable name in it, that results in dns error in logs. I suppose that another places will result in different consequences. #### Which issue(s) this PR fixes: Fixes #12884 ### Checklist - [x] I have explained the need for this PR and the problem it solves - [x] I have explained the changes or the new features added to this PR - [ ] I have added tests corresponding to this change - [ ] I have updated the documentation to reflect this change - [ ] I have verified that this change is backward compatible (If not, please discuss on the [APISIX mailing list](https://github.com/apache/apisix/tree/master#community) first) -- 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]
