Closed Warashi closed 1 month ago
I'll run the test 5 times and make this PR ready for review if all tests are passed.
Attention: Patch coverage is 84.61538%
with 2 lines
in your changes missing coverage. Please review.
Project coverage is 23.96%. Comparing base (
c1a06aa
) to head (d10876a
). Report is 32 commits behind head on master.
Files with missing lines | Patch % | Lines |
---|---|---|
pkg/app/launcher/cmd/launcher/binary.go | 84.61% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I realized there are no test for the result of GracefulStop, so I added that.
I'll run the test 5 times and make this PR ready for review if all tests are passed.
The tests are passed 5 times.
https://github.com/pipe-cd/pipecd/actions/runs/11100844567/job/30838021571
What this PR does / why we need it:
The original IsRunning method has a bug when the command exits with an error. After the command is done with an error, IsRunning returns true once if GracefulStop is not called. This comes from using
chan error
to both pass the result and notify the finish. This PR splits these things tochan struct{}
andatomic.Pointer[error]
.Which issue(s) this PR fixes:
The flaky test
TestGracefulStopCommand
.Fixes #4630
Does this PR introduce a user-facing change?: