NEW FEATURE: Support DNS LOC record type#2174
Merged
Merged
Conversation
Contributor
|
That's one impressive first draft! Looking good! |
Contributor
Author
|
Feels ready. So, if all of the tests in pkg/js and integrationTest work out, then it's ready? |
Contributor
|
One minor issue: |
j-f1
reviewed
Mar 16, 2023
Contributor
Author
Hmm - that breaks the integration tests. Did you get that from a linter? |
Contributor
What broke? You just need to add a comment that begins with the word SetLOCParams. |
Contributor
Author
|
Ah, sorry, misread your initial comment. Fixed. |
Step 1: Update RecordConfig in models/record.go ✅
Step 2: Add a capability for the record ✅
+providerCapabilityChecks ✅
-TestCapabilitiesAreFiltered ❌
Step 3: Add a helper function ✅
LOC() - requires all 12 parameters
LOC_BUILDER_DD() - accepts x,y coordinates
LOC_BUILDER_DMM_STR() - accepts DMM 25.24°S 153.15°E
LOC_BUILDER_DMS_STR() - accepts DMS 33°51′31″S 151°12′51″E
LOC_BUILDER_STR() - tries LOC_BUILDER_DM*STR()
Step 4: Search for #rtype_variations ✅
Step 5: Add a parse_tests test case ✅
Step 6: Add an integrationTest test case ✅
--- PASS: TestDNSProviders/example.com/47:LOC:Single_LOC_record (6.59s)
--- PASS: TestDNSProviders/example.com/47:LOC:Update_single_LOC_record (6.69s)
--- PASS: TestDNSProviders/example.com/47:LOC:Multiple_LOC_records (18.33s)
--- PASS: TestDNSProviders/example.com/Post_cleanup:Empty#03 (15.70s)
Step 7: Support more providers ✅ (bind, loopia, plus several others)
Step 8: Write documentation ✅
See the docs for the *_STR() helper functions: they each only process a
specific text string format. There are too many formats to consider.
Internally it will import text from existing DNS LOC records - which
are (hopefully) 'known good' - from provider APIs who return them in a
text format.
11/45 available providers support LOC records, or clearly document that
they do. Just shy of 25%.
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.
Add LOC record type.
Step 1: Update RecordConfig in models/record.go ✅
Step 2: Add a capability for the record ✅
+providerCapabilityChecks ✅
-TestCapabilitiesAreFiltered ❌
Step 3: Add a helper function ✅
LOC()- requires all 12 parametersLOC_BUILDER_DD()- accepts x,y coordinatesLOC_BUILDER_DMM_STR()- accepts DMM 25.24°S 153.15°ELOC_BUILDER_DMS_STR()- accepts DMS 33°51′31″S 151°12′51″ELOC_BUILDER_STR()- triesLOC_BUILDER_DM*STR()Step 4: Search for #rtype_variations ✅
Step 5: Add a parse_tests test case ✅
Step 6: Add an integrationTest test case ✅
Step 7: Support more providers ✅ (bind, loopia, plus several others)
Step 8: Write documentation ✅
See the docs for the
*_STR()helper functions: they each only process aspecific text string format. There are too many formats to consider.
Internally it will import text from existing DNS LOC records - which
are (hopefully) 'known good' - from provider APIs who return them in a
text format.
11/45 available providers support LOC records, or clearly document that
they do. Just shy of 25%.