You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve bundle and GitRepo status error reporting (#4167)
When a bundle reconcile attempt fails, the reconciler now does one of
the following:
* log the error and retry with exponential backoff, when dealing with a
retryable error such as a failure to perform a CRUD operation on a
Kubernetes resource
* skip retries and report the error through the bundle's status, setting
its `Ready` condition to `False`, when the error is non-retryable
(e.g. configuration error). In such cases, the reconciler newly makes
use of a `TerminalError` [1], indicating that no retries should take
place.
Distinguishing retryable errors from non-retryable ones should both
optimise the number of reconciles run for a given resource, and make
non-retryable errors more visible to users, as they would typically be
especially interested in them, since they may well be able to act on
them.
This happens through new, common logic living in
`reconciler/error_handling.go`, encapsulating propagation of errors
through status conditions, and distinctions between retryable and
non-retryable errors.
To illustrate the potential of this new logic, the gitOps controller
partly uses this new logic when reconciling GitRepos, although most of
the work to improve error reporting in that reconciler remains to be
done.
[1]: https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/reconcile#TypedReconciler
0 commit comments