From 0e2b01a586d7a5867412e9b2d26151cad68a76da Mon Sep 17 00:00:00 2001 From: Simone Gotti Date: Mon, 2 Mar 2020 10:36:40 +0100 Subject: [PATCH] runservice: correctly handle skipped tasks in fetcher skip fetching of tasks with status skipped, not only tasks marked as skip. This avoid many wrong an noisy logs of type "executor task with id taskid doesn't exist. This shouldn't happen. Skipping fetching" --- internal/services/runservice/scheduler.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/services/runservice/scheduler.go b/internal/services/runservice/scheduler.go index b3d2ba3..9a5730e 100644 --- a/internal/services/runservice/scheduler.go +++ b/internal/services/runservice/scheduler.go @@ -890,7 +890,7 @@ func (s *Runservice) fetchLog(ctx context.Context, rt *types.RunTask, setup bool return err } if et == nil { - if !rt.Skip { + if rt.Status != types.RunTaskStatusSkipped { log.Errorf("executor task with id %q doesn't exist. This shouldn't happen. Skipping fetching", rt.ID) } return nil @@ -1053,7 +1053,9 @@ func (s *Runservice) fetchArchive(ctx context.Context, rt *types.RunTask, stepnu return err } if et == nil { - log.Errorf("executor task with id %q doesn't exist. This shouldn't happen. Skipping fetching", rt.ID) + if rt.Status != types.RunTaskStatusSkipped { + log.Errorf("executor task with id %q doesn't exist. This shouldn't happen. Skipping fetching", rt.ID) + } return nil } executor, err := store.GetExecutor(ctx, s.e, et.Spec.ExecutorID)