jr-instantsystem commented on PR #13025:
URL: https://github.com/apache/apisix/pull/13025#issuecomment-4168612109

   @Baoyuantop Thanks for the details, didn't know about the deep copy :)
   
   as fetch_secrets is making a copy of the object, would this be ok in 
`fetch_and_update_es_version` ?
   ```
       -- resolve secrets & env vars
       local conf_resolved = fetch_secrets(conf, true)
   
       ...
       local major_version, err = get_es_major_version(selected_endpoint_addr, 
conf_resolved)
       ...
   
       conf._version = major_version
   ```
   Because we absolutly need to resolv secrets when calling 
`get_es_major_version`, to prevent any 401 to happen.
   Or this could be moved inside `get_es_major_version` directly too, maybe 
better there


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

Reply via email to