operator
operator copied to clipboard
Make use of apis.FieldError from knative/pkg while handling errors in Reconcilers
In tektoncd projects apis.FieldError are used extensively in error handling (especially in validation).
From knative documentation.
// FieldError is used to propagate the context of errors pertaining to
// specific fields in a manner suitable for use in a recursive walk, so
// that errors contain the appropriate field context.
sample usage
- https://github.com/tektoncd/pipeline/blob/4a93b625f857ab582e87c17029ee893612ca6cfe/pkg/apis/pipeline/v1beta1/task_validation.go#L158
Shall we consider using them in reconcilers as well. The main advantage is that we will be provide much better context and hierachy to our error messages in both CR status and in logs.
The hierachical context is important for us as we have mechanisms like rbac, prunnig etc as part of reconcilers but with no representation in resource status. It would make our development/debugging workflow more efficient if we could provide a error trail instead of a generic "Prereconcile failed" message.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale with a justification.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.
/lifecycle stale
Send feedback to tektoncd/plumbing.
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten with a justification.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.
/lifecycle rotten
Send feedback to tektoncd/plumbing.
Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen with a justification.
Mark the issue as fresh with /remove-lifecycle rotten with a justification.
If this issue should be exempted, mark the issue as frozen with /lifecycle frozen with a justification.
/close
Send feedback to tektoncd/plumbing.
@tekton-robot: Closing this issue.
In response to this:
Rotten issues close after 30d of inactivity. Reopen the issue with
/reopenwith a justification. Mark the issue as fresh with/remove-lifecycle rottenwith a justification. If this issue should be exempted, mark the issue as frozen with/lifecycle frozenwith a justification./close
Send feedback to tektoncd/plumbing.
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/test-infra repository.