Merge pull request #226 from sgotti/runservice_fetcher_correctly_handle_skipped_tasks

runservice: correctly handle skipped tasks in fetcher
This commit is contained in:
Simone Gotti 2020-03-02 17:24:30 +01:00 committed by GitHub
commit 92e509cb3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -890,7 +890,7 @@ func (s *Runservice) fetchLog(ctx context.Context, rt *types.RunTask, setup bool
return err return err
} }
if et == nil { 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) log.Errorf("executor task with id %q doesn't exist. This shouldn't happen. Skipping fetching", rt.ID)
} }
return nil return nil
@ -1053,7 +1053,9 @@ func (s *Runservice) fetchArchive(ctx context.Context, rt *types.RunTask, stepnu
return err return err
} }
if et == nil { if et == nil {
if rt.Status != types.RunTaskStatusSkipped {
log.Errorf("executor task with id %q doesn't exist. This shouldn't happen. Skipping fetching", rt.ID) log.Errorf("executor task with id %q doesn't exist. This shouldn't happen. Skipping fetching", rt.ID)
}
return nil return nil
} }
executor, err := store.GetExecutor(ctx, s.e, et.Spec.ExecutorID) executor, err := store.GetExecutor(ctx, s.e, et.Spec.ExecutorID)