-
Story
-
Resolution: Done
-
Critical
-
None
-
None
-
3
-
False
-
None
-
False
-
-
this particular issue is stemming from these lines of code:
sccRoleBinding, err := r.kubeClientSet.RbacV1().RoleBindings(ns.Name).Get(ctx, pipelinesSCCRoleBinding, metav1.GetOptions{}) if err != nil { return nil, err }
the operator is full of such error returns which are not wrapped and hence do not have the context - the result of this particular code snippet was a sev1 issue with a customer and we were not able to debug because the error manifested in the logs as:
"pipelines-scc-rolebinding" not found
this error does not have the namespace and other context of which part of the code is this coming from.
this code snippet is coming from https://github.com/tektoncd/operator/blob/8f8f425e1fa75ffdad726b56fba21bcdab803440/pkg/reconciler/openshift/tektonconfig/rbac.go#L262
acceptance criteria:
- add context and wrap errors while returning in operator code
- ensurePreRequisites() method is wrapped entirely
- getNamespacesToBeReconciled() is wrapped entirely
- https://github.com/tektoncd/operator/blob/main/pkg/reconciler/openshift/tektonconfig/rbac.go <-- the entire file is wrapped
- stretch goal: other parts of the operator are wrapped as well
- clones
-
SRVKP-4267 wrap errors with more context while creating resources in the operator
- Verified