Skip to content

gigahost: Modernize record conversion - #4553

Merged
TomOnTime merged 6 commits into
release_candidate_v5from
mod_gigahost
Jul 27, 2026
Merged

gigahost: Modernize record conversion#4553
TomOnTime merged 6 commits into
release_candidate_v5from
mod_gigahost

Conversation

@TomOnTime

Copy link
Copy Markdown
Collaborator

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

  • replace legacy record construction with current domain-aware factories
  • replace the combined legacy getter with typed RDATA output
  • preserve Gigahost's hostname and raw TXT normalization
  • add focused conversion regression tests

Validation

  • ../../bin/is_modern.sh (Steps 1-7 clean)
  • go test ./providers/gigahost
  • bin/generate-all.sh
  • go test ./...

@TomOnTime
TomOnTime marked this pull request as ready for review July 24, 2026 02:48
@jochristian

Copy link
Copy Markdown
Collaborator

Ran the integration tests as requested, against a dedicated test zone (dnscontroltest-gigahost.com) I set up for this.

Your conversion changes work — all record types round-trip correctly through the new factories, including the CAA/SRV/NAPTR presentation strings via GetRDATA().String().

The first runs failed on Gigahost API quirks unrelated to this PR (each reproduced with curl against the live API): MX deletes need the RDATA presentation form as the value param, aggressive 429 rate limiting, TXT >255-octet chunking rules, TXT double quotes that can't round-trip, null-MX rejection, and NAPTR RRsets being silently replaced on POST. I've put the fixes in #4617 (targeting this branch). With those applied on top of mod_gigahost:

ok  github.com/DNSControl/dnscontrol/v5/integrationTest  87.9s
239 PASS / 77 SKIP / 0 FAIL

Feel free to merge #4617 into this branch or cherry-pick — whatever is easiest. Happy to re-run the suite after any changes.

jochristian and others added 2 commits July 27, 2026 15:27
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.
@TomOnTime
TomOnTime merged commit 70425d2 into release_candidate_v5 Jul 27, 2026
24 checks passed
@TomOnTime
TomOnTime deleted the mod_gigahost branch July 27, 2026 19:57
@TomOnTime

Copy link
Copy Markdown
Collaborator Author

Thanks for fixing all those quirks, jochristian! That's a lot of quirks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants