argoproj/argo-workflows · error · argoerr

ERR_NOT_FOUND

ERR_NOT_FOUND

Error message

${err.Error()}

What it means

TarGzToWriter wraps an os.Stat failure on the source path (after abs-path resolution) with the underlying error text; most commonly the path does not exist. This is a thin re-wrap of the OS error, not a coded ArgoError at this line.

Source

Thrown at util/archive/archive.go:32

	"github.com/argoproj/argo-workflows/v4/util/logging"
)

type flusher interface {
	Flush() error
}

// TarGzToWriter tar.gz's the source path to the supplied writer
func TarGzToWriter(ctx context.Context, sourcePath string, level int, w io.Writer) error {
	sourcePath, err := filepath.Abs(sourcePath)
	if err != nil {
		return errors.InternalErrorf("getting absolute path: %v", err)
	}
	logger := logging.RequireLoggerFromContext(ctx)
	logger.WithField("source", sourcePath).Info(ctx, "tarring")
	sourceFi, err := os.Stat(sourcePath)
	if err != nil {
		if os.IsNotExist(err) {
			return errors.New(errors.CodeNotFound, err.Error())
		}
		return errors.InternalWrapError(err)
	}
	if !sourceFi.Mode().IsRegular() && !sourceFi.IsDir() {
		return errors.InternalErrorf("%s is not a regular file or directory", sourcePath)
	}
	if flush, ok := w.(flusher); ok {
		defer func() { _ = flush.Flush() }()
	}
	gzw, err := gzip.NewWriterLevel(w, level)
	if err != nil {
		return errors.InternalWrapError(err)
	}
	defer util.Close(gzw)
	tw := tar.NewWriter(gzw)
	defer util.Close(tw)

	if sourceFi.IsDir() {

View on GitHub (pinned to 35bff19146)

Solutions

  1. Verify the source path exists and is readable by the executor/container
  2. Check the artifact staging path under /var/run/argo for typos or missing staged files
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at util/archive/archive.go:32 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03). Data as JSON: /api/errors/7e37d1378d7abc63. Report an issue: GitHub.