openshift-pipelines / pipelines-as-code

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

Fix gitauth secrets cleanup #1766

Closed enarha closed 2 weeks ago

enarha commented 2 months ago

The gitauth secrets are created before the pipelineRun and deleted through ownerRef when the pipelineRun is deleted. This fixes the issue where the secrets are left in the namespace if the pipelineRun creation fails, hitting the secrets quota and blocking subsequent pipelineRuns.

Changes

Submitter Checklist

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 15.38462% with 11 lines in your changes missing coverage. Please review.

Project coverage is 65.14%. Comparing base (9e71fa3) to head (713795d). Report is 34 commits behind head on main.

Files with missing lines Patch % Lines
pkg/pipelineascode/pipelineascode.go 15.38% 10 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1766 +/- ## ========================================== - Coverage 65.16% 65.14% -0.02% ========================================== Files 174 174 Lines 13246 13250 +4 ========================================== Hits 8632 8632 - Misses 4041 4045 +4 Partials 573 573 ```

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

chmouel commented 1 month ago

I think it's kinda hard to e2e test this, to fake the cluster failure while creating the secret...

i am good to skip the e2e for that one

/lgtm

zakisk commented 1 month ago

/test

chmouel commented 1 month ago

/retest