Skip to content

Commit

Permalink
process: Do not print error log when process is canceled
Browse files Browse the repository at this point in the history
Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
  • Loading branch information
ktock committed Oct 13, 2023
1 parent 5a0e4c1 commit 6db8569
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion controller/processes/processes.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,11 @@ func (m *Manager) StartProcess(pid string, resultCtx *build.ResultHandle, cfg *p
go func() {
var err error
if err = ctr.Exec(ctx, cfg, in.Stdin, in.Stdout, in.Stderr); err != nil {
logrus.Errorf("failed to exec process: %v", err)
if errors.Is(err, context.Canceled) {
logrus.Debugf("process canceled: %v", err)
} else {
logrus.Errorf("failed to exec process: %v", err)
}
}
logrus.Debugf("finished process %s %v", pid, cfg.Entrypoint)
m.processes.Delete(pid)
Expand Down

0 comments on commit 6db8569

Please sign in to comment.