Remove ALIDNS_LINE_MAP#2
Open
sschyu wants to merge 2 commits into
Open
Conversation
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.
Aliyun has supported more types of resolution line enumeration than before. ALIDNS_LINE_MAP is not updated with the latest. Please refer to: https://help.aliyun.com/document_detail/29807.html
If the Aliyun DNS is configured with a resolution line other than the ones populated in
ALIDNS_LINE_MAP, such asos_euro_gbin the example below,black_dnsync.dns_client.AliyunClient#__to_recordthrows outUnsupportedLineError.If we update
ALIDNS_LINE_MAPwith the enumeration provided by Aliyun, it will become bulged with hundreds of lines. It's unmaintainable as Aliyun regularly update their APIs.IMHO we could delegate the responsibility to check the validity of resolution line enumeration to Aliyun DNS API instead, thus relieve the burden from black-dnsync.
Aliyun DNS API comes with request parameter validation and responds with
SubDomainInvalid.Lineif the resolution line parameter is invalid.However, removing
UnsupportedLineErrorpresent the risk of failing amid record updating and committing only partial changes to Aliyun.Notice that
line=mumblejumbleis invalid thus interrupts the updating process withAPIError.Other DNS providers (DNSPod, DNSimple, CloudXNS) are not taken into account yet.