Repository navigation
Conversation
Collaborator
|
Hello friend! Thanks for submitting this! It looks good so far. I'm having a very busy week and might not be able to finish the review until next week. Thank you for understanding. |
Author
|
Sure, understand. Take your time. |
This branch has not been deployed
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.
Adds a DNS provider for PrimeDNS (
PRIMEDNS). I run PrimeDNS and will maintain this provider.Please create the GitHub label
provider-PRIMEDNS.What it does
https://api.primedns.net/v1),diff2.ByRecord.creds.json:api_key(required),api_url(optional).ZoneListerandZoneCreator.get-zones,create-zonesandpreview/pushwork.dns:readanddns:write. If the key cannot list zones through/domains, the zone list is built from the records it can read (so a key limited to some zones works).Retry-After.CanConcurisCannot.auditrecords.gorejects only what the API refuses: null MX, empty TXT, TTL outside 60-86400, and an extra apex NS record whose TTL differs from PrimeDNS's own (8000 s). The API keeps one TTL per name and type (RFC 2181 section 5.2); the audit message tells the user to addTTL(8000).Testing
go test ./providers/primedns/(record conversion, TXT, MX/SRV priority, SRV null target, SVCB/HTTPS params, empty non-terminals, zone listing without thedomains:readscope, apex NS TTL audit).go test ./integrationTest -args -profile PRIMEDNS), last run on this branch rebased onmainat 148c2d4: 317 passed, 0 failed, 64 skipped. The skipped tests are types and features this provider does not declare (RP, SMIMEA, CSYNC, DHCID, DNSKEY, SOA and the pseudo-types of other providers) and the cases rejected byauditrecords.go.pushof 29 records of 20 types, a secondpushgives 0 corrections,get-zonesthenpreviewof the result gives 0, and changes, TTL changes and deletions work.testing-txt-records.md: PrimeDNS reads a value that starts with a double quote as zone-file notation, so"test2"created in the portal is served astest2; DNSControl sends literal quotes in escaped form and they come back unchanged (documented inprimedns.md).bin/generate-all.sh,staticcheckandgolangci-lintare clean.CI
The integration test needs a PrimeDNS API key and a zone whose records can be deleted. I added the
PRIMEDNS_*variables topr_integration_tests.ymlas described in the provider guide. I can provide a key and a test zone for the project's own secrets if you want PrimeDNS covered by the automated runs, or leave it out of CI.Notes
get-zones --format=jswrites HTTPS and SVCB parameters as[h2,h3]instead of a quoted string; this is not specific to this provider (BIND gives the same), I will report it separately.