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

Remove escaping func for TXT content to fix constant update of TXT records #38

Merged
merged 1 commit into from
Dec 5, 2023

Conversation

Archirk
Copy link

@Archirk Archirk commented Dec 5, 2023

Escaping semicolumn function, apparently redundant and causes always update of TXT records.
We can not provide unescaped ";" since errors is risen from this validation process:
https://github.com/octodns/octodns/blob/main/octodns/record/chunked.py#L53
So removed func always adds extra slash, which forces octodns during sync to think that updated is required.
e.g.
We have record described as:

some-txt:
  ttl: 120
  type: TXT
  value: v=DKIM1\; k=rsa\; p=MIG

Which during sync will say:

* selectel (SelectelProvider)
*   Create <TxtRecord TXT 120, some-txt.octodns-chirkov.com., ['v=DKIM1\; k=rsa\; p=MIG']> (config)
*   Summary: Creates=1, Updates=0, Deletes=0, Existing Records=0

But if do sync again:

* selectel (SelectelProvider)
*   Update
*     <TxtRecord TXT 120, some-txt.octodns-chirkov.com., ['v=DKIM1\\; k=rsa\\; p=MIG']> ->
*     <TxtRecord TXT 120, some-txt.octodns-chirkov.com., ['v=DKIM1\; k=rsa\; p=MIG']> (config)
*   Summary: Creates=0, Updates=1, Deletes=0, Existing Records=1

While on the server side result will remain the same v=DKIM1\; k=rsa\; p=MIG

Copy link
Contributor

@ross ross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have access to selectel so going to have to trust that this makes sense. Code-wise it's 👍

@ross ross merged commit 30bb472 into octodns:main Dec 5, 2023
7 checks passed
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.

2 participants