From 6db8569f096a89a0a2e1f637c4cd990b99c7b832 Mon Sep 17 00:00:00 2001 From: Kohei Tokunaga Date: Fri, 13 Oct 2023 10:21:05 +0900 Subject: [PATCH] process: Do not print error log when process is canceled Signed-off-by: Kohei Tokunaga --- controller/processes/processes.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/controller/processes/processes.go b/controller/processes/processes.go index c74b39dd..c8738601 100644 --- a/controller/processes/processes.go +++ b/controller/processes/processes.go @@ -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)