Skip to content

Commit

Permalink
dont log context canceled errors
Browse files Browse the repository at this point in the history
A context canceled error will occur once the runc container has exited,
there is not need to log these errors.

Additionally, remove a printf that was accidentally committed.
  • Loading branch information
alexcb committed Nov 17, 2023
1 parent b4cfdf1 commit b61b1c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions executor/runcexecutor/monitor_stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ func (w *runcExecutor) monitorContainerStats(ctx context.Context, id string, sam

stats, err := w.runc.Stats(ctx, id)
if err != nil {
if errors.Is(err, context.Canceled) {
return
}
if numFailuresAllowed > 0 {
// allow the initial calls to runc.Stats to fail, for cases where the program didn't start within the initial
// sampleFrequency; this should only occur under heavy workloads
Expand Down
1 change: 0 additions & 1 deletion worker/base/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,6 @@ func (w *Worker) ResolveOp(v solver.Vertex, s frontend.FrontendLLBBridge, sm *se
case *pb.Op_Source:
return ops.NewSourceOp(v, op, baseOp.Platform, w.SourceManager, w.ParallelismSem, sm, w)
case *pb.Op_Exec:
fmt.Printf("Worker.ResolveOp called\n") // this just gets called once even with two client
return ops.NewExecOp(v, op, baseOp.Platform, w.CacheMgr, w.ParallelismSem, sm, w.WorkerOpt.Executor, w)
case *pb.Op_File:
return ops.NewFileOp(v, op, w.CacheMgr, w.ParallelismSem, w)
Expand Down

0 comments on commit b61b1c9

Please sign in to comment.