Ensure stable provider result in method DNSProviders.LookupFor #172
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.
What this PR does / why we need it:
DNS entries of a hosted DNS zone are updated per account hash, which is calculated from credentials and other properties. If there are multiple providers with different account hashes but with the same zone(s) a problem was observed. DNS entries which can be assigned to multiple account hashes go to state
Stale
temporarily and it is tried to recreate the DNS records on zone reconciliations. This is caused by flipping account hash assignments of the DNS entries, caused by an instable iteration order in the methodDNSProviders.LookupFor
which returned potential different provider for the same DNS name on each call.The user are not directly affected by this bug, but it causes additional work load and additional requests (creation of already existing records and reload of zone state as zone cache is discarded because of failed creation).
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Release note: