Skip to content

feat(dns plugin): add --no-managed to list only your own records - #108

Merged
scotwells merged 3 commits into
feat/truncate-long-valuesfrom
feat/exclude-managed-records
Aug 26, 2026
Merged

feat(dns plugin): add --no-managed to list only your own records#108
scotwells merged 3 commits into
feat/truncate-long-valuesfrom
feat/exclude-managed-records

Conversation

@scotwells

@scotwells scotwells commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

--managed could only answer half the question. It showed the records Datum writes for you, but there was no way to ask the opposite — what did I put here — and in a zone where another system writes most of the records, that is the more useful view.

--no-managed is that view:

  • --managed — the records Datum manages for you
  • --no-managed — only your own
  • absent — everything, unchanged

--managed=false means the same as --no-managed. It already parsed before this filter existed, where it silently meant "no filter", so anyone typing the intuitive thing got the unfiltered list back with no sign their flag had done nothing. Leaving it inert now would be the more surprising choice.

Passing both flags is a usage error rather than a precedence puzzle resolved silently.

In datum-staging.net, where a connector writes 15 of the 19 owner names:

$ datumctl dns record list datum-staging.net --no-managed
NAME                                       TYPE   TTL    VALUE                                    STATUS
_datum-custom-hostname.datum-staging.net   TXT    Auto   "3fd32fac-dfc3-4e97-9041-ca1b31346a1e"   Programmed
ns1                                        A      5m     34.85.246.201                            Programmed
ns2                                        A      5m     34.85.246.201                            Programmed
testing-dns                                A      Auto   1.1.1.1                                  Programmed

That table is ~90 columns. The unfiltered one is 180, because the machine-written names are 69 characters each.

Why this rather than truncating NAME

NAME is an address — record describe|delete <domain> <name> <TYPE> take it as an argument — so shortening it costs you the ability to act on the row, unlike a value, which is never typed. Measured across real zones, a 56-column cap would also cut 59% of one zone's rows while doing nothing at all in another. Removing rows you did not ask about beats damaging the identifiers of rows you did.

Related

Three readability fixes for datumctl dns record list, reviewed and merged bottom-up:

  1. fix(dns plugin): shorten long record values in the default table #107 — shorten long values (base: main)
  2. feat(dns plugin): add --no-managed to list only your own records #108--no-managed to hide records another system writes
  3. fix(dns plugin): shorten machine-written names in the default table #109 — shorten machine-written names

All three follow #102, which added the plugin, and are UX fixes found while using it against real staging zones. The plugin ships from #106's release plumbing and is installed via datum-cloud/datumctl-plugins#22.

This alone was not enough for zones where a third party writes the records — Datum does not label those as managed — which is what #109 addresses.

`--managed` could only answer half the question. It showed the records Datum writes for you, but there was no way to ask the opposite — what did I put here — and in a zone where another system writes most of the records, that is the more useful view.

`--no-managed` is that view. It is the spelling people reach for, and a negated flag reads better in a script than a value on a positive one.

`--managed=false` means the same thing. It already parsed before this filter existed, where it silently meant "no filter", so someone who typed the intuitive thing got the unfiltered list back and no indication their flag had done nothing. Leaving it inert now would be the more surprising choice.

Passing both flags is a usage error rather than a precedence puzzle resolved silently, and an absent flag still means no filter, which is what separates it from `--no-managed`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@scotwells
scotwells force-pushed the feat/exclude-managed-records branch from c5bcb28 to 4202cbe Compare August 26, 2026 01:54
Excluding the records Datum manages fixed one zone's width but not the general case: any system that writes into DNS puts an encoded identifier in the owner name, and Datum does not label a third party's records as managed.

Names split cleanly into two populations. The ones people write are conventions with fixed shapes — @, www, _dmarc, _acme-challenge, a DKIM selector — and run to about twenty characters. The ones machines write carry an identifier and start around thirty-two: a hex digest at 32, a UUID at 36, or the 52 characters a base32-encoded 256-bit key costs. 40 sits in the gap, so a hand-written name is shown whole and an encoded one is cut.

Cutting a name costs more than cutting a value, because a name is an argument: `record describe` and `record delete` take one. The footer now counts names separately from values and points at the output that carries them in full, and `-o name` — which exists to turn a row back into something you can pass to those commands — is never shortened.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@scotwells scotwells changed the title feat(dns plugin): let --managed exclude as well as include feat(dns plugin): add --no-managed to list only your own records Aug 26, 2026
@scotwells
scotwells requested review from a team and fr6nco August 26, 2026 13:05
fix(dns plugin): shorten machine-written names in the default table
@scotwells
scotwells merged commit 3510faf into feat/truncate-long-values Aug 26, 2026
@scotwells
scotwells deleted the feat/exclude-managed-records branch August 26, 2026 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants