Uploaded image for project: 'OpenShift Pipelines'
  1. OpenShift Pipelines
  2. SRVKP-4267

wrap errors with more context while creating resources in the operator

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Critical Critical
    • Pipelines 1.15.0
    • None
    • Operator
    • None
    • 1
    • Pipelines Sprint TekShift 2, Pipelines Sprint TekShift 3, Pipelines Sprint TekShift 4, Pipelines Sprint TekShift 5, Pipelines Sprint TekShift 6

      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:

       

       

              jkhelil abdeljawed khelil
              concaf Shubham Minglani
              Piyush Garg Piyush Garg
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: