gigahost: Modernize record conversion - #4553
Conversation
|
Ran the integration tests as requested, against a dedicated test zone ( Your conversion changes work — all record types round-trip correctly through the new factories, including the CAA/SRV/NAPTR presentation strings via The first runs failed on Gigahost API quirks unrelated to this PR (each reproduced with Feel free to merge #4617 into this branch or cherry-pick — whatever is easiest. Happy to re-run the suite after any changes. |
All verified against the live API with a dedicated test zone:
- DELETE of an MX record requires value="<priority> <target>." (the
internal RDATA presentation); the record_value the API returns 404s.
- Retry requests on 429 with backoff (honoring Retry-After); the API
rate-limits aggressively enough that a normal push can trip it.
- Reject null MX ("0 ."): the API requires a valid mail server hostname.
- TXT values over 255 octets must be sent as RFC1035 quoted 255-octet
chunks; the API returns that form with the outer quotes stripped, so
decode it on read.
- Reject TXT values containing double quotes: raw interior quotes are
rejected by the API's zone parser, and the escaped form stores
correctly but reads back mangled (trailing '\"' becomes '\'),
breaking diffing and deletes.
- Reject TXT values with leading/trailing spaces: the API trims them.
- Reject more than one NAPTR record per label: POSTing a second NAPTR
silently replaces the entire NAPTR RRset. Mark the
'NAPTR delete second record' testcase AllowNoChanges so providers
that audit-skip the multi-NAPTR case don't fail on the already-
converged state.
|
Thanks for fixing all those quirks, jochristian! That's a lot of quirks!! |
Dear @jochristian. I could use your help. I'm doing upgrades to the code base and I have no way to test your provider. Please run the integration test and let me know the result. How to run integration tests is here: https://docs.dnscontrol.org/developer-info/integration-tests
Summary
Validation
../../bin/is_modern.sh(Steps 1-7 clean)go test ./providers/gigahostbin/generate-all.shgo test ./...