argoproj/argo-workflows · error

unable to source artifact paths: %w

Error message

unable to source artifact paths: %w

What it means

The artifact-paths source processor (ProcessArtifactPaths) returned an error while a Data template tried to enumerate artifacts matching source.artifactPaths. The error is wrapped and propagates up as 'unable to process data source'. It reflects a storage/driver failure, not expression logic.

Source

Thrown at workflow/data/data.go:31

	sourcedData, err := processSource(ctx, data.Source, processor)
	if err != nil {
		return nil, fmt.Errorf("unable to process data source: %w", err)
	}
	transformedData, err := processTransformation(sourcedData, &data.Transformation)
	if err != nil {
		return nil, fmt.Errorf("unable to process data transformation: %w", err)
	}
	return transformedData, nil
}

func processSource(ctx context.Context, source wfv1.DataSource, processor wfv1.DataSourceProcessor) (any, error) {
	var data any
	var err error
	switch {
	case source.ArtifactPaths != nil:
		data, err = processor.ProcessArtifactPaths(ctx, source.ArtifactPaths)
		if err != nil {
			return nil, fmt.Errorf("unable to source artifact paths: %w", err)
		}
	default:
		return nil, fmt.Errorf("no valid source is used for data template")
	}

	return data, nil
}

func processTransformation(data any, transformation *wfv1.Transformation) (any, error) {
	if transformation == nil {
		return data, nil
	}

	var err error
	for i, step := range *transformation {
		if step.Expression != "" {
			data, err = processExpression(step.Expression, data)
		}

View on GitHub (pinned to 35bff19146)

Solutions

  1. Read the wrapped underlying error for the storage backend's actual failure
  2. Verify artifactRepository settings and credentials (key format, accessKey/secretKey or workload identity)
  3. Confirm objects actually exist under the given key prefix (aws s3 ls / gsutil ls)
  4. Test with a basic S3/GCS artifact template to confirm driver connectivity

Example fix

// before: missing bucket in key
artifactPaths:
  s3:
    key: artifacts/*.tgz
// after
artifactPaths:
  s3:
    bucket: my-artifacts
    key: artifacts/{{workflow.name}}/*.tgz
Defensive patterns

Strategy: validation

Validate before calling

// Pre-flight: check the artifact store is reachable and objects exist
sess := session.Must(session.NewSession())
s3c := s3.New(sess, aws.NewConfig().WithRegion(region))
_, err := s3c.ListObjectsV2(&s3.ListObjectsV2Input{
    Bucket: aws.String(bucket), Prefix: aws.String(prefix)})
if err != nil { return fmt.Errorf("artifact source unreachable: %w", err) }

Prevention

When it happens

Trigger: processor.ProcessArtifactPaths fails: listing objects from S3/GCS/Azure fails due to bad credentials, missing bucket, wrong key prefix, throttling, or the artifact driver not being configured.

Common situations: IAM/SA permissions missing on the artifact bucket, artifactRepository misconfigured in the controller configmap, bucket region mismatch, or network egress blocked from the controller.

Related errors


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