-
Notifications
You must be signed in to change notification settings - Fork 3.4k
ctrl-runtime: lower severity of retryable reconcile errors #35364
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
ctrl-runtime: lower severity of retryable reconcile errors #35364
Conversation
/test |
f96d81b
to
0ccadb7
Compare
I'm tentatively marking this PR for backport to v1.16, as it aims to reduce CI flakiness by avoiding that temporary errors are flagged by the dedicated connectivity test. Even though it slightly changes the user-facing behavior, I'd argue that the reporting temporary errors that will automatically self-heal as error log was more confusing. |
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.
LGTM ✔️
If it's the case, we might need to backport the below PR as well. |
I was actually thinking of backporting this one only, and slightly adapting the approach to work on top of logrus rather than slog, but that's definitely another possibility. |
0ccadb7
to
274d7c8
Compare
Pushed to fix a linting error |
/test |
274d7c8
to
771a927
Compare
/test |
Controller runtime emits an error log whenever a reconcile function terminates with an error. However, reconciliation errors are harmless in most cases, as the subsequent iteration will normally pull the updated state and succeed. Still, this breaks the Cilium's assumption that error logs are emitted only in case of serious conditions, causing potential user confusion, as well as triggering the error logs check run as part of the E2E tests. Let's introduce a wrapper responsible for converting "Reconciler error" messages to info level logs, when the returned error is likely to be transient. We specifically check the error type to avoid hiding unexpected ones, although more types could be added in the future if deemed helpful. Signed-off-by: Marco Iorio <marco.iorio@isovalent.com>
Rebased onto main to hopefully make CI happier. |
771a927
to
f747c7f
Compare
/test |
Controller runtime emits an error log whenever a reconcile function terminates with an error. However, reconciliation errors are harmless in most cases, as the subsequent iteration will normally pull the updated state and succeed. Still, this breaks the Cilium's assumption that error logs are emitted only in case of serious conditions, causing potential user confusion, as well as triggering the error logs check run as part of the E2E tests.
Let's introduce a wrapper responsible for converting "Reconciler error" messages to info level logs, when the returned error is likely to be transient. We specifically check the error type to avoid hiding unexpected ones, although more types could be added in the future if deemed helpful.