Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REFACTOR: Opinion: TXT records are one long string #2631

Merged
merged 137 commits into from
Dec 4, 2023

Conversation

tlimoncelli
Copy link
Contributor

@tlimoncelli tlimoncelli commented Nov 18, 2023

This big PR implements an internal change to how TXT records are handled. There should be no user-visible changes.

  • TXT-handling code is now simplified with fewer edge-cases
  • A new opinion is added ("Opinion # 8 TXT Records are one long string")
  • The get-zone subcommand now generates TAB-separated files that are more correct for TXT records (no quotes).

TXT record handling was complex because we abstract them at the wrong layer.

OLD: We try to maintain TXT records as a list of sub-strings, creating complexity at the main level, the diff engine, and the provider level.

NEW: TXT records are stored as a single (possibly very long) string. If a provider's API requires long strings to be split up, joined, escaped, or quoted the provider must handle that internally; it should be invisible to the main code and (more importantly) invisible to the user.

@tlimoncelli tlimoncelli merged commit cbccbbe into master Dec 4, 2023
16 checks passed
@tlimoncelli tlimoncelli deleted the tlim_newtxt_minimal branch December 4, 2023 22:45
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.

5 participants