Introduce a preference config for multiple hosts during db detection #2508
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If we detect multiple addresses during the connect cycle for a datastore, in the past we null the address out and pass nothing up. This config allows us to choose what to do: NONE (as we've always done), FIRST or LAST.
This came up when working with Azure SQL from inside of Azure App Services. We appeared to be getting re-directed from the requested host to a 'worker' host and thus we would send up NULL in the server.address field. Setting this to FIRST fixes that problem.
Resolves: #2493