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

wrap errors with more context while creating resources in the operator

    XMLWordPrintable

Details

    • Story
    • Resolution: Unresolved
    • Critical
    • Pipelines 1.14.4
    • None
    • Operator
    • None
    • 3
    • False
    • None
    • False
    • 1
    • Pipelines Sprint TekShift 262

    Description

      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:

       

       

      Attachments

        Issue Links

          Activity

            People

              jkhelil jawed khelil
              concaf Shubham Minglani
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: