argoproj/argo-workflows · error

plugin %s is directory check failed: %w

Error message

plugin %s is directory check failed: %w

What it means

This error wraps a transport-level failure from the gRPC IsDirectory call made by the plugin artifact driver. Argo Workflows artifact plugins run as external gRPC servers; the driver delegates the directory check to the plugin and wraps any RPC error with the plugin name for context. It means the plugin could not be reached or the RPC failed, not that the artifact is or isn't a directory.

Source

Thrown at workflow/artifacts/plugin/plugin.go:363

		Artifact: grpcArtifact,
	})
	if err != nil {
		return nil, fmt.Errorf("plugin %s list objects failed: %w", d.pluginName, err)
	}
	if resp.Error != "" {
		return nil, fmt.Errorf("plugin %s list objects failed: %s", d.pluginName, resp.Error)
	}
	return resp.Objects, nil
}

// IsDirectory implements ArtifactDriver.IsDirectory by calling the plugin service
func (d *Driver) IsDirectory(ctx context.Context, artifactRef *wfv1.Artifact) (bool, error) {
	grpcArtifact := convertToGRPC(artifactRef)
	resp, err := d.client.IsDirectory(ctx, &artifact.IsDirectoryRequest{
		Artifact: grpcArtifact,
	})
	if err != nil {
		return false, fmt.Errorf("plugin %s is directory check failed: %w", d.pluginName, err)
	}
	if resp.Error != "" {
		return false, fmt.Errorf("plugin %s is directory check failed: %s", d.pluginName, resp.Error)
	}
	return resp.IsDirectory, nil
}

// convertToGRPC converts v1alpha1.Artifact to gRPC Artifact
func convertToGRPC(a *wfv1.Artifact) *artifact.Artifact {
	if a == nil {
		return nil
	}

	grpcArtifact := &artifact.Artifact{
		Name:           a.Name,
		Path:           a.Path,
		From:           a.From,
		Optional:       a.Optional,

View on GitHub (pinned to 35bff19146)

Solutions

  1. Check the plugin pod/server is running and healthy (kubectl get pods, plugin logs) and restart it if crashed
  2. Verify the artifact plugin address/socket in the artifact plugin configuration matches the running plugin's endpoint
  3. Test connectivity from the controller/argoexec network path to the plugin (network policies, service ports)
  4. Inspect the wrapped inner error (%w chain) for the root cause — DNS, connection refused, deadline exceeded — and fix that directly
  5. If the plugin is slow, increase RPC timeout/retry settings or ensure plugin starts before workflows depend on it

Example fix

# before: plugin configured with wrong address
artifactRepository:
  plugin:
    name: my-plugin
    address: my-plugin:2746
# after: correct service address/port in the same namespace
artifactRepository:
  plugin:
    name: my-plugin
    address: my-plugin.artifact-plugins.svc:2746
Defensive patterns

Strategy: try-catch

Validate before calling

// before relying on plugin artifacts, verify the plugin gRPC endpoint is reachable
conn, err := grpc.Dial(pluginAddress, grpc.WithBlock(), grpc.WithTimeout(5*time.Second))
if err != nil {
    return fmt.Errorf("artifact plugin %s unreachable: %w", pluginName, err)
}
conn.Close()

Try / catch

ok, err := driver.IsDirectory(ctx, artifact)
if err != nil {
    var se *status.Status // gRPC status is wrapped via %w
    if errors.As(err, &se) && se.Code() == codes.Unavailable {
        // retry after checking plugin pod health
    }
    return fmt.Errorf("is-directory check failed for plugin: %w", err)
}

Prevention

When it happens

Trigger: Calling Driver.IsDirectory on a plugin artifact when the plugin gRPC server is unreachable, crashed, timed out, returned a connection error, or the plugin socket/address configured via the plugin artifact is wrong.

Common situations: Plugin container not running or still starting when the workflow checks artifacts (ArtificialFailedNode / artifact GC / artifact passing); misconfigured artifact plugin address; plugin crashing mid-request; network policy blocking the plugin port; TLS or auth mismatch between argoexec/controller and the plugin.

Related errors


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