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

PAC watcher is getting panic error when Global repo setting have concurrency

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Blocker Blocker
    • Pipelines 1.16.0
    • Pipelines 5.0.5, Pipelines 1.15.0
    • Pipelines as Code
    • None
    • (temp)Backlog from 260 and 259, Pipelines Sprint Crookshanks 8, Pipelines Sprint Crookshanks 9, Pipelines Sprint Crookshank 10, Pipelines Sprint Crookshank 11, Pipelines Sprint Crookshank 12

      Description of problem:

      when Global Repository have concurrency 

      apiVersion: pipelinesascode.tekton.dev/v1alpha1
      kind: Repository
      metadata:
        name: pipelines-as-code
        namespace: openshift-pipelines
      spec:
        concurrency_limit: 1
        params:
          - name: custom
            value: "value" 

      The PAC watcher is failing with below error

       

      panic: runtime error: invalid memory address or nil pointer dereference
      [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1b0bb7f]
      
      goroutine 107 [running]:
      github.com/openshift-pipelines/pipelines-as-code/pkg/sync.(*QueueManager).checkAndUpdateSemaphoreSize(0x208c580?, 0xc00059e180?, {0x2893700, 0xc000e24f40})
      	/go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/sync/queue_manager.go:69 +0x1f
      github.com/openshift-pipelines/pipelines-as-code/pkg/sync.(*QueueManager).getSemaphore(0xc00049c0a8, 0xc000b1a420)
      	/go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/sync/queue_manager.go:48 +0x2e5
      github.com/openshift-pipelines/pipelines-as-code/pkg/sync.(*QueueManager).AddListToQueue(0xc00049c0a8, 0xc000b1a420, {0xc00119e340, 0x1, 0x0?})
      	/go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/sync/queue_manager.go:87 +0xe5
      github.com/openshift-pipelines/pipelines-as-code/pkg/reconciler.(*Reconciler).queuePipelineRun(0xc0004ec000, {0x2885588, 0xc0011a4270}, 0xc000b99af8, 0xc000ef9208)
      	/go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/reconciler/queue_pipelineruns.go:48 +0x22f
      github.com/openshift-pipelines/pipelines-as-code/pkg/reconciler.(*Reconciler).ReconcileKind(0xc0004ec000, {0x2885588, 0xc0011a4120}, 0xc000ef9208)
      	/go/src/github.com/openshift-pipelines/pipelines-as-code/pkg/reconciler/reconciler.go:73 +0x310
      github.com/tektoncd/pipeline/pkg/client/injection/reconciler/pipeline/v1/pipelinerun.(*reconcilerImpl).Reconcile(0xc00050e000, {0x2885588, 0xc0011a40f0}, {0xc000efb7d0, 0x2c})
      	/go/src/github.com/openshift-pipelines/pipelines-as-code/vendor/github.com/tektoncd/pipeline/pkg/client/injection/reconciler/pipeline/v1/pipelinerun/reconciler.go:236 +0x4f2
      knative.dev/pkg/controller.(*Impl).processNextWorkItem(0xc0004875c0)
      	/go/src/github.com/openshift-pipelines/pipelines-as-code/vendor/knative.dev/pkg/controller/controller.go:542 +0x508
      knative.dev/pkg/controller.(*Impl).RunContext.func3()
      	/go/src/github.com/openshift-pipelines/pipelines-as-code/vendor/knative.dev/pkg/controller/controller.go:491 +0x59
      created by knative.dev/pkg/controller.(*Impl).RunContext in goroutine 105
      	/go/src/github.com/openshift-pipelines/pipelines-as-code/vendor/knative.dev/pkg/controller/controller.go:489 +0x325 

      Prerequisites (if any, like setup, operators/versions):

      Steps to Reproduce

      • Initially I did set pipelinerun_provenance and concurrency_limit for global repo and created
        apiVersion: pipelinesascode.tekton.dev/v1alpha1
        kind: Repository
        metadata:  
          name: pipelines-as-code  
          namespace: openshift-pipelines
        spec:  
          concurrency_limit: 1
          params:    
          - name: custom      
            value: "value"  
          settings:    
            pipelinerun_provenance: "default_branch"
        
      • Created local repo with URL
      • Sent a pullrequest
      • Observed panic in controller and to fix this raised issue here https://issues.redhat.com/browse/SRVKP-5571
      • Then updated global repo like below
      •  
        apiVersion: pipelinesascode.tekton.dev/v1alpha1
        kind: Repository
        metadata:
          name: pipelines-as-code
          namespace: openshift-pipelines
        spec:
          concurrency_limit: 1
          params:
            - name: custom
              value: "value" 
      • Again added /test on the same Pull Request
      • Observed panic in watcher

      Actual results:

      Expected results:

      Reproducibility (Always/Intermittent/Only Once):

      Acceptance criteria: 

       

      Definition of Done:

      Build Details:

      Additional info (Such as Logs, Screenshots, etc):

       

       *

            rh-ee-zashaikh Zaki Shaikh
            sashture Savita .
            Savita . Savita .
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: