Skip to content

Conversation

@BobVanB
Copy link
Contributor

@BobVanB BobVanB commented Feb 21, 2025

Improve Error Handling in submitChanges Function

Issue

Previously, when an error occurred while fetching zones in submitChanges, the function would return immediately, halting all processing. This prevented subsequent changes from being applied, even if they were unrelated to the failure.

Changes

  • Modified the function to collect errors instead of returning immediately when fetching zones or processing changes.
  • If a failure occurs, it is logged and added to a slice of errors, but the function continues processing the remaining changes.
  • After iterating through all changes, the function returns a combined error list if any errors were encountered.

Impact

  • Ensures that one failed change does not block others from being processed.
  • Provides better visibility into multiple failures in a single run.
  • Prevents unnecessary disruptions in external-dns behavior.

Discussion Point

Should we log and collect all errors, or are there specific cases where an immediate failure (return) is preferable?

@BobVanB BobVanB force-pushed the continue_on_error branch 4 times, most recently from e6c126e to 2bdc0a6 Compare February 21, 2025 10:10
Copy link
Collaborator

@k0da k0da left a comment

Choose a reason for hiding this comment

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

LGTM

@kuritka kuritka merged commit 9f376ad into AbsaOSS:main Apr 1, 2025
4 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.

3 participants