PrettySort doesn't call sort! Luckily the only code that calls this is the "get-zones" subcommand, and nobody noticed that the output isn't sorted.
By making this change, people using "get-zones" to make their initial dnsconfig.js file will now find that their draft D() code is a little prettier.
* preview/push: ensure zones exists before querying them
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
* HETZNER: reset zone cache when creating a new zone
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
* ROUTE53: reset zone cache when creating a new zone
Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
* Fix typo and add sandbox information
* Use SetTargetTXT in GetZoneRecords
This fixes the behavior documented in #1622
Also apply cleanup to GetZoneRecords
* Remove SetTargetTXT, does not work in all tests
* Set The most correct TXT handling
* Well, There's your problem
* Add an audit and test for unpaired quotes
* Add some commentary
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
* Move the registrar features to a separate file
* Prepare the testing framework
* Roughed out functions
* Fix up structs
* WIP!
* First tests pass
* wip!
* Flesh out remaining rTypes, get nameservers, etc
* Fix TXT records
* Clean up code
* More cleanups. Fix CAA/SRV
* Linting
* Cleanups/linting
* Fix CAA [more] and more cleanups
* CSC does not like very long txt records
* Use timer only when interactive
* Disable CAA for now
* Update docs
* Remove debug printf
* add go-isatty
* cleanups
An RRSet (=label) consisting of multiple records with different TTLs is
something not supported by most providers, and should be avoided.
Furthermore it is deprecated in rfc2181#section-5.2
Emit a warning for now during validation, eventually turning it into a full-blown error.
Fixes#1372
* Emit warning in case of label having multiple TTLs
An RRSet (=label) consisting of multiple records with different TTLs is
something not supported by most providers, and should be avoided.
Furthermore it is deprecated in rfc2181#section-5.2
Emit a warning for now during validation, eventually turning it into a full-blown error.
Fixes#1372
* normalize: less verbose checkLabelHasMultipleTTLs
Code would previously emit a warning for each record it found matching a
previously found label but with a different ttl. This could potentially become
too verbose of an output for larger zones.
Split the loop into two loops, one storing labels and their records' TTLs, the
second checking for multiple TTLs, in order to minimize the messages logged to
one message per problematic label, regardless for the number of records involved.
Co-authored-by: Tom Limoncelli <tlimoncelli@stackoverflow.com>
012_duration creates multiple records under the same label, with different TTLs
We plan to deprecate this going forward, in #1372.
Modify the test in a way that creates one label per record, each having a
different TTL format as before, to be validated.
All functions in should test for only one condition. There already is a
function that tests for long TXT records: TxtNoLongStrings.
Add calls to TxtNoLongStrings in all providers that use
TxtNoMultipleStrings, to keep functionality, except for NS1 and ClouDNS,
which allow for any TXT record length, but not for multiple strings per
TXT.