openshift-pipelines / pipelines-as-code

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

Fix PAC controller panic on empty commits in payload in gitlab #1792

Closed zakisk closed 1 month ago

zakisk commented 1 month ago

fixed panic in PAC controller when commits are empty in event payload on tag push hook event when tag is created in gitlab.

https://issues.redhat.com/browse/SRVKP-6695

Changes

Submitter Checklist

savitaashture commented 1 month ago

@zakisk is it possible to add e2e

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 64.92%. Comparing base (316b3bc) to head (e0c863e). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/provider/gitlab/parse_payload.go 0.00% 2 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1792 +/- ## ======================================= Coverage 64.92% 64.92% ======================================= Files 175 175 Lines 13396 13399 +3 ======================================= + Hits 8697 8699 +2 Misses 4116 4116 - Partials 583 584 +1 ```

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

zakisk commented 1 month ago

@zakisk is it possible to add e2e

it is hard to reproduce this error, because it is intermittent. TestGitlabDeleteTagEvent was passing on my PR and on main as well but failed on nightly so we really don't know how to get that empty commits payload again on tag creation.

chmouel commented 1 month ago

it happens every time in nightly job even on restart

chmouel commented 1 month ago

but nonetheless fine to merge,