Ask questionsAPI: Autofill Service.Address with Node.Address if Service.Address is empty
Whenever the Consul API reports a
Service.Address, if this value is blank/empty, default to the address of the Node instead of leaving the value blank.
We currently document that a blank value is expected behaviour in the catalog endpoint documentation, although changing this could improve DX and is therefore a feature request.
ServiceAddress is the IP address of the service host — if empty, node address should be used
Make it easier for API consumers/clients to retrieve the IP address of a service, even when there is no need for the registration of the service to provide an IP.
@mkeeler this is re: offline chat
Answer questions jf
I agree with you on the initial issue, but I think that many tools are now doing assumptions based on this value being present or not, see my comment: #7782 (comment)
I'm late to this issue but... what tools would these be, and why would they care about it being empty (
""?) vs being filled with an actual IP address? I fail to see why having the actual IP address reflected in Service.Address is a problem vs it's current