diff --git a/workflow/executor/executor.go b/workflow/executor/executor.go index adaa9f157e7b..a03178183d6f 100644 --- a/workflow/executor/executor.go +++ b/workflow/executor/executor.go @@ -318,6 +318,14 @@ func (we *WorkflowExecutor) saveArtifact(ctx context.Context, containerName stri } return err } + fi, err := os.Stat(localArtPath) + if err != nil { + return err + } + size := fi.Size() + if size == 0 { + log.Warnf("The file %q is empty. It may not be uploaded successfully depending on the artifact driver", localArtPath) + } return we.saveArtifactFromFile(ctx, art, fileName, localArtPath) }