The question is: are there any higher-level applications which ascribe
semantic value to the TXT string boundaries?
IMO the safest approach is to always treat TXT records as an array of
strings, but treat the TXT constructor with one long string as
something which splits internally to multiple strings, long before
talking to the service provider's API.
But "safest" != "most pragmatic".
The DNS protocols treat TXT records as a sequence of 255-byte chunks.
From that, I conclude that no applications do this.
The DNS protocols treat TXT records as a sequence of 255-byte chunks.Small nit-pick: It's not sequences of 255-byte chunks but rather sequences of chunks of bytes, each individually sized and up to 255 bytes long.I can't come up with an instance of any use case where the semantics of a sequence of strings differs from a single string either.From that, I conclude that no applications do this.And no one can introduce it to a broad audience as providers don't support it.DNSControl's tag line is: "DNSControl is an opinionated platform"We can be opinionated about this!I would simplify the TXT interface to just a single string – no array – with a length of up to 65,280 bytes (the maximum possible TXT record size).
Maybe, if it's not too much effort, we can keep records that aren't "canonicalised" into 255-byte chunks (but the last one) and change them to the "canonicalised" representation on updates only.
If necessary, we could introduce an additional domain modifier that allows for the <character-string>s to be set individually for providers that support them (and throw an error otherwise).
Other binaries are here: https://github.com/StackExchange/dnscontrol/releases/tag/v4.7.0
The code is in the https://github.com/StackExchange/dnscontrol/tree/tlim_newtxt_minimal branch.
There should be no user-visible difference. Please test this with your data (`preview` first, of course!). If you maintain a provider, please try the integration tests again to verify everything works.
Feedback welcome!
Tom