Repository navigation
fix(dns): find SRV and TLSA records by name in dns list, set and delete - #360
Merged
Merged
Conversation
Route reviews for `gddy dns` and `gddy domain` changes to the DNS and domains owners instead of only the default reviewers, and regenerate CODEOWNERS to match. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
SRV and TLSA records could not be found by the name they are listed under. `dns list --type SRV --name chat` returned nothing, `dns delete` reported `deleted: 0` and left the record in place, and `dns set` could not see the existing records, so it tried to create a duplicate or reported a record it had just written as missing. The records are now matched by name in the CLI, so those commands find every SRV or TLSA record listed under the name, whatever its service or port. `dns delete --type SRV --name chat` therefore removes all of them; the guide says so, and `--dry-run` shows what would go. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
jpage-godaddy
requested review from
axburgess-godaddy,
jpearlman-godaddy,
mguerrero3-godaddy,
qcai-godaddy and
rts1-godaddy
as code owners
November 4, 2026 18:09
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The change regresses composed-name SRV and TLSA deletion, causing previously working commands—including generated duplicate-record cleanup commands—to silently delete zero records.
1 open issue
What changed in this PR
Fixes short-name lookups for SRV and TLSA records in the shared DNS fetch used by list, set, and delete.
Changes:
- Matches SRV and TLSA names locally, ignoring case, with unit tests covering filtering behavior.
- Documents that short-name deletion includes all matching services or ports.
- Adds DNS and domains reviewers and updates generated code ownership.
| File | Description |
|---|---|
rust/src/dns/records.rs |
Adds local SRV/TLSA name filtering and regression tests. |
rust/src/dns/guides/dns.md |
Explains short-name deletion scope and recommends previewing. |
.github/scripts/reviewers.json |
Assigns DNS and domains reviewers. |
.github/CODEOWNERS |
Synchronizes ownership with reviewer assignments. |
Review effort: Balanced
…and delete Matching SRV and TLSA records by their listed name stopped `--name _sip._tcp.chat` from finding anything, because it only compared the short name. The full name is now accepted alongside the short one, in either case, and selects only the record for that service (or, for TLSA, that port). The short name still matches every service or port under it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
For a record at the zone apex, the full name is just the service and protocol (or port and protocol), with no trailing name. The full-name match added for SRV and TLSA wrongly appended `.@`, so `--name _sip._tcp` found nothing for an apex record and `dns delete` reported `deleted: 0`. The apex form is now built without the suffix. Moves the record helper tests into their own file, which the repository's file-size limit requires. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A record can be literally named `_sip._tcp.chat` alongside a record named `chat` with that service and protocol, and both answer to the full name `_sip._tcp.chat`. A delete by that name would then also remove the other owner's record. When a record is listed under exactly the name given, only that name's records are now selected; the full-name form is used only when no record has that name. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… dns set `dns set` paired the records you asked for with the existing ones using an exact text comparison, but the API stores a hostname target with a trailing dot and in lower case. For SRV, asking for `b.example.com` when `chat` already held `a.example.com.` and `b.example.com.` matched neither, so the request was paired with the wrong record, failed as a duplicate, and the cleanup then deleted `b.example.com.` as surplus, leaving only the target that was meant to go. Records are now compared the way the API holds them: names and hostname targets (CNAME, ALIAS, MX, SRV, HTTPS, SVCB) without case or a trailing dot, CAA data and TLSA hex without case, and values the API keeps as written (TXT, AAAA, HTTPS/SVCB parameters, SRV service and protocol) exactly. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
rts1-godaddy
approved these changes
Nov 4, 2026
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.


What changes for users
SRV and TLSA records can now be found by the name they are listed under in
gddy dns list,dns setanddns delete.Before, the API's name filter only understood a composed name (
_service._proto.namefor SRV,_port._proto.namefor TLSA), while a record is listed under its short name. So with an SRV recordchatin place:dns list <domain> --type SRV --name chatreturned nothing.dns delete <domain> --type SRV --name chatreporteddeleted: 0, exited successfully, and left the record in place.dns setcould not see existing records, so it tried to create a duplicate and failed, or (with the in-placesetin fix(dns): replace records in place with dns set and confirm the final result #359) created a new record and then reported it as missing.Now the CLI fetches records of the type and matches the name itself, ignoring case. Either form of the name works:
--name chat): every SRV record listed underchat, whatever its service. For TLSA, every port.--name _sip._tcp.chat, or_443._tcp.wwwfor TLSA): only that service's (or port's) record. At the zone apex the full name has no suffix (_sip._tcp). This form keeps working as it did before, including in the commands the CLI suggests when a record already exists.chatand a record literally named_sip._tcp.chatstay separate owners and a delete by one cannot reach the other.Behavior to be aware of:
dns delete --type SRV --name chatremoves every SRV record listed underchat. That is what the command says, but it used to remove nothing for these types. The guide says so, shows the full-name form for targeting one service, and recommends--dry-runfirst.dns setno longer deletes the record you asked to keepFor SRV,
dns setcould delete the target you asked to keep: withchatholdinga.example.com.andb.example.com.,set --data b.example.comleft onlya.example.com.. The API stores hostname targets with a trailing dot, the pairing compared text exactly, so the request matched the wrong record, failed as a duplicate, and the cleanup then deleted the one that was meant to stay.Records are now compared the way the API holds them: names and hostname targets (CNAME, ALIAS, MX, SRV, HTTPS, SVCB) without case or a trailing dot, CAA data and TLSA hex without case, and values it keeps as written (TXT, AAAA, HTTPS/SVCB parameters, SRV service and protocol) exactly. #359, which is stacked on this PR, builds on the same comparison. A regression test fails without it.
Under the hood
--namethere is nothing to match, so those lists are unchanged.set, so it relies on this lookup finding SRV and TLSA records.records_tests.rs), which the repository's file-size limit requires.Also in this PR
reviewers.json(and regeneratesCODEOWNERS, which the drift check requires). This is a separate commit.Verification
cargo check --workspace,cargo clippy --workspace --all-targets -- -D warnings,cargo fmt --check,cargo test --workspace(1172 tests in the main crate) and./rust/scripts/check-module-size.shall pass.setregression above.list --name <name>finds the record (it returned nothing before) and a name that doesn't exist returns nothing;delete --dry-runfinds records anddeleteremoves them (deleted: 1);setcreating a new SRV record creates it, and thea/bcase above now keepsb.example.com.;_sip._tcp) finds and deletes an apex SRV record, and adding, listing by@, and deleting an apex SRV record all work end to end.--name @) with a 400 while still creating the record. It now returns a normal 201, so apex records are created, listed, set and deleted without an error. No CLI change was needed for that; the apex lookup in this PR is unaffected by it.🤖 Generated with Claude Code