-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
fix(Azure DNS): external_dns_registry_errors_total metrics counter value #4563
base: master
Are you sure you want to change the base?
fix(Azure DNS): external_dns_registry_errors_total metrics counter value #4563
Conversation
Signed-off-by: dongjiang1989 <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @dongjiang1989. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
@mloiseleur PTAL |
Thanks for this PR. |
Hmmm... It seems difficult to add unittest case. external-dns/controller/controller.go Lines 206 to 211 in e6a3571
external-dns/controller/controller.go Lines 251 to 256 in 939e7b8
Is there any better suggestion to add unittest case? 🤔️ |
Signed-off-by: dongjiang1989 <[email protected]>
@mloiseleur @szuecs PTAL re-check |
Co-authored-by: Michel Loiseleur <[email protected]>
Co-authored-by: Michel Loiseleur <[email protected]>
/ok-to-test |
Thanks. @mloiseleur @szuecs Please re-check |
/lgtm |
@mloiseleur Do you agree to Merge it? Thanks |
@dongjiang1989 An other maintainer will do the final review when he has time. Thanks for your understanding. |
@johngmyers @szuecs PTAL, when you hava time. |
return nil | ||
err1 := p.deleteRecords(ctx, deleted) | ||
err2 := p.updateRecords(ctx, updated) | ||
return errors.Join(err1, err2) |
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.
Are we generally fine with the change of semantic of how we deal the error? Bubbling this back up has obvious consequences. Specifically, do we want a soft error or not?
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.
Using errors.join makes it easier to see where an error occurred.
WDYT? @mloiseleur @johngmyers @szuecs
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.
This doesn’t answer my question. This new error handling will definitely change the way metrics are reported, but also the semantics on what happens when we reach an error. I am not so sure this won’t be a surprise for some users, although we can say that erroring “the hard way” is most likely always the right thing.
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.
This doesn’t answer my question. This new error handling will definitely change the way metrics are reported, but also the semantics on what happens when we reach an error. I am not so sure this won’t be a surprise for some users, although we can say that erroring “the hard way” is most likely always the right thing.
Thanks @Raffo WDYT?
like:
if err := p.deleteRecords(ctx, deleted); err != nil {
return err
}
if err := p.updateRecords(ctx, updated); err != nil {
return err
}
return nil
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.
This is a different change in a different direction. You won't execute updateRecords
in case deleteRecords
fail and I am not sure this is the intended change. I think we should not proceed with this change as is unless you can provide a clear picture of what the error handling from the provider should be and what the consequences could be for the users of the provider.
/retitle fix(Azure DNS): external_dns_registry_errors_total metrics counter value |
external_dns_registry_errors_total
metrics counter value 0
Description
The Azure provider should increment
external_dns_registry_errors_total
when changes cannot be submitted(found, updated, deleted, or created).Fixes #4510
Checklist