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

Gh102 aws errors in status #125

Merged
merged 3 commits into from
May 16, 2024

Conversation

mikenairn
Copy link
Member

@mikenairn mikenairn commented May 15, 2024

fixes: #102

What

external-dns: aws provider return zone errors

  • Replace dependency on github.com/pkg/errors with errors(Note: in latest version of the aws provider this has been replaced already)
  • Collect and return list of errors for zones when submitting changes.
  • Remove logic that attempts to submit changes individually if the whole set of changes fails. This currently will apply some changes that are valid but leaves the ones that are failing where we would rather nothing was created/updated if anything in the batch fails.

Update provider SanitizeError

Update provider SanitizeError function to better handle aws errors, removes status code, newlines, tabs, and sax parsers exceptions from the returned error.

tests: Add provider errors e2e specs

Adds a provider errors set of specs to the e2e test suite. The purpose of this is to test each supported provider returns a reasonable response and updates the record status appropriately in cases where a user can misconfigure a DNSRecord and cause a provider error. These mainly focus on what can be set from the DNSPolicy (geo and weight) and the intention isn't to exhaustively test all error scenarios.

Added as an e2e test since this can, and will be, different on every provider. Tests also ensure that the records are not falling into a loop of constantly being updated when a provider error is updating the status.

Requires:

@mikenairn mikenairn force-pushed the gh102_aws_errors_in_status branch from 97ea058 to 8225717 Compare May 15, 2024 11:20
mikenairn added 2 commits May 16, 2024 08:45
* Replace dependency on github.com/pkg/errors with errors(Note: in
latest version of the aws provider this has been replaced already)
* Collect and return list of errors for zones when submitting changes.
* Remove logic that attempts to submit changes individually if the whole
set of changes fails. This currently will apply some changes that are
valid but leaves the ones that are failing where we would rather nothing
was created/updated if anything in the batch fails.
Update provider SanitizeError function to better handle aws errors,
removes status code, newlines, tabs, and sax parsers exceptions from the
returned error.
@mikenairn mikenairn force-pushed the gh102_aws_errors_in_status branch from 8225717 to 73fa840 Compare May 16, 2024 10:56
Adds a provider errors set of specs to the e2e test suite. The purpose
of this is to test each supported provider returns a reasonable response
and updates the record status appropriately in cases where a user can
misconfigure a DNSRecord and cause a provider error. These mainly focus
on what can be set from the DNSPolicy (geo and weight) and the intention
isn't to exhaustively test all error scenarios.

Added as an e2e test since this can, and will be, different on every
provider. Tests also ensure that the records are not falling into a loop
of constantly being updated when a provider error is updating the
status.
@mikenairn mikenairn force-pushed the gh102_aws_errors_in_status branch from 73fa840 to c0b4a82 Compare May 16, 2024 11:00
@mikenairn mikenairn marked this pull request as ready for review May 16, 2024 11:09
@mikenairn mikenairn added this pull request to the merge queue May 16, 2024
Merged via the queue into Kuadrant:main with commit d8360e2 May 16, 2024
9 checks passed
@mikenairn mikenairn deleted the gh102_aws_errors_in_status branch May 16, 2024 13:06
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.

provider errors are not being propogated up to the dnsrecord status
2 participants