fix(dns): match record content in upsertRecord to prevent overwriting existing records - #5382
Merged
narcisonunez merged 7 commits intoSep 8, 2026
Conversation
… existing records Previously, upsertRecord matched only by type and name, silently overwriting any existing record of the same type/name with different content. This caused data loss when users had multiple records of the same type (e.g. multiple TXT records for SPF + site verification). Now upsertRecord also checks the record content/target before deciding to update. If the content differs, a new record is created alongside the existing one instead of replacing it. Affected providers: Cloudflare, Porkbun, Infomaniak, OVH. Tests updated accordingly.
imrja8
marked this pull request as draft
September 8, 2026 11:41
imrja8
marked this pull request as ready for review
September 8, 2026 11:46
Contributor
Author
|
@greptileai review |
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Contributor
Author
@greptileai re review |
Contributor
Author
|
@narcisonunez Please, Review this PR. |
narcisonunez
approved these changes
Sep 8, 2026
Collaborator
|
@imrja8 Please, fix the conflicts and should be ready to approve |
Contributor
Author
@narcisonunez Ok, gimme 05-10 mins. |
…eserve-existing-records # Conflicts: # packages/server/src/utils/dns/infomaniak.ts
Contributor
Author
@greptileai re re review |
Contributor
Author
@narcisonunez Conflict resolved, you can have alook.. |
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 is this PR about?
Previously,
upsertRecordmatched only by type and name, silently overwriting any existing record of the same type/name with different content. This caused data loss when users had multiple records of the same type (e.g. multiple TXT records for SPF + site verification).This PR updates
upsertRecordto also check the record content/target before deciding to update. If the content differs, a new record is created alongside the existing one instead of replacing it. This fix is applied globally to Cloudflare, Porkbun, Infomaniak, and OVH providers. The respective unit tests have been updated to test this new behavior.Checklist
Before submitting this PR, please make sure that:
canarybranch.Issues related (if applicable)
Follow up to the issue found in PR #5381
Screenshots (if applicable)
NA
The PR appears safe to merge; no actionable new defects or outstanding blocking findings remain.
Summary