argoproj/argo-workflows · warning

CodeNotImplemented

CodeNotImplemented

Error message

IsDirectory currently unimplemented for HDFS

What it means

The HDFS artifact driver does not implement the IsDirectory capability of the ArtifactDriver interface, so any call returns a CodeNotImplemented error. Argo uses IsDirectory to decide how to serve/expand artifact directories; HDFS artifacts cannot be probed this way.

Source

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

// SaveStream saves an artifact from an io.Reader to HDFS compliant storage
func (driver *ArtifactDriver) SaveStream(ctx context.Context, reader io.Reader, outputArtifact *wfv1.Artifact) error {
	return common.SaveStreamViaTempFile(reader, "hdfs-upload-*", func(path string) error {
		return driver.Save(ctx, path, outputArtifact)
	})
}

// Delete is unsupported for the hdfs artifacts
func (driver *ArtifactDriver) Delete(ctx context.Context, s *wfv1.Artifact) error {
	return common.ErrDeleteNotSupported
}

func (driver *ArtifactDriver) ListObjects(ctx context.Context, artifact *wfv1.Artifact) ([]string, error) {
	return nil, fmt.Errorf("ListObjects is currently not supported for this artifact type, but it will be in a future version")
}

func (driver *ArtifactDriver) IsDirectory(ctx context.Context, artifact *wfv1.Artifact) (bool, error) {
	return false, errors.New(errors.CodeNotImplemented, "IsDirectory currently unimplemented for HDFS")
}

View on GitHub (pinned to 35bff19146)

Solutions

  1. Avoid directory-style access to HDFS artifacts; treat them as files only.
  2. Copy the HDFS artifact into a supported store (S3/GCS/Azure) if directory browsing is needed.
  3. Patch the driver to implement IsDirectory via hdfscli.Stat().IsDir() if you control the deployment.

Example fix

// after (custom patch)
func (d *ArtifactDriver) IsDirectory(ctx context.Context, artifact *wfv1.Artifact) (bool, error) {
	cli, err := d.getHDFSClient()
	if err != nil { return false, err }
	defer cli.Close()
	st, err := cli.Stat(artifact.HDFS.Path)
	if err != nil { return false, err }
	return st.IsDir(), nil
}
Defensive patterns

Strategy: fallback

Type guard

// feature-detect before calling
driverName := "hdfs"
if driverName == "hdfs" {
    // skip IsDirectory; treat artifact as a file
}

Try / catch

isDir, err := driver.IsDirectory(ctx, art)
if err != nil && errors.Is(err, errors.New(errors.CodeNotImplemented, "")) || strings.Contains(err.Error(), "unimplemented") {
    isDir = false // assume file
}

Prevention

When it happens

Trigger: Calling IsDirectory(ctx, artifact) on an HDFS artifact — e.g. the artifact server or UI attempting to browse an HDFS artifact as a directory.

Common situations: Browsing HDFS artifacts in the UI; generic artifact-serving code paths that call IsDirectory regardless of driver type.

Related errors


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