Fix bug in Route 53 ALIAS record#336
Merged
captncraig merged 1 commit intoStackExchange:masterfrom Jun 25, 2018
koenrh:fix-route53-alias-record-type
Merged
Fix bug in Route 53 ALIAS record#336captncraig merged 1 commit intoStackExchange:masterfrom koenrh:fix-route53-alias-record-type
captncraig merged 1 commit intoStackExchange:masterfrom
koenrh:fix-route53-alias-record-type
Conversation
Contributor
|
Good catch! Can you add a test for this? (either a unit test for getKey() or an integration test in integrationTest/integration_test.go ?) |
rblenkinsopp
pushed a commit
to rblenkinsopp/dnscontrol
that referenced
this pull request
Aug 21, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
While test-driving the Route 53 ALIAS record type, I noticed a little bug that prevents one from using multiple ALIAS records for the same record set name. For example, two ALIAS records for the record set name
wwwwith record set typesAandAAAA, respectively.If one would deploy this configuration, then only an ALIAS record set for
wwwwith record set typeAwould have been created. The first one (wwwwith record set typeAAAA) would have been skipped.This is caused by the way the
updatesmap in the example below is populated. The key (a struct) contains both a 'Name' (e.g.www.foo.bar) and aType(e.g.R53_ALIAS). Which means that two ALIAS records, with different record set types, end up with the same key (www.foo.bar,R53_ALIAS), which means that only either of the ALIAS records (the latter) is actually deployed.dnscontrol/providers/route53/route53Provider.go
Lines 191 to 198 in cd58d26
I have added a quick fix that appends the resource record type to the actual record type so that different ALIAS records will actually be considered as such. I'm curious to know what you think, and/or whether this should be addresses in a different way.