-
Notifications
You must be signed in to change notification settings - Fork 39.3k
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
dnsprovider: Add upsert #39957
dnsprovider: Add upsert #39957
Conversation
Quite right, I do quinton. Sorry to disparage the very worthy 39085 :-) |
@@ -68,6 +68,10 @@ type ResourceRecordChangeset interface { | |||
// Remove adds the removal of a ResourceRecordSet in the Zone to the changeset | |||
// The supplied ResourceRecordSet must match one of the existing recordsets (obtained via List()) exactly. | |||
Remove(ResourceRecordSet) ResourceRecordChangeset | |||
// Upsert adds an "create or update" operation for the ResourceRecordSet in the Zone to the changeset | |||
// Note: the implementation may translate this into Add & Remove operations. If you have the pre-image, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Remove and then Add?
/lgtm @justinsb, my apologies for the delay on this one. |
Although Google Cloud DNS requires strict add & remove calls, most dnsproviders actually support upsert, and an add & remove is much more expensive (primarily because of the need to fetch the pre-image). Add support for 'upsert' operations, which don't require the pre-image, and simply overwrite the existing record. This is much cheaper on Amazon Route53, for example.
adbda2e
to
662ba86
Compare
Rebased and fixed the comment per your suggestion @quinton-hoole - thanks! |
/lgtm |
The integration test failure seems to be completely unrelated to this PR. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED The following people have approved this PR: justinsb, nikhiljindal Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Automatic merge from submit-queue |
Automatic merge from submit-queue dnsprovider: Add upsert Although Google Cloud DNS requires strict add & remove calls, most dnsproviders actually support upsert, and an add & remove is much more expensive (primarily because of the need to fetch the pre-image). Add support for 'upsert' operations, which don't require the pre-image, and simply overwrite the existing record. This is much cheaper on Amazon Route53, for example. ```release-note NONE ```
Although Google Cloud DNS requires strict add & remove calls, most
dnsproviders actually support upsert, and an add & remove is much more
expensive (primarily because of the need to fetch the pre-image).
Add support for 'upsert' operations, which don't require the pre-image,
and simply overwrite the existing record. This is much cheaper on
Amazon Route53, for example.