pipe-cd / pipecd

The One CD for All {applications, platforms, operations}
https://pipecd.dev
Apache License 2.0
1.06k stars 149 forks source link

Regard DSP as done only when preparation is successful considering of reuse the provider #5216

Closed ffjlabo closed 1 week ago

ffjlabo commented 1 week ago

What this PR does / why we need it:

This modification is necessary to avoid an error when executing a cancellation while executing deploySourceProvider.Get in another stage.

I encountered such a situation when canceling the deployment via WebUI during the SCRIPT_RUN stage execution. I reproduced the behavior when checking the behavior for the PR https://github.com/pipe-cd/pipecd/pull/5215 like this↓

Cursor_と_PipeCD__1__png

Which issue(s) this PR fixes:

Part of https://github.com/pipe-cd/pipecd/issues/5214

Does this PR introduce a user-facing change?:

codecov[bot] commented 1 week ago

Codecov Report

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

Project coverage is 22.83%. Comparing base (5d3e17d) to head (f87754a). Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
pkg/app/piped/deploysource/deploysource.go 0.00% 2 Missing :warning:
pkg/app/pipedv1/deploysource/deploysource.go 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #5216 +/- ## ======================================= Coverage 22.82% 22.83% ======================================= Files 420 420 Lines 45302 45302 ======================================= + Hits 10340 10344 +4 + Misses 34166 34163 -3 + Partials 796 795 -1 ```

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

ffjlabo commented 1 week ago

@t-kikuc Thank you! This also might lead to the same error. So I fixed it 🙏 f87754a