-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
AWS: change the order of the actions, DELETE before CREATE fixes #1411 #1555
AWS: change the order of the actions, DELETE before CREATE fixes #1411 #1555
Conversation
Welcome @OmerKahani! |
/assign @hjacobs |
/assign @Raffo |
5f23ec9
to
231fbea
Compare
The changes look good, but given the change in semantic, I'd love to get some more feedback from people using ExternalDNS on AWS extensively. Can we have as well a sequence of steps to replicate #1411 @OmerKahani ? |
Reading the docs, looks good to me, but one question I have is if the other cases that use |
The easiest way to replicate it is to create an ingress without the |
this is the only place: |
Then sortChangesByActionNameType() was unused and we should have a linter check. |
I checked it and no we have not. |
Sorry, I meant it's not been used outside this function, it is been used in this function. if cs is bigger then batch size, the function will split cs to batches, and for every batch will run sortChangesByActionNameType(). |
I see and checked the code in the changed function. LGTM |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: OmerKahani, Raffo The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@Raffo thanks for merging this one! Do you have some idea when a new release with this fix will be released? We're waiting for it to fix some issues we're having in a production service. |
When adding an identifier to a record without an identifier, there should be a DELETE and then CREATE. Currently, external-dns will send the CREATE before the DELETE, that will fail the batch job with error:
"SetIdentifier hello-world cannot be created as a non-weighted set exists with the same name and type"
This PR solves this validation problem by changing the sort order so DELETE will be before CREATE. AWS doc states that the action will be happening in a single operation, so there shouldn't be a problem that only the DELETE was executed.
https://docs.aws.amazon.com/Route53/latest/APIReference/API_ChangeResourceRecordSets.html#API_ChangeResourceRecordSets_RequestSyntax
fixes #1411