Skip to content

Commit

Permalink
Merge pull request agola-io#226 from sgotti/runservice_fetcher_correc…
Browse files Browse the repository at this point in the history
…tly_handle_skipped_tasks

runservice: correctly handle skipped tasks in fetcher
  • Loading branch information
sgotti authored Mar 2, 2020
2 parents 70f038d + aaf1787 commit 1208579
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions internal/services/runservice/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 1208579

Please sign in to comment.