argoproj/argo-workflows · error

HDFS artifact does not suppot directory copy

Error message

HDFS artifact does not suppot directory copy

What it means

The HDFS artifact driver's Load supports downloading regular files only; when the Stat of the configured source path reports a directory it refuses with this sentinel error. It fires during artifact loading when an HDFS artifact path points at a directory, since the driver does not implement recursive directory copy.

Source

Thrown at workflow/artifacts/hdfs/hdfs.go:158

}

// Load downloads artifacts from HDFS compliant storage
func (driver *ArtifactDriver) Load(ctx context.Context, _ *wfv1.Artifact, path string) error {
	hdfscli, err := createHDFSClient(driver.Addresses, driver.HDFSUser, driver.DataTransferProtection, driver.KrbOptions)
	if err != nil {
		return err
	}
	defer hdfscli.Close()

	srcStat, err := hdfscli.Stat(driver.Path)
	if err != nil {
		if os.IsNotExist(err) {
			return errors.New(errors.CodeNotFound, err.Error())
		}
		return err
	}
	if srcStat.IsDir() {
		return fmt.Errorf("HDFS artifact does not suppot directory copy")
	}

	_, err = os.Stat(path)
	if err != nil && !os.IsNotExist(err) {
		return err
	}

	if os.IsNotExist(err) {
		dirPath := filepath.Dir(driver.Path)
		if dirPath != "." && dirPath != "/" {
			// Follow umask for the permission
			err = os.MkdirAll(dirPath, 0o777)
			if err != nil {
				return err
			}
		}
	} else if driver.Force {
		err = os.Remove(path)

View on GitHub (pinned to 35bff19146)

Solutions

  1. Point the HDFS artifact path at a specific file
  2. Tar the directory first and store it as a single file artifact
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at workflow/artifacts/hdfs/hdfs.go:158 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/ae10394366cce399. Report an issue: GitHub.