pipe-cd / pipecd

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

Fix to use target dsp in script run rollback #5215

Closed ffjlabo closed 1 month ago

ffjlabo commented 2 months ago

What this PR does / why we need it:

Fixed to use TargetDSP on the SCRIPT_RUN_ROLLBACK stage. With these fixes, we can refer to the files located in the app dir when executing the SCRIPT_RUN_ROLLBACK stage.

I chose TargetDSP, not RunningDSP, because the commands on the onRollback are set in app.pipecd.yaml used when Deployment is executed. The purpose of the SCRIPT_RUN_ROLLBACK stage is to run whatever command is currently set in onRollback during rollback.

Which issue(s) this PR fixes:

Part of #5214

Does this PR introduce a user-facing change?:

codecov[bot] commented 2 months ago

Codecov Report

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

Project coverage is 22.82%. Comparing base (5d3e17d) to head (8ffadca).

Files with missing lines Patch % Lines
pkg/app/piped/executor/kubernetes/rollback.go 0.00% 7 Missing :warning:
pkg/app/piped/deploysource/deploysource.go 0.00% 1 Missing :warning:
pkg/app/pipedv1/deploysource/deploysource.go 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #5215 +/- ## ======================================= Coverage 22.82% 22.82% ======================================= Files 420 420 Lines 45302 45309 +7 ======================================= + Hits 10340 10344 +4 - Misses 34166 34170 +4 + Partials 796 795 -1 ```

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