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

[1.14.4] - wrap errors with more context while creating resources in the operator

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Critical Critical
    • Pipelines 1.14.4
    • None
    • Operator
    • None

      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
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: