Skip to content

Commit 2984705

Browse files
committed
debug statements
Signed-off-by: reggie-k <regina.voloshin@codefresh.io>
1 parent 03d7854 commit 2984705

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

util/exec/exec.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ func RunCommandExt(cmd *exec.Cmd, opts CmdOpts) (string, error) {
196196
"headLockPath": lockPath,
197197
"headLockExists": exists,
198198
"where": where,
199-
}).Info("HEAD.lock status " + execId)
199+
}).Info("HEAD.lock status execId=" + execId)
200200
}
201201

202202
var stdout bytes.Buffer
@@ -206,7 +206,6 @@ func RunCommandExt(cmd *exec.Cmd, opts CmdOpts) (string, error) {
206206

207207
start := time.Now()
208208
err = cmd.Start()
209-
logCtx.Info("*************************************** EXEC COMMAND STARTED *************************************** " + execId)
210209
if err != nil {
211210
return "", err
212211
}
@@ -245,16 +244,13 @@ func RunCommandExt(cmd *exec.Cmd, opts CmdOpts) (string, error) {
245244
select {
246245
// noinspection ALL
247246
case <-timoutCh:
248-
logCtx.Info("*************************************** EXEC TIMEOUT HAPPENED *************************************** " + execId)
249247
// send timeout signal
250248
_ = cmd.Process.Signal(timeoutBehavior.Signal)
251249
// wait on timeout signal and fallback to fatal timeout signal
252250
if timeoutBehavior.ShouldWait {
253-
logCtx.Info("*************************************** EXEC WAIT HAPPENED *************************************** " + execId)
254251
select {
255252
case <-done:
256253
case <-fatalTimeoutCh:
257-
logCtx.Info("*************************************** EXEC FATAL TIMEOUT HAPPENED *************************************** " + execId)
258254
// upgrades to SIGKILL if cmd does not respect SIGTERM
259255
_ = cmd.Process.Signal(fatalTimeoutBehaviour)
260256
// now original cmd should exit immediately after SIGKILL
@@ -282,9 +278,7 @@ func RunCommandExt(cmd *exec.Cmd, opts CmdOpts) (string, error) {
282278
logCtx.Error(err.Error())
283279
return strings.TrimSuffix(output, "\n"), err
284280
case err := <-done:
285-
logCtx.Info("*************************************** FINISHED ON TIME *************************************** " + execId)
286281
if err != nil {
287-
logCtx.Error("*************************************** FINISHED ON TIME EXEC FAILED *************************************** " + execId)
288282
output := stdout.String()
289283
if opts.CaptureStderr {
290284
output += stderr.String()

0 commit comments

Comments
 (0)