openshift-pipelines / pipelines-as-code

Pipelines-as-Code for Tekton
https://pipelinesascode.com
Apache License 2.0
124 stars 81 forks source link

Add test for when concurrency and startPR error #1698

Closed chmouel closed 4 weeks ago

chmouel commented 4 weeks ago

when we cannot create the PipelineRun and we got an error from the controller, if we had concurrency set the controller would crash.

This was fixed in e553256f9c1d51371ac2b59320a257164c8276bb but added test for 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]:

Changes

Submitter Checklist

codecov[bot] commented 4 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 64.54%. Comparing base (9dcbe19) to head (d9ccc1f). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1698 +/- ## ======================================= Coverage 64.54% 64.54% ======================================= Files 143 143 Lines 11098 11098 ======================================= Hits 7163 7163 Misses 3413 3413 Partials 522 522 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.