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

Controller is crashing when we cannot create a PR and have concurrency set

XMLWordPrintable

      Description of problem:

      we have a crash on PAC when using concurrency and there is an error in the pipelinerun:

       

      the error look like this:

       

      💡 11:25:51 pac-controller pipelinerun test-gh-kjtd8 has been created in namespace pac-e2e-ns-7bw6b for SHA: 4a82af8eb94e78576bc0f9ab3e1a7c5582825412 Target Branch: main
      🚨 11:25:51 pac-controller There was an error starting the PipelineRun 00-bad-apple-tdza-, creating pipelinerun 00-bad-apple-tdza- in namespace pac-e2e-ns-7bw6b has failed.Tekton Controller has reported this error: ```admission webhook "validation.webhook.pipeline.tekton.dev" denied the request: validation failed: invalid value: couldn't add link between noexist and donotexist: task noexist depends on donotexist but donotexist wasn't present in Pipeline: spec.pipelineSpec.tasks```
      💡 11:25:52 pac-controller patched pipelinerun with checkRunID and logURL: pac-e2e-ns-7bw6b/test-gh-1-6x879
      💡 11:25:52 pac-controller patched pipelinerun with checkRunID and logURL: pac-e2e-ns-7bw6b/test-gh-kjtd8
      💡 11:25:52 pac-controller patched pipelinerun with checkRunID and logURL: pac-e2e-ns-7bw6b/prlongrunnning-1-fjrs-qckbv
      💡 11:25:52 pac-controller patched pipelinerun with checkRunID and logURL: pac-e2e-ns-7bw6b/test-gh-2-tjdwf
      💡 11:25:52 pac-controller skipping event: check_run: unsupported action "created"
      💡 11:25:52 pac-controller skipping event: check_run: unsupported action "created"
      💡 11:25:52 pac-controller skipping event: check_run: unsupported action "created"
      💡 11:25:52 pac-controller skipping event: check_run: unsupported action "created"
      💡 11:25:52 pac-controller skipping event: check_run: unsupported action "created"
      pipelines-as-code/ghe-controller-6b68d9cfb-dc6lg[pac-controller]: panic: reflect: call of reflect.Value.Interface on zero Value
      pipelines-as-code/ghe-controller-6b68d9cfb-dc6lg[pac-controller]: 
      pipelines-as-code/ghe-controller-6b68d9cfb-dc6lg[pac-controller]: goroutine 563 [running]:
      pipelines-as-code/ghe-controller-6b68d9cfb-dc6lg[pac-controller]: reflect.valueInterface({0x0?, 0x0?, 0x4000da0d40?}, 0xe0?)
      pipelines-as-code/ghe-controller-6b68d9cfb-dc6lg[pac-controller]:     reflect/value.go:1501 +0xfc
      pipelines-as-code/ghe-controller-6b68d9cfb-dc6lg[pac-controller]: reflect.Value.Interface(...)
      pipelines-as-code/ghe-controller-6b68d9cfb-dc6lg[pac-controller]:     reflect/value.go:1496
      pipelines-as-code/ghe-controller-6b68d9cfb-dc6lg[pac-controller]: github.com/openshift-pipelines/pipelines-as-code/pkg/sort.findJSONPathResults(0x4000db39a0, {0x21f6598?, 0x0?})
      pipelines-as-code/ghe-controller-6b68d9cfb-dc6lg[pac-controller]:     github.com/openshift-pipelines/pipelines-as-code/pkg/sort/runtime_sort.go:224 +0xc4
      pipelines-as-code/ghe-controller-6b68d9cfb-dc6lg[pac-controller]: github.com/openshift-pipelines/pipelines-as-code/pkg/sort.(*RuntimeSort).Less(0x4000da0cc0, 0x0?, 0x4000db3a48?)
      pipelines-as-code/ghe-controller-6b68d9cfb-dc6lg[pac-controller]:     github.com/openshift-pipelines/pipelines-as-code/pkg/sort/runtime_sort.go:186 +0xd0
      pipelines-as-code/ghe-controller-6b68d9cfb-dc6lg[pac-controller]: sort.insertionSort({0x2200c20, 0x4000da0cc0}, 0x0, 0x5)
      pipelines-as-code/ghe-controller-6b68d9cfb-dc6lg[pac-controller]:     sort/zsortinterface.go:12 +0xbc
      pipelines-as-code/ghe-controller-6b68d9cfb-dc6lg[pac-controller]: sort.pdqsort({0x2200c20, 0x4000da0cc0}, 0x40?, 0x1c191e0?, 0x1?)
      pipelines-as-code/ghe-controller-6b68d9cfb-dc6lg[pac-controller]:     sort/zsortinterface.go:73 +0x25c
      pipelines-as-code/ghe-controller-6b68d9cfb-dc6lg[pac-controller]: sort.Sort({0x2200c20, 0x4000da0cc0})
      pipelines-as-code/ghe-controller-6b68d9cfb-dc6lg[pac-controller]:     sort/sort.go:51 +0x60
      pipelines-as-code/ghe-controller-6b68d9cfb-dc6lg[pac-controller]: github.com/openshift-pipelines/pipelines-as-code/pkg/sort.ByField({0x1eb92d3, 0x10}, {0x40003f4e00, 0x5, 0x8})
      pipelines-as-code/ghe-controller-6b68d9cfb-dc6lg[pac-controller]:     github.com/openshift-pipelines/pipelines-as-code/pkg/sort/runtime_sort.go:230 +0xf4
      pipelines-as-code/ghe-controller-6b68d9cfb-dc6lg[pac-controller]: github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*ConcurrencyManager).GetExecutionOrder(0x40002ff410)
      pipelines-as-code/ghe-controller-6b68d9cfb-dc6lg[pac-controller]:     github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/concurrency.go:52 +0x130
      pipelines-as-code/ghe-controller-6b68d9cfb-dc6lg[pac-controller]: github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode.(*PacRun).Run(0x4000218730, {0x220e938, 0x4000776930})
      pipelines-as-code/ghe-controller-6b68d9cfb-dc6lg[pac-controller]:     github.com/openshift-pipelines/pipelines-as-code/pkg/pipelineascode/pipelineascode.go:107 +0x530
      pipelines-as-code/ghe-controller-6b68d9cfb-dc6lg[pac-controller]: github.com/openshift-pipelines/pipelines-as-code/pkg/adapter.(*sinker).processEvent(0x40002180a0, {0x220e938, 0x4000776930}, 0x40003f8240?)
      pipelines-as-code/ghe-controller-6b68d9cfb-dc6lg[pac-controller]:     github.com/openshift-pipelines/pipelines-as-code/pkg/adapter/sinker.go:58 +0x2c0
      pipelines-as-code/ghe-controller-6b68d9cfb-dc6lg[pac-controller]: github.com/openshift-pipelines/pipelines-as-code/pkg/adapter.(*listener).Start.listener.handleEvent.func2.1() 

      this only was tested on 0.24.x branch (osp 1.14) and could not reproduce on main branch 0.27.x (osp 1.15.x)

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

      Steps to Reproduce

       # <steps>

       

      Actual results:

      Expected results:

      Reproducibility (Always/Intermittent/Only Once):

      Acceptance criteria: 

       

      Definition of Done:

      Build Details:

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

       

       *

              cboudjna@redhat.com Chmouel Boudjnah
              cboudjna@redhat.com Chmouel Boudjnah
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: