feature: Minor change to action timeout message to be more consistent with other logs (#380)

This commit is contained in:
James Read
2024-08-09 15:53:02 +01:00
committed by GitHub
parent 5b5fca0837
commit 7a7a07d9ad

View File

@@ -326,7 +326,7 @@ func stepLogStart(req *ExecutionRequest) bool {
log.WithFields(log.Fields{
"actionTitle": req.logEntry.ActionTitle,
"timeout": req.Action.Timeout,
}).Infof("Action starting")
}).Infof("Action started")
return true
}
@@ -416,7 +416,10 @@ func stepExec(req *ExecutionRequest) bool {
appendErrorToStderr(waiterr, req.logEntry)
if ctx.Err() == context.DeadlineExceeded {
log.Warnf("Command timed out: %v", req.finalParsedCommand)
log.WithFields(log.Fields{
"actionTitle": req.logEntry.ActionTitle,
}).Warnf("Action timed out")
// The context timeout should kill the process, but let's make sure.
req.executor.Kill(req.logEntry)
req.logEntry.TimedOut = true