GIGAHOST: Fix API quirks surfaced by the integration tests - #4617
Merged
TomOnTime merged 1 commit intoJul 27, 2026
Conversation
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
approved these changes
Jul 27, 2026
TomOnTime
left a comment
Collaborator
There was a problem hiding this comment.
Looks good! Thanks for the fast response!
TomOnTime
added a commit
that referenced
this pull request
Jul 27, 2026
* gigahost: Modernize record conversion * GIGAHOST: Fix API quirks surfaced by the integration tests (#4617) 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. --------- Co-authored-by: Jo Christian Buvarp <jochristian@gmail.com>
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.
Fixes for #4553 — provider-level Gigahost API quirks the integration tests surfaced, all verified against the live API with a dedicated test zone. None are caused by the modernization changes; they were latent in the provider (or the API's behavior has changed since the provider was written).
Fixes
record_valuethe API itself returns for MX; it requires the internal RDATA presentation"<priority> <target>.". AddeddeleteValue().request()now retries up to 5 times with 2s→32s backoff, honoringRetry-After..target ("MX record value must be a valid mail server hostname") → audit-reject withrejectif.MxNull.dig) but reads back mangled (trailing\"→\), breaking diffing and deletes →rejectif.TxtHasDoubleQuotes.rejectif.TxtStartsOrEndsWithSpaces.dig). Audit-rejects >1 NAPTR per label, and marks theNAPTR delete second recordtestcase.AllowNoChanges()so providers that audit-skip the multi-NAPTR case don't fail on the already-converged state.Validation
Also:
go vet,gofmt,go test ./providers/gigahostclean.